Boost logo

Boost-Build :

Subject: Re: [Boost-build] Building projects with multi-threaded (Intel) MPI
From: Matthias Noack (ma.noack.pr_at_[hidden])
Date: 2014-10-14 08:18:22


Hi Thomas,

thanks for the quick reply, and apologies for my late answer.

I'm not using Boost MPI, but Boost Build for building MPI projects. So
the problem is the Intel MPI library which also has an "mt" suffix.
Currently, my best solution is to use the following in my user-config.jam:

using mpi : "mpiicpc -mt_mpi" ;

Adding the multi-threading option to the Intel MPI wrapper compiler like
this results in the correct libraries being used when building my own
MPI applications, e.g.

exe ... : ... : <library>/mpi//mpi .... ;

I can live with this solution, but it hardcodes the use of
multi-threaded MPI into the user-config.jam. It would be nicer if Boost
Build's <threading> option could trigger calling the Intel MPI wrapper
compiler with or without the -mt_mpi option.

Thanks,
Matthias

On 30.09.2014 19:39, Suckow, Thomas J wrote:
> If you are using the boost sources via boost-build (use-project /boost :
> /path/to/boost/sources ;), then it won¹t automatically make -mt suffixes,
> but when threading is multi it will be multithreading safe.
>
> If you are using the libraries installed by the system, you are probably
> making lib rules with <name>boost_mpi. You could add the mt suffix or do
> some magic so it picks the right one. I also made a Jamfile to auto detect
> -mt https://github.com/thomassuckow/SystemBoost
> Note that if you use /boost//headers, to be compatible with 1_56 you need
> to <use>/boost//headers <implicit-dependancy>/boost//headers. I need to
> update the readme at some point.
>
> Hope that helps!
>
> -Thomas
>
> On 9/30/14, 10:24 AM, "Matthias Noack" <ma.noack.pr_at_[hidden]> wrote:
>
>> Hi,
>>
>> I'm using Boost.Build for an MPI project and want to link against the
>> multi-threaded MPI library. At least for Intel MPI, there are two
>> libraries "libmpi.so" and "libmpi_mt.so", where the second one is
>> thread-safe.
>>
>> My user-config.jam, contains the following line:
>>
>> using mpi : /sw/intel/impi/4.1.1.036/bin64/mpiicpc ;
>>
>> My Jamroot then uses "<library>/mpi//mpi" for the respective targets.
>>
>> Regardless of the <threading> property of the project, libmpi.so is used.
>>
>> I know I could specifiy all libraries manually in the user-config.jam
>> via <find-shared-library>, but this would mean deciding whether or not I
>> want threading for all projects and their targets.
>>
>> So ideally, I want to configure the library per target and use
>> Boost.Build's built-in-support for MPI.
>>
>> Is there a solution for my problem, or do I have to do things manually?
>>
>> Thanks,
>> Matthias
>>
>>
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost-build
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk