<!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=835203717-25102006><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 class=835203717-25102006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=835203717-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> owner-mpich-discuss@mcs.anl.gov 
  [mailto:owner-mpich-discuss@mcs.anl.gov] <B>On Behalf Of </B>Hrant P. 
  Hratchian<BR><B>Sent:</B> Tuesday, October 24, 2006 11:27 PM<BR><B>To:</B> 
  mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> [MPICH] Using MPI_COMM_SPAWN 
  correctly<BR></FONT><BR></DIV>
  <DIV></DIV>I'm a basic MPI user and I've built a set of code that uses 
  MPI_COMM_SPAWN.&nbsp; 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.&nbsp; 
  mpdtrace confirms that the loop has been established and runs over all three 
  machines.&nbsp; To run the code I execute the following on node_1: 
  <BR><BR>mpiexec -n 1 Prog_Master <A href="http://test.in">test.in</A> 
  &gt;&amp; test.mpilog &amp;<BR><BR>Prog_Master spawns 4 processes using 
  MPI_COMM_SPAWN.&nbsp; 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">hhratchi@indiana.edu</A> 
</BLOCKQUOTE></BODY></HTML>