chdibi_at_[hidden] wrote:
> hi all,
>
> LAM currently implements support for MPI_THREAD_SINGLE,
> MPI_THREAD_SERIALIZED and MPI_THREAD_FUNNELED. The constant
> MPI_THREAD_MULTIPLE is provided, but LAM will never return
> MPI_THREAD_MULTIPLE in the provided argument to MPI_INIT_THREAD.
>
> I implemented a simple example (a process creates 2 threads: one
> thread that it sends a buffer and an other that it receives this) but
> it doesn't work. Is LAM MPI thread support the reason?
Yes.
The reason your program hangs is that, eventually, the receve thread
blocks on a receive all (when there is no more message to receive),
while holding the single "serialized" lock. The send thread then blocks
trying to acquire the single lock. Or else...the send thread blocks
because it has overrun the output connection buffering (also holding the
serializer lock), and the receive thread can't receive because it is
blocked on the serializer lock.
As Jeff said, LAM does not (and will not probably) support
MPI_THREAD_MULTIPLE. OpenMPI does.
I expect to move to OpenMPI for this very same reason. The other option
(lots more work) is to rewrite your application using the non-blocking
IRecv and ISend methods for doing MPI communication, and polling and timers.
/jr
---
>
>
>
> thank's for you help.
>
> _________________________________________________________________
> Personalizza MSN Messenger con sfondi e fotografie!
> http://www.ilovemessenger.msn.it/
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________ This list is archived
> at http://www.lam-mpi.org/MailArchives/lam/
|