<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16825" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am trying to run an MPI program (prog) from
another MPI program (test) using CreateProcess under Windows XP.
</FONT><FONT face=Arial size=2>I am using MPICH2 v1.08. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Source for test</FONT></DIV>
<DIV><FONT face=Arial size=2>#include "stdafx.h"<BR>#include
<afx.h><BR>#include "mpi.h"</FONT></DIV>
<DIV><FONT face=Arial size=2>int run_program( char * program
)<BR>{<BR> STARTUPINFO si;<BR> PROCESS_INFORMATION
pi;<BR> ZeroMemory( &si, sizeof(si) );<BR> si.cb =
sizeof(si);<BR> ZeroMemory( &pi, sizeof(pi) );<BR>
if( !CreateProcess( NULL, program, NULL, NULL, FALSE,</FONT><FONT
face=Arial size=2> 0,</FONT><FONT face=Arial size=2> NULL, NULL, &si,
&pi ) ) <BR> {<BR> return
-1;<BR> }<BR> WaitForSingleObject( pi.hProcess, INFINITE
);<BR> CloseHandle( pi.hProcess );<BR> CloseHandle(
pi.hThread );<BR> return 0;<BR>}<BR>int main(int argc, char*
argv[])<BR>{<BR> MPI_Init(NULL,NULL);<BR>
run_program("prog");<BR> MPI_Finalize();<BR> return
0;<BR>}<BR></DIV></FONT>
<DIV><FONT face=Arial size=2>Source for prog</FONT></DIV>
<DIV><FONT face=Arial size=2>#include "stdafx.h"<BR>#include
"mpi.h"</FONT></DIV>
<DIV><FONT face=Arial size=2>int main(int argc, char*
argv[])<BR>{<BR> MPI_Init( NULL, NULL );<BR>
MPI_Finalize();<BR> return 0;<BR>}<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I get the following error when I run
test:</DIV></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>>mpiexec -n 1 test<BR>MPIDU_Sock_post_connect
failed.<BR>[0] PMI_ConnectToHost failed: unable to post a connect to Yellowtail
yellowtail<BR>
:2057, error: Unknown error class, error
stack:<BR>MPIDU_Sock_post_connect(1228): unable to connect to Yellowtail
yellowtail <BR> on port 2057, exhausted all endpoints (errno
-1)<BR>MPIDU_Sock_post_connect(1275): unable to connect
to
on port 2057,<BR> No connection could be made because the target
machine actively refused it. (er<BR>rno 10061)<BR>MPIDU_Sock_post_connect(1275):
unable to connect to yellowtail on port 2057, No<BR>connection could be made
because the target machine actively refused it.
(errno<BR>10061)<BR>MPIDU_Sock_post_connect(1275): unable to connect to
Yellowtail on port 2057, No<BR>connection could be made because the target
machine actively refused it. (errno<BR>10061)<BR>uPMI_ConnectToHost returning
PMI_FAIL<BR>[0] PMI_Init failed.<BR>Fatal error in MPI_Init: Other MPI error,
error stack:<BR>MPIR_Init_thread(294): Initialization
failed<BR>MPID_Init(83)........: channel initialization
failed<BR>MPID_Init(334).......: PMI_Init returned -1<BR>></FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2>In my actual application prog is either a
standalone MPI program which I can't change or a non MPI program (in
which case test works) . </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'd be gratefull for any help.</FONT><FONT
face=Arial size=2></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Rod Cook</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>