Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Brignone, Sergio (sbrignone_at_[hidden])
Date: 2006-03-01 22:20:36


Hi everybody,

 

I am trying to run a master/slave set.

Because of the nature of the problem I need to start and stop (kill)
some slaves.

The problem is that as soon as one of the slave dies, the master dies
also.

 

This is what I am doing:

 

MASTER:

 

MPI_Init(...)

 

MPI_Comm_spawn(slave1,...,nslave1,...,intercomm1);

 

MPI_Barrier(intercomm1);

 

MPI_Comm_disconnect(&intercomm1);

 

MPI_Comm_spawn(slave2,...,nslave2,...,intercomm2);

 

MPI_Barrier(intercomm2);

 

MPI_Comm_disconnect(&intercomm2);

 

MPI_Finalize();

 

 

 

 

 

SLAVE:

 

MPI_Init(...)

 

MPI_Comm_get_parent(&intercomm);

 

(does something)

 

MPI_Barrier(intercomm);

 

MPI_Comm_disconnect(&intercomm);

 

 MPI_Finalize();

 

 

 

The issue is that as soon as the first set of slaves calls MPI_Finalize,
the master dies also (it dies right after
MPI_Comm_disconnect(&intercomm1) )

 

 

What am I doing wrong?

 

Thanks

 

Sergio