Boost logo

Boost Users :

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


On Wed, Dec 1, 2010 at 8:18 PM, Philipp Kraus
<philipp.kraus_at_[hidden]> wrote:
>> A rough guess about your "address not mapped" error: if you are going
>> to use MPI with threads, then *two* conditions must be met:
>>
>> (1) You must initialize MPI with MPI_Init_thread() instead of
>> MPI_Init().  The boost::mpi::communicator ctor uses MPI_Init(), so you
>> must run the initialization yourself and *then* create the
>> communicator object.  For instance::
>>
>>      MPI_Init_thread(&argc, &argv, MPI_THREAD_SERIALIZED)
>>      // ...
>>      mpi::communicator world;
>
> Do the Boost lib support the initialisation process? I have take a look into
> the Boost MPI classes, but it seems Boost calls only the MPI_init().
> Do I understand it correct, that I must use the mpi.h for calling the
> MPI_Init_thread() or is there a boost support?
>

You must call MPI_Init_thread() from mpi.h before you instanciate a
boost::mpi::communicator.

Cheers,
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