Boost logo

Boost-Build :

Subject: Re: [Boost-build] Threading with vacpp toolset
From: Belcourt, K. Noel (kbelco_at_[hidden])
Date: 2010-11-27 12:44:52


Hi Volodya,

On Nov 26, 2010, at 11:34 PM, Vladimir Prus wrote:

> On Friday, November 26, 2010 21:12:10 K. Noel Belcourt wrote:
>> Hi,
>>
>> With the vacpp toolset, we build single threaded by default but when
>> we enable MPI, a few Boost libraries are built threading=multi due to
>> the dependence on MPI. What's strange is that the compile lines for
>> these libraries look like this:
>>
>> xlC xlC_r -c -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -
>> qpic=large -qcpluscmt -qNOOPTimize -qnoinline -g -qfullpath -qeh -
>> qrtti -I".." -I"/projects/sierra/dawn/openmpi-1.4.2/include" -o "/
>> scratch2/kbelco/boost/results/boost/bin.v2/libs/graph_parallel/test/
>> adjlist_build_test-2.test/vacpp-10.1/debug/threading-multi/
>> adjlist_build_test.o" "../libs/graph_parallel/test/
>> adjlist_build_test.cpp"
>>
>> Notice the single threaded compiler (xlC) followed by the multi-
>> threaded compiler (xlC_r).
>>
>> The problem seems to be in the vacpp.jam file where the compiler is
>> selected based on the threading model.
>>
>> flags vacpp VA_CXX_COMPILER <threading>single : xlC ;
>> flags vacpp VA_CXX_COMPILER <threading>multi : xlC_r ;
>>
>> It seems that when we set the flag for the multi-threaded compiler,
>> we should replace the existing compiler (xlC) rather than append on a
>> new compiler (xlC_r).
>
> Actually, the flags are evaluated once for each action executed, and
> therefore
> no replace should be necessary. The behaviour you see seems only
> possible
> if somehow, the property set for an action has both
> <threading>single and
> <threading>multi.

I'm sure that's what's happening. By default we're building
<threading>single and only the Boost products that depend on MPI get
the additional <threading>multi dependency.

> Can you send me (offlist) the output of bjam
> with --debug-building (possiblity adding --with-whatever-library-is-
> causing-
> problem, which is graph_parallel, right?)

Yes, graph_parallel and MPI libraries for sure. I'll get the output
to you shortly.

-- Noel


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