[mpich-discuss] discuss Digest, Vol 8, Issue 39

Jed Brown jedbrown at mcs.anl.gov
Wed Jun 26 14:41:32 CDT 2013


Jeff Hammond <jeff.science at gmail.com> writes:

> N threads calling MPI_Barrier corresponds to N different, unrelated
> barriers.  A thread calling MPI_Barrier will only synchronize with
> other processes, not any other threads.
>
> MPI_Barrier only acts between processes.  It has no effect on threads.
>  Just use comm=MPI_COMM_SELF and think about the behavior of
> MPI_Barrier.  That is the one-process limit of the multithreaded
> problem.

Antonio, the MPI Forum is considering proposals for something they are
calling "endpoints", that would enable use of MPI between threads.  If
accepted, the new interfaces would provide a way to create communicators
that could be used in the way you suggested.  Until then, you have to
synchronize threads using other mechanisms (locks, barriers, OpenMP, etc).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20130626/dcafc36a/attachment.sig>


More information about the discuss mailing list