[MPICH] about MPI_Comm_spawn
llwaeva at 21cn.com
llwaeva at 21cn.com
Sat Sep 24 07:12:06 CDT 2005
on 2005-9-24 14:20:49, "David Ashton" <ashton at mcs.anl.gov> wrote:
> 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?
Yes, I can run cpi and most examples.
> 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
I use mpich2.lib
>
For testing, I try to comment most code and only the following code left
// spawn1.exe
int main( int argc, char *argv[] )
{
int errs = 0, err;
int rank, size, rsize, i;
int np = 2;
int errcodes[2];
MPI_Comm parentcomm, intercomm;
MPI_Status status;
MTest_Init( &argc, &argv );
MPI_Comm_get_parent( &parentcomm );
if (parentcomm == MPI_COMM_NULL)
{
MTest_Finalize( errs );
}
MPI_Finalize();
return 0;
}
The program still cracked when run, I found the problem comes from
MPI_Comm_get_parent !!??
More information about the mpich-discuss
mailing list