Boost logo

Boost-MPI :

Subject: Re: [Boost-mpi] openmpi 1.6.2 boost 1.54 mswin7 vs2010 Threading support:No
From: Alain Miniussi (Alain.Miniussi_at_[hidden])
Date: 2014-02-16 11:41:30


On 13/02/2014 21:59, Matthias Troyer wrote:
> You need to ask the OpenMPI folks if they have a version that supports
> threading on Windows

Small warning:
At least on Linux, OpenMPI can be built explicitly with threading
support. The same is probably true on other platforms, but the reason
why this is not the default is that some optimizations on the
communication layers are dropped in that mode (related with InfiniBand
if I recall correctly).

Regards

>
>
> On 13 Feb 2014, at 21:23, MM <finjulhich_at_[hidden]
> <mailto:finjulhich_at_[hidden]>> wrote:
>
>> my ompi_info says (openmpi)
>> Threading support: No
>>
>> Does that mean it's not supported?
>>
>> If so, what to do?
>>
>>
>> On 13 February 2014 17:00, Matthias Troyer <troyer_at_[hidden]
>> <mailto:troyer_at_[hidden]>> wrote:
>>
>>
>>
>>
>>
>>
>> On Feb 13, 2014, at 17:44, MM <finjulhich_at_[hidden]
>> <mailto:finjulhich_at_[hidden]>> wrote:
>>
>>> On 13 February 2014 15:33, Matthias Troyer <troyer_at_[hidden]
>>> <mailto:troyer_at_[hidden]>> wrote:
>>>
>>> Hi,
>>>
>>> In orders to use MPI in a multi-threaded environment, even
>>> when only one thread uses MPI, you need to request the
>>> necessary level of thread support in the environment
>>> constructor. Then you'd an check whether your MPI
>>> implementation supports multi threading. Note that using MPI
>>> the way you do need not work even though it seems safe at
>>> first sight. One reason is that your MPI implementation
>>> might use threads internally to support, e.g. nonblocking
>>> calls and those threads might not be compatible with your
>>> threads.
>>>
>>> Matthias
>>>
>>> So in my case, as I have a main thread that doesn't call MPI,
>>> and another purposely created user thread to call MPI lib, the
>>> mode is MPI_THREAD_FUNNELLED ?
>>>
>>> as boost 1.54 doesn't have the level in the enviroment ctor, I
>>> need to explicitly call the underlying
>>> MPI::Init_thread(MPI_THREAD_FUNNELED).
>>> once I move to 1.55, I'll use the env ctor.
>>
>>
>> You need MPI_THREAD_SERIALIZED since it is not the main thread
>> which is doing the MPI communication. Be sure to check whether
>> that level is actually supported.
>>
>> Matthias
>>
>>
>> _______________________________________________
>> Boost-mpi mailing list
>> Boost-mpi_at_[hidden] <mailto:Boost-mpi_at_[hidden]>
>> http://lists.boost.org/mailman/listinfo.cgi/boost-mpi
>>
>>
>> _______________________________________________
>> Boost-mpi mailing list
>> Boost-mpi_at_[hidden] <mailto:Boost-mpi_at_[hidden]>
>> http://lists.boost.org/mailman/listinfo.cgi/boost-mpi
>
>
>
> _______________________________________________
> Boost-mpi mailing list
> Boost-mpi_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-mpi

-- 
=====================================
Alain Miniussi
DSI/Pôle Génie Logiciel Scientifique
Observatoire de la Côte d'Azur


Boost-Commit list run by troyer at boostpro.com