[MPICH] about MPI_Comm_spawn

David Ashton ashton at mcs.anl.gov
Sat Sep 24 01:20:49 CDT 2005


I don't know how to help you.  Can you run any MPI application on this
machine?  Can you run the cpi.exe example that comes with the distribution?

Run "mpiexec -localonly 1 spawn1.exe" and when the program crashes it will
ask you if you want to attach the debugger.  You say yes and then you can
see exactly where the program is crashing.

Usually problems where the application crashes immediately are due to using
the wrong mpi.h, linking with the wrong mpi library, or linking with a dll
that is not in the system path.  If you installed using the mpich2xxx.msi
installer then the dlls will all be in the right place.  If you are
compiling a sample from the MPICH2 test directory then you don't have to
worry about 3rd party dlls.  So the only thing left is to check to make sure
you are compiling with the correct header files and libraries.

You can also try linking with the mpich2.lib library instead of the mpi.lib
library.  This will force the MPI code to use the socket channel
implementation only.  There is a known bug in the mpi.lib that has been
corrected for the next release so linking with mpich2.lib will remove the
remote possibility that you are hitting that bug.  If you are compiling with
cygwin I would use libmpich2.a instead of libmpi.a.

-David Ashton

-----Original Message-----
From: llwaeva at 21cn.com [mailto:llwaeva at 21cn.com] 
Sent: Friday, September 23, 2005 10:35 PM
To: David Ashton; mpich
Subject: Re: [MPICH] about MPI_Comm_spawn

> If you feel you've compiled good code, linked with the MPICH2 libraries
and
> run the job correctly with mpiexec then I would re-compile the application
> with the Debug options turned on and then run the job like this:
> "mpiexec -localonly 1 spawn1.exe"
I am sure compiling and linking has no problem. Would you please put it
more concretely, how to have Debug options turned on?

> If the application crashes you will be able to connect the debugger to it
> and determine where the program crashed.
Thanks, but it seems a little complicated to me

BTW, I found that running by "mpiexec -n 1 spawn1.exe" here has no
effect, even the MTest_Init( &argc, &argv ); fails. but if I just run
"spawn1.exe" the MTest_Init( &argc, &argv ); run without any problem





More information about the mpich-discuss mailing list