Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Do MPI calls ever sleep?
From: Dave Goodell (goodell_at_[hidden])
Date: 2010-07-21 16:29:46


On Jul 21, 2010, at 2:54 PM CDT, Jed Brown wrote:

> On Wed, 21 Jul 2010 15:20:24 -0400, David Ronis <David.Ronis_at_[hidden]> wrote:
>> Hi Jed,
>>
>> Thanks for the reply and suggestion. I tried adding -mca
>> yield_when_idle 1 (and later mpi_yield_when_idle 1 which is what
>> ompi_info reports the variable as) but it seems to have had 0 effect.
>> My master goes into fftw planning routines for a minute or so (I see the
>> threads being created), but the overall usage of the slaves remains
>> close to 100% during this time. Just to be sure, I put the slaves into
>> a MPI_Barrier(MPI_COMM_WORLD) while they were waiting for the fftw
>> planner to finish. It also didn't help.
>
> They still spin (instead of using e.g. select()), but call sched_yield()
> so should only be actively spinning when nothing else is trying to run.
> Are you sure that the planner is always running in parallel? What OS
> and OMPI version are you using?

sched_yield doesn't work as expected in late 2.6 Linux kernels: http://kerneltrap.org/Linux/CFS_and_sched_yield

If this scheduling behavior change is affecting you, you might be able to fix it with:

echo "1" >/proc/sys/kernel/sched_compat_yield

-Dave