mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
COMP: no explicit handling of mpi-profiling for openmpi (fixes #18)
- previously explicitly disabled mpi-profiling, but now let openmpi configure it itself. - add config support for mpi-threads
This commit is contained in:
18
makeOPENMPI
18
makeOPENMPI
@ -71,6 +71,9 @@ _foamEtc config.sh/mpi
|
||||
|
||||
mpiPACKAGE=${FOAM_MPI:-openmpi-system}
|
||||
|
||||
# Configure with/without mpi-threads
|
||||
unset optMpiThreads
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
@ -80,6 +83,8 @@ usage() {
|
||||
usage: ${0##*/} [OPTION] [openmpi-VERSION]
|
||||
options:
|
||||
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-no-thread disable multiple mpi threads
|
||||
-thread enable multiple mpi threads
|
||||
-help
|
||||
|
||||
* build openmpi with
|
||||
@ -100,6 +105,8 @@ do
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-no-thread*) optMpiThreads=disable ;;
|
||||
-thread*) optMpiThreads=enable ;;
|
||||
|
||||
openmpi-[0-9]* | openmpi_[0-9]* | openmpi-system )
|
||||
mpiPACKAGE="${1%%/}"
|
||||
@ -136,10 +143,10 @@ MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
|
||||
|
||||
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.so" ]
|
||||
then
|
||||
echo "Already has shared library"
|
||||
echo "Already has shared library: $MPI_ARCH_PATH"
|
||||
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
then
|
||||
echo "Already has static library"
|
||||
echo "Already has static library: $MPI_ARCH_PATH"
|
||||
else
|
||||
echo "Starting build: $WM_MPLIB ($mpiPACKAGE)"
|
||||
echo
|
||||
@ -157,6 +164,12 @@ else
|
||||
configOpt="$configOpt --with-verbs=$ibDir --with-verbs-lib=$ibLib"
|
||||
fi
|
||||
|
||||
# Explicitly enable/disable multiple mpi threads
|
||||
if [ -n "$optMpiThreads" ]
|
||||
then
|
||||
configOpt="$configOpt -${optMpiThreads}-mpi-thread-multiple"
|
||||
fi
|
||||
|
||||
# end of configuration options
|
||||
# ----------------------------
|
||||
|
||||
@ -178,7 +191,6 @@ else
|
||||
--disable-orterun-prefix-by-default \
|
||||
--enable-shared --disable-static \
|
||||
--enable-mpi-fortran=none \
|
||||
--disable-mpi-profile \
|
||||
$configOpt \
|
||||
&& set +x \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
|
||||
Reference in New Issue
Block a user