📄 74.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> body { font-family: Verdana, Arial, Helvetica, sans-serif;} a.at-term { font-style: italic; } </style> <title>MPI Processes Created</title> <meta name="Generator" content="ATutor"> <meta name="Keywords" content=""></head><body> <h3>Confirming the MPI processes</h3>
<p>When the demonstration program discussed in the last section was executed, 4 MPI processes were requested. The name of the parallel program run was mark. It was executed with the mpirun command. Here is the output from the first ps call:</p>
<pre><code> R: 0 ps using MPI only
PID PPID STIME ELAPSED P COMMAND
1255106 1265106 15:55:22 0:01 * sh
1120158 1135850 10:28:28 5:26:55 * sh
1247528 1256632 15:33:53 21:30 * sh
1264741 1255106 15:55:23 0:00 * mpirun
<em class="blue"> 1264866 1264945 15:55:23 0:00 7 mark
</em>
1264945 1264741 15:55:23 0:00 * mark
<em class="blue"> 1265077 1264945 15:55:23 0:00 * mark
</em>
1265106 1265399 15:55:21 0:02 * sh
<em class="blue"> 1265121 1264945 15:55:23 0:00 3 mark
1265333 1264945 15:55:23 0:00 0 mark</em>
1265406 1265077 15:55:23 0:00 16 ps
</code></pre>
<p>We know that the four processes shown in blue are the MPI processes because (although they have different process ids (PID) ) they have the <b>same</b> parent process id (PPID), meaning they were spawned from that parent process. Also, each of the blue processes has the name of the parallel program.</p>
<p>But even more important, from this output we can see that the MPI <em>processes</em> are running on separate <em>processors</em>. The logical processor number is shown in the column labelled P. An asterisk in the Processor Number column indicates that that particular process is
idle at present (not executing code). My guess would be
that the MPI process with PID 1265077 corresponds to the Boss process, which would finish its code before the workers (on average).</p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -