Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] MPI_Barrier() consuming CPU cycles
From: Nicolas Bock (nicolasbock_at_[hidden])
Date: 2009-12-04 18:54:52

Hello list,

in our code we use a very short front-end program to drive a larger set of
codes that do our calculations. Right in the beginning of the front-end, we
have an if() statement such that only the rank 0 front-end does something,
and the other ranks go right away to an MPI_Barrier() statement, waiting for
the rank 0 front-end to finish. The rank 0 front-end then goes ahead and
does its thing by calling the other codes with MPI_Comm_spawn().

We noticed that the rank > 0 copies of the front-end consume a lot of CPU
while they are waiting at the MPI_Barrier(). This is obviously not what we
had intended. From previous discussion on this list I understand that the
CPU consumption stems from the aggressive polling frequency of the
MPI_Barrier() function. While I understand that there are a lot of
situations where a high polling frequency in MPI_Barrier() is useful, the
situation we are in is not one of them.

Is our master and slave programming model such an unusual way of using MPI?