Boost logo

Boost Users :

Subject: Re: [Boost-users] How do I use the output of -showme:link and -showme:compile to customize my boost mpi build?
From: Ilja Honkonen (ilja.honkonen_at_[hidden])
Date: 2015-06-13 09:36:50


Hello
> Apologies if this is redundant. I have not heard back so I thought I
> would try to restate my question more clearly in case it was overlooked.

I think the best way would be to try to get boost to compile the program
as you would do it on the command line. There are several ways to
accomplish this:

1) tell boost to use the wrapper compiler for everything:
cd /path/to/boost
echo "using gcc : 4.7.2 : CC ;" >> ./tools/build/v2/user-config.jam
where CC is the compiler command to use when compiling any C++ program
(this was on a Cray machine), the version string might be optional if
you don't plan to compile with different versions of gcc. Also tell
boost to try to build mpi related stuff:
echo "using mpi ;" >> ./tools/build/v2/user-config.jam
If the wrapper compiler takes care of everything and doesn't freak out
from additional options that might be given by boost then that should
work. In case of mpich this should do it:
echo "using mpi : : mpich ;" >> ./tools/build/v2/user-config.jam

2) tell boost to use the wrapper compiler only for compiling mpi things:
echo "using mpi : mpicxx ;" >> ./tools/build/v2/user-config.jam
You also might be able to tell boost not try to be smart by giving empty
extra flags like:
echo "using mpi : mpicxx : <find-shared-library> ;" >>
./tools/build/v2/user-config.jam
etc.

3) Give all options manually to either the mpi compile command or the
main compile command like so:
echo "using gcc : : :
<compileflags>-I/opt/cray/mpt/5.2.1/xt/seastar/mpich2-gnu/include
<linkflags>-L/opt/cray/mpt/5.2.1/xt/seastar/mpich2-gnu/lib ;" >>
./tools/build/v2/user-config.jam
The paths above would be the ones you got from mpicxx -showme.

Note that in recent versions of boost the path to user-config.jam has
changed to ./tools/build/src/user-config.jam

Examples are given for different machines e.g. on this page:
https://github.com/fmihpc/dccrg/wiki/Pleiades
and several subpages (curie, jugene, hermit, etc.) accessible from:
https://gitorious.org/dccrg/pages

Ilja


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