2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

Add MPI support for AIX and Sun to mpi.jam.

[SVN r62511]
This commit is contained in:
K. Noel Belcourt
2010-06-07 17:18:29 +00:00
parent 787b457b73
commit e5eb2a2a30

View File

@@ -336,6 +336,65 @@ rule init ( mpicxx ? : options * : mpirun-with-options * )
compile_flags = [ SHELL "$(command) -compile_info" ] ;
link_flags = [ SHELL "$(command) -link_info" ] ;
}
# Sun HPC and Ibm POE
else if [ SHELL "$(command) -v 2>/dev/null" ]
{
compile_flags = [ SHELL "$(command) -c -v -xtarget=native64 2>/dev/null" ] ;
local back = [ MATCH "--------------------(.*)" : $(compile_flags) ] ;
if $(back)
{
# Sun HPC
if $(.debug-configuration)
{
ECHO "Found Sun MPI wrapper compiler: $(command)" ;
}
compile_flags = [ MATCH "(.*)--------------------" : $(back) ] ;
compile_flags = [ MATCH "(.*)-v" : $(compile_flags) ] ;
link_flags = [ SHELL "$(command) -v -xtarget=native64 2>/dev/null" ] ;
link_flags = [ MATCH "--------------------(.*)" : $(link_flags) ] ;
link_flags = [ MATCH "(.*)--------------------" : $(link_flags) ] ;
# strip out -v from compile options
local front = [ MATCH "(.*)-v" : $(link_flags) ] ;
local back = [ MATCH "-v(.*)" : $(link_flags) ] ;
link_flags = "$(front) $(back)" ;
front = [ MATCH "(.*)-xtarget=native64" : $(link_flags) ] ;
back = [ MATCH "-xtarget=native64(.*)" : $(link_flags) ] ;
link_flags = "$(front) $(back)" ;
}
else
{
# Ibm POE
if $(.debug-configuration)
{
ECHO "Found IBM MPI wrapper compiler: $(command)" ;
}
#
compile_flags = [ SHELL "$(command) -c -v 2>/dev/null" ] ;
compile_flags = [ MATCH "(.*)exec: export.*" : $(compile_flags) ] ;
local front = [ MATCH "(.*)-v" : $(compile_flags) ] ;
local back = [ MATCH "-v(.*)" : $(compile_flags) ] ;
compile_flags = "$(front) $(back)" ;
front = [ MATCH "(.*)-c" : $(compile_flags) ] ;
back = [ MATCH "-c(.*)" : $(compile_flags) ] ;
compile_flags = "$(front) $(back)" ;
link_flags = $(compile_flags) ;
# get location of mpif.h from mpxlf
local f_flags = [ SHELL "mpxlf -v 2>/dev/null" ] ;
f_flags = [ MATCH "(.*)exec: export.*" : $(f_flags) ] ;
front = [ MATCH "(.*)-v" : $(f_flags) ] ;
back = [ MATCH "-v(.*)" : $(f_flags) ] ;
f_flags = "$(front) $(back)" ;
f_flags = [ MATCH "xlf_r(.*)" : $(f_flags) ] ;
f_flags = [ MATCH "-F:mpxlf_r(.*)" : $(f_flags) ] ;
compile_flags = [ strip-eol $(compile_flags) ] ;
compile_flags = "$(compile_flags) $(f_flags)" ;
}
}
if $(result) || $(compile_flags) && $(link_flags)
{