Update of /cvsroot/boost/boost/tools/build/v2/tools
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22547
Modified Files:
mpi.jam
Log Message:
Auto-detection of Microsoft's MPI toolchain
Index: mpi.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/mpi.jam,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- mpi.jam 18 Dec 2006 19:38:12 -0000 1.4
+++ mpi.jam 16 Feb 2007 21:02:58 -0000 1.5
@@ -58,6 +58,7 @@
import common ;
import feature : feature ;
import generators ;
+import os ;
import project ;
import property ;
import testing ;
@@ -223,13 +224,44 @@
# Initialize the MPI module.
rule init ( mpicxx ? : options * : mpirun-with-options * )
{
- if ! $(options)
+ if ! $(options) && $(.debug-configuration)
{
- if $(.debug-configuration)
+ ECHO "===============MPI Auto-configuration===============" ;
+ }
+
+ if ! $(mpicxx) && [ os.on-windows ]
+ {
+ # Try to auto-configure to the Microsoft Compute Cluster Pack
+ local cluster_pack_path_native = "C:\\Program Files\\Microsoft Compute
Cluster Pack" ;
+ local cluster_pack_path = [ path.make $(cluster_pack_path_native) ] ;
+ if [ GLOB $(cluster_pack_path_native)\\Include : mpi.h ]
{
- ECHO "===============MPI Auto-configuration===============" ;
+ if $(.debug-configuration)
+ {
+ ECHO "Found Microsoft Compute Cluster Pack:
$(cluster_pack_path_native)" ;
+ }
+
+ # Pick up either the 32-bit or 64-bit library, depending on which address
+ # model the user has selected. Default to 32-bit.
+ options = <include>$(cluster_pack_path)/Include
+ <address-model>64:<library-path>$(cluster_pack_path)/Lib/amd64
+ <library-path>$(cluster_pack_path)/Lib/i386
+ <find-static-library>msmpi
+ <toolset>msvc:<define>_SECURE_SCL=0
+ ;
+
+ # Setup the "mpirun" equivalent (mpiexec)
+ .mpirun = "\"$(cluster_pack_path_native)\\Bin\\mpiexec.exe"\" ;
+ .mpirun_flags = -n ;
}
-
+ else if $(.debug-configuration)
+ {
+ ECHO "Did not find Microsoft Compute Cluster Pack in
$(cluster_pack_path_native)." ;
+ }
+ }
+
+ if ! $(options)
+ {
# Try to auto-detect options based on the wrapper compiler
local command = [ common.get-invocation-command mpi : mpic++ : $(mpicxx) ]
;
@@ -323,8 +355,6 @@
: $(link_flags) ] ;
ECHO "MPI link flags: $(match[2])" ;
}
- echo "MPI build features: " ;
- ECHO $(options) ;
}
}
else
@@ -345,17 +375,32 @@
ECHO "You will need to manually configure MPI support." ;
}
- if $(.debug-configuration)
- {
- ECHO "====================================================" ;
- }
}
# Find mpirun (or its equivalent) and its flags
- .mpirun =
- [ common.get-invocation-command mpi : mpirun : $(mpirun-with-options[1])
] ;
- .mpirun_flags = $(mpirun-with-options[2-]) ;
- .mpirun_flags ?= -np ;
+ if ! $(.mpirun)
+ {
+ .mpirun =
+ [ common.get-invocation-command mpi : mpirun :
$(mpirun-with-options[1]) ] ;
+ .mpirun_flags = $(mpirun-with-options[2-]) ;
+ .mpirun_flags ?= -np ;
+ }
+
+ if $(.debug-configuration)
+ {
+ if $(options)
+ {
+ echo "MPI build features: " ;
+ ECHO $(options) ;
+ }
+
+ if $(.mpirun)
+ {
+ echo "MPI launcher: $(.mpirun) $(.mpirun_flags)" ;
+ }
+
+ ECHO "====================================================" ;
+ }
if $(options)
{
@@ -450,7 +495,7 @@
{
result += [ testing.make-test
run-mpi : $(sources) /boost/mpi//boost_mpi
- : $(requirements) <mpi:processes>$(processes) : $(name)-$(processes)
] ;
+ : $(requirements) <toolset>msvc:<link>static
<mpi:processes>$(processes) : $(name)-$(processes) ] ;
}
return $(result) ;
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs