It seems as though the spawned processes get spread across the nodes - mostly. I actually need control over where the spawned processed go. Using the following (f90) code gets the spawned processes running on pople-n3 as expected...
<br><br> Call MPI_INFO_CREATE(PESSMPI_Info,IError)<br> Call MPI_INFO_SET(PESSMPI_Info,'host','pople-n3',IError)<br> Call MPI_INFO_SET(PESSMPI_Info,'envlist','path',IError)<br> Call MPI_INFO_SET(PESSMPI_Info,'wdir','/home/hrant',IError)
<br> Call MPI_COMM_SPAWN('Pseudoatom_PESSMPI',MPI_ARGV_NULL, &<br> PESSMPI_NProcs,PESSMPI_Info,0,MPI_COMM_WORLD,PESSMPI_Comm_01, &<br> MPI_ERRCODES_IGNORE,IError)<br> Call MPI_INFO_FREE(PESSMPI_Info,IError)
<br><br>However, this runs all PESSMPI_NProcs processes on node 3. To be able to spread the jobs out I tried...<br><br> Call MPI_INFO_CREATE(PESSMPI_Info,IError)<br> Call MPI_INFO_SET(PESSMPI_Info,'file','mf',IError)
<br> Call MPI_INFO_SET(PESSMPI_Info,'envlist','path',IError)<br> Call MPI_INFO_SET(PESSMPI_Info,'wdir','/home/hrant',IError)<br> Call MPI_COMM_SPAWN('Pseudoatom_PESSMPI',MPI_ARGV_NULL, &<br> PESSMPI_NProcs,PESSMPI_Info,0,MPI_COMM_WORLD,PESSMPI_Comm_01, &
<br> MPI_ERRCODES_IGNORE,IError)<br> Call MPI_INFO_FREE(PESSMPI_Info,IError)<br><br>but this doesn't work at all. The job runs fine but the spawned processes end up on various machines defined in my mpd.hosts
file. The file mf looks like:<br><br>pople-n3<br>pople-n3<br><br>I expected this to work the same as the "host" example before (PESSMPI_NProcs=2 in these cases). Am I doing something wrong with the format of my file?
<br><br>Thanks in advance...Hrant<br><br><br><div><span class="gmail_quote">On 10/25/06, <b class="gmail_sendername">Rajeev Thakur</b> <<a href="mailto:thakur@mcs.anl.gov">thakur@mcs.anl.gov</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Are you using a single MPI_Comm_spawn with maxprocs=4 to
spawn the four process? In that case, I believe they will get spread across the
nodes. If you use four separate MPI_Comm_spawns with maxprocs=1, they will get
spawned on the same node.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Rajeev</font></span></div><br>
<blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:owner-mpich-discuss@mcs.anl.gov" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">owner-mpich-discuss@mcs.anl.gov</a>
[mailto:<a href="mailto:owner-mpich-discuss@mcs.anl.gov" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">owner-mpich-discuss@mcs.anl.gov</a>] <b>On Behalf Of </b>Hrant P.
Hratchian<br><b>Sent:</b> Tuesday, October 24, 2006 11:27 PM<br><b>To:</b>
<a href="mailto:mpich-discuss@mcs.anl.gov" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mpich-discuss@mcs.anl.gov</a><br><b>Subject:</b> [MPICH] Using MPI_COMM_SPAWN
correctly<br></font><br></div><div><span class="e" id="q_10e808de787da4fd_1">
<div></div>I'm a basic MPI user and I've built a set of code that uses
MPI_COMM_SPAWN. The way that the code runs the master process runs on
only 1 process while the slave processes use n processes.<br><br>I have a
mpd.hosts file that includes three machines: node_1, node_2, and node_3.
mpdtrace confirms that the loop has been established and runs over all three
machines. To run the code I execute the following on node_1:
<br><br>mpiexec -n 1 Prog_Master <a href="http://test.in" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">test.in</a>
>& test.mpilog &<br><br>Prog_Master spawns 4 processes using
MPI_COMM_SPAWN. Rather than spreading the 4 spawned processes across the
three machines listed in mpd.hosts (where the loop is running), all 4 spawned
processes run on node_1.<br><br>Am I doing something wrong here?<br><br>Thanks
in advance.<br>HPH<br clear="all"><br>-- <br>Hrant P. Hratchian, Ph.D.<br>E. R.
Davidson Fellow <br>Department of Chemistry<br>Indiana
University<br>Bloomington, Indiana 47405-7102<br>812.856.0829<br><a href="mailto:hhratchi@indiana.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">hhratchi@indiana.edu</a>
</span></div></blockquote></div>
</blockquote></div><br><br clear="all"><br>-- <br>Hrant P. Hratchian, Ph.D.<br>E. R. Davidson Fellow<br>Department of Chemistry<br>Indiana University<br>Bloomington, Indiana 47405-7102<br>812.856.0829<br><a href="mailto:hhratchi@indiana.edu">
hhratchi@indiana.edu</a>