<!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.2900.3660" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=275272621-01042010><FONT
face=Verdana>Hello,</FONT></SPAN></DIV>
<DIV><SPAN class=275272621-01042010><FONT
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=275272621-01042010><FONT face=Verdana>I have installed MPICH2
v.1.2.1 on Windows XP Pro machines and was trying to run the following test app
on "mt" channel:</FONT></SPAN></DIV>
<DIV><SPAN class=275272621-01042010><FONT
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=275272621-01042010><FONT color=#0000ff><FONT color=#0000ff>
<P>#define</FONT></FONT> NHOST 2</P><FONT color=#0000ff><FONT color=#0000ff>
<P>int</FONT></FONT> main(<FONT color=#0000ff><FONT
color=#0000ff>int</FONT></FONT> argc, <FONT color=#0000ff><FONT
color=#0000ff>char</FONT></FONT>* argv[]) {</P>
<P><FONT color=#0000ff><FONT color=#0000ff>int</FONT></FONT> supported;</P>
<P><FONT color=#0000ff><FONT color=#0000ff>int</FONT></FONT> rank, size;</P>
<P>MPI_Comm parent, intercomm; </P>
<P></P>
<P>MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE,
&supported);</P>
<P><FONT color=#0000ff><FONT color=#0000ff>if</FONT></FONT>(supported !=
MPI_THREAD_MULTIPLE){</P>
<P>printf(<FONT color=#a31515><FONT color=#a31515>"The library does not support
MPI_THREAD_MULTIPLE\n"</FONT></FONT>);</P>
<P>exit(-1);</P>
<P>}</P>
<P>MPI_Comm_get_parent(&parent);</P>
<P><FONT color=#0000ff><FONT color=#0000ff>if</FONT></FONT> (parent ==
MPI_COMM_NULL){</P>
<P><FONT color=#0000ff><FONT color=#0000ff>int</FONT></FONT> i;</P>
<P><FONT color=#0000ff><FONT color=#0000ff>int</FONT></FONT> nproc[NHOST] =
{1<FONT color=#008000><FONT color=#008000>, 1</FONT></FONT>};</P>
<P><FONT color=#0000ff><FONT color=#0000ff>char</FONT></FONT>* progs[NHOST] =
{<FONT color=#a31515><FONT color=#a31515>"c:\\mpi_spawn"</FONT></FONT>, <FONT
color=#a31515><FONT color=#a31515>"c:\\tm\\mpi_spawn"</FONT></FONT>};</P>
<P></P>
<P>MPI_Info infos[NHOST];</P>
<P></P>
<P><FONT color=#0000ff><FONT color=#0000ff>for</FONT></FONT> (i=0; i < NHOST;
i++) {</P>
<P>MPI_Info_create(&infos[i]);</P>
<P>MPI_Info_set(infos[i], <FONT color=#a31515><FONT
color=#a31515>"host"</FONT></FONT>, <FONT color=#a31515><FONT
color=#a31515>"localhost"</FONT></FONT>);</P>
<P>}</P>
<P>MPI_Comm_spawn_multiple(NHOST,</P>
<P>progs, MPI_ARGVS_NULL, nproc, infos,</P>
<P>0, MPI_COMM_WORLD, &intercomm, MPI_ERRCODES_IGNORE);</P>
<P><FONT color=#0000ff><FONT color=#0000ff>for</FONT></FONT> (i=0; i < NHOST;
i++) {</P>
<P>MPI_Info_free(&infos[i]);</P>
<P>}</P>
<P>}</P>
<P><FONT color=#0000ff><FONT color=#0000ff>else</FONT></FONT>{</P>
<P>intercomm = parent;</P>
<P>}</P>
<P>MPI_Comm_rank(intercomm, &rank);</P>
<P>MPI_Comm_size(intercomm, &size);</P>
<P>printf(<FONT color=#a31515><FONT color=#a31515>"[%d/%d] Hello
world\n"</FONT></FONT>, rank, size); fflush(stdout);</P>
<P>MPI_Comm_free(&intercomm);</P>
<P>MPI_Finalize();</P>
<P><FONT color=#0000ff><FONT color=#0000ff>return</FONT></FONT> 0;</P>
<P>} </P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>The app hangs. I can see
three (as expected) instances of the program in the Task Manager
but MPI_Comm_spawn_multiple()<FONT size=2></FONT> never returns
control to my app.</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>I have reduced the
number of spawned hosts to one and it ran successfully. Also, it spawned
successfully two hosts with the following line commented
out:</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>//MPI_Info_set(infos[i],
<FONT color=#a31515><FONT color=#a31515>"host"</FONT></FONT>, <FONT
color=#a31515><FONT color=#a31515>"localhost"</FONT></FONT>);</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>I have tried it on
two machines with the same result.</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT face=Verdana></FONT></SPAN> </P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>Also, I have tried to spawn
just one instance but on the remote host and got the following error
messages:</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>ERROR:unable to read the
cmd header on the pmi context, Error = -1</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>ERROR:Error posting ready,
An existing connection was forcibly closed by the remote host.</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>I am not sure whether that
is related to the first issue?</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT face=Verdana></FONT></SPAN> </P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>Any insight would be
greately appreciated.</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>Thank
you.</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT face=Verdana>Alex</FONT></SPAN></P>
<P><SPAN class=275272621-01042010><FONT
face=Verdana></FONT></SPAN> </P></SPAN></DIV><pre>******************************************************************************************
This message may contain confidential or proprietary information intended only for the use of the
addressee(s) named above or may contain information that is legally privileged. If you are
not the intended addressee, or the person responsible for delivering it to the intended addressee,
you are hereby notified that reading, disseminating, distributing or copying this message is strictly
prohibited. If you have received this message by mistake, please immediately notify us by
replying to the message and delete the original message and any copies immediately thereafter.
Thank you.
******************************************************************************************
FACLD
</pre></BODY></HTML>