Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57791 - trunk/tools/build/v2/tools
From: ghost_at_[hidden]
Date: 2009-11-19 15:05:07


Author: vladimir_prus
Date: 2009-11-19 15:05:06 EST (Thu, 19 Nov 2009)
New Revision: 57791
URL: http://svn.boost.org/trac/boost/changeset/57791

Log:
Improve detection of MT requirement of MPI.

Some MPI implementation report -lpthread in the compilation flags. Previously,
we'd add -lpthread, but did not set threading=multi, as we really should.
One manifestation of this issue is that when building with such an MPI,
and requesting "threading=single threading=multi", we'd actually try
to build two variants of everything, including "mpi.so" Python extension.
And since Python extensions, at present, do not have their name adjusted
for different variants, we'd get duplicate target name error.

Text files modified:
   trunk/tools/build/v2/tools/mpi.jam | 15 ++++++++++++++-
   1 files changed, 14 insertions(+), 1 deletions(-)

Modified: trunk/tools/build/v2/tools/mpi.jam
==============================================================================
--- trunk/tools/build/v2/tools/mpi.jam (original)
+++ trunk/tools/build/v2/tools/mpi.jam 2009-11-19 15:05:06 EST (Thu, 19 Nov 2009)
@@ -163,7 +163,20 @@
                local add = [ add_feature $(prefix) $(name) $(cmdline) ] ;
 
                if $(add) {
- result += $(add[1]) ;
+
+ if $(add[1]) = <find-shared-library>pthread
+ {
+ # Uhm. It's not really nice that this MPI implementation
+ # uses -lpthread as opposed to -pthread. We do want to
+ # set <threading>multi, instead of -lpthread.
+ result += "<threading>multi" ;
+ MPI_EXTRA_REQUIREMENTS += "<threading>multi" ;
+ }
+ else
+ {
+ result += $(add[1]) ;
+ }
+
                   cmdline = $(add[2]) ;
                   matched = yes ;
                }


Boost-Commit 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