Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] MPI_Comm_spawn, caller uses CPU while waiting for spawned processes
From: Nicolas Bock (nicolasbock_at_[hidden])
Date: 2009-12-04 15:04:49

On Fri, Dec 4, 2009 at 12:10, Eugene Loh <Eugene.Loh_at_[hidden]> wrote:

> Nicolas Bock wrote:
> On Fri, Dec 4, 2009 at 10:29, Eugene Loh <Eugene.Loh_at_[hidden]> 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".
HI Eugene,

thanks for the help. I think I got it now:


MPI_Irecv(buffer+buffer_index, 1, MPI_CHAR, MPI_ANY_SOURCE, 0, spawn,

and slave.c

MPI_Send(&buffer, 1, MPI_CHAR, 0, 0, spawn);

That seems to do the trick. Since our "slave" processes are expected to have
rather long runtimes, the sleep statement in master is simply


to sleep 2 seconds. The load on the master process is basically zero now.

Thanks again for your help,