[mvapich-discuss] MPI_Comm_spawn broken in 2.1rc1
Nicolas Niclausse
nicolas.niclausse at inria.fr
Mon Mar 9 13:41:22 EDT 2015
Hari Subramoni a écrit le 09/03/2015 18:32 :
> Hi Nicolas,
>
> Thanks for confirming that you are using the correct environment variable.
> Can you please provide us with a reproducer so that we can try it out locally?
Yes, i was able to reproduce the problem even on a very basic example taken
from:
http://mpi.deino.net/mpi_functions/mpi_comm_spawn.html
#include "mpi.h"
#include <stdio.h>
#include <stdlib.h>
#define NUM_SPAWNS 2
int main( int argc, char *argv[] )
{
int np = NUM_SPAWNS;
int errcodes[NUM_SPAWNS];
MPI_Comm parentcomm, intercomm;
MPI_Init( &argc, &argv );
MPI_Comm_get_parent( &parentcomm );
if (parentcomm == MPI_COMM_NULL)
{
/* Create 2 more processes - this example must be called
spawn_example.exe for this to work. */
MPI_Comm_spawn( "spawn_example", MPI_ARGV_NULL, np, MPI_INFO_NULL,
0, MPI_COMM_WORLD, &intercomm, errcodes );
printf("I'm the parent.\n");
}
else
{
printf("I'm the spawned.\n");
}
fflush(stdout);
MPI_Finalize();
return 0;
}
--
Nicolas NICLAUSSE Service DREAM
INRIA Sophia Antipolis http://www-sop.inria.fr/
2004 route des lucioles - BP 93 Tel: (33/0) 4 92 38 76 93
06902 SOPHIA-ANTIPOLIS cedex (France) Fax: (33/0) 4 92 38 76 02
More information about the mvapich-discuss
mailing list