Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] MPI_Comm_spawn, caller uses CPU while waiting for spawned processes
From: Eugene Loh (Eugene.Loh_at_[hidden])
Date: 2009-12-04 14:10:14


Nicolas Bock wrote:
On Fri, Dec 4, 2009 at 10:29, Eugene Loh <Eugene.Loh@sun.com> wrote:
I think you might observe a world of difference if the master issued some non-blocking call and then intermixed MPI_Test calls with sleep calls.  You should see *much* more subservient behavior.  As I remember, putting such passivity into OMPI is on somebody's to-do list, but just not very high.

could you give me more details?
Nope, sorry.  I'm going to drop out here.  The basic idea was something like:

MPI_Irecv();
while ( !flag ) {
  nanosleep(...);
  MPI_Test(...&flag...);
}

but I was hoping to "leave the rest to the reader".
I can't figure out how to do this. I could see that one way to implement what you are describing is:

in slave.c:
MPI_Send() to rank 0

in master.c
MPI_IRecv() from the spawned processes
while (1) {  MPI_Test(); }

I can't figure out how to find the ranks that MPI_Comm_spawn() used. What's the source argument in MPI_IRecv() supposed to be?