On Apr 27, 2006, at 5:14 PM, David Losada wrote:
> Now, I understand the spinning behavior comes from LAM making
> non-blocking semaphore operations. Now I see that LAM uses a different
> semaphore set for the communication between each pair of processes.
> So,
> since I programmed my server to be equally available to receive
> messages
> from two different clients, LAM can't block in neither semaphore set.
>
> Anyway.. nothing in the manual pages made me expect such spinning
> behavior... and I can see this to be quite a common pitfall. Maybe
> there's a workaround I don't know? Maybe I can change something in my
> MPI calls? Does anyone have a suggestion (apart from using the TCP
> rpi)
> that will save me this waste of CPU time?
If you're trying to receive from two peers (either by posting an
MPI_ANY_SOURCE receive or two non-blocking receives), LAM/MPI is
going to poll when using the shared memory devices. With TCP, we can
block in select(), so it's more likely we'll leave you with a quiet CPU.
Brian
--
Brian Barrett
LAM/MPI developer and all around nice guy
Have a LAM/MPI day: http://www.lam-mpi.org/
|