<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=674365622-25102006><FONT face=Arial
color=#0000ff size=2>If you want to control the placement of each process, you
need to use MPI_Comm_spawn_multiple and pass a separate info object for each of
the executables.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=674365622-25102006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=674365622-25102006><FONT face=Arial
color=#0000ff size=2>Rajeev</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> hphratchian@gmail.com
[mailto:hphratchian@gmail.com] <B>On Behalf Of </B>Hrant P.
Hratchian<BR><B>Sent:</B> Wednesday, October 25, 2006 4:44 PM<BR><B>To:</B>
Rajeev Thakur; mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> Re: [MPICH] Using
MPI_COMM_SPAWN correctly<BR></FONT><BR></DIV>
<DIV></DIV>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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff 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 face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>Rajeev</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,255) 2px solid; MARGIN-RIGHT: 0px">
<DIV lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>From:</B> <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:owner-mpich-discuss@mcs.anl.gov"
target=_blank>owner-mpich-discuss@mcs.anl.gov</A> [mailto:<A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:owner-mpich-discuss@mcs.anl.gov"
target=_blank>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 onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:mpich-discuss@mcs.anl.gov"
target=_blank>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
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://test.in" target=_blank>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
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:hhratchi@indiana.edu" target=_blank>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>
</BLOCKQUOTE></BODY></HTML>