Boost logo

Boost Users :

Subject: Re: [Boost-users] mpi non-blocking communication
From: Riccardo Murri (riccardo.murri_at_[hidden])
Date: 2010-12-07 03:14:25


Hi Hicham,

On Tue, Dec 7, 2010 at 12:10 AM, Hicham Mouline <hicham_at_[hidden]> wrote:
> On a related note, I posted a question to the openmpi forum.
> MPI_INIT is identical MPI_INIT_THREAD(MPI_THREAD_SINGLE),
> but I couldn't see the utility of having MPI_THREAD_FUNNELED.
>

MPI_THREAD_SINGLE = no threads at all.

MPI_THREAD_FUNNELED = you can have threads, but only the *main* thread
(see below) issues MPI calls; you can think of this as: your
application is multi-threaded, but it is single-threaded when it comes
to MPI interaction.

MPI_THREAD_SERIALIZED = your application uses threads, and they can
issue independent MPI calls; however, you synchronize your threads so
that no two MPI calls happen concurrently (i.e., the MPI
implementation may be non-reentrant).

MPI_THREAD_MULTIPLE = your application uses threads, and they call MPI
functions concurrently.

IIRC, both OpenMPI and MPICH support up to
MPI_THREAD_MULTIPLE (if compiled with threading enabled).

> I mean: if I mpirun a process, and then a thread that is not the
> main thread calls MPI_INIT only by ususal mpi::environment
> construction, would it work?

By definition the "main thread" is the one that calls MPI_Init or
MPI_Init_thread.

Hope this helps,
Riccardo


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net