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}
|
mpiPACKAGE=${FOAM_MPI:-openmpi-system}
|
||||||
|
|
||||||
|
# Configure with/without mpi-threads
|
||||||
|
unset optMpiThreads
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -80,6 +83,8 @@ usage() {
|
|||||||
usage: ${0##*/} [OPTION] [openmpi-VERSION]
|
usage: ${0##*/} [OPTION] [openmpi-VERSION]
|
||||||
options:
|
options:
|
||||||
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-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
|
-help
|
||||||
|
|
||||||
* build openmpi with
|
* build openmpi with
|
||||||
@ -100,6 +105,8 @@ do
|
|||||||
'') ;; # Ignore empty
|
'') ;; # Ignore empty
|
||||||
-h | -help) usage ;;
|
-h | -help) usage ;;
|
||||||
-gcc) useGcc ;;
|
-gcc) useGcc ;;
|
||||||
|
-no-thread*) optMpiThreads=disable ;;
|
||||||
|
-thread*) optMpiThreads=enable ;;
|
||||||
|
|
||||||
openmpi-[0-9]* | openmpi_[0-9]* | openmpi-system )
|
openmpi-[0-9]* | openmpi_[0-9]* | openmpi-system )
|
||||||
mpiPACKAGE="${1%%/}"
|
mpiPACKAGE="${1%%/}"
|
||||||
@ -136,10 +143,10 @@ MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
|
|||||||
|
|
||||||
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.so" ]
|
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.so" ]
|
||||||
then
|
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" ]
|
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||||
then
|
then
|
||||||
echo "Already has static library"
|
echo "Already has static library: $MPI_ARCH_PATH"
|
||||||
else
|
else
|
||||||
echo "Starting build: $WM_MPLIB ($mpiPACKAGE)"
|
echo "Starting build: $WM_MPLIB ($mpiPACKAGE)"
|
||||||
echo
|
echo
|
||||||
@ -157,6 +164,12 @@ else
|
|||||||
configOpt="$configOpt --with-verbs=$ibDir --with-verbs-lib=$ibLib"
|
configOpt="$configOpt --with-verbs=$ibDir --with-verbs-lib=$ibLib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Explicitly enable/disable multiple mpi threads
|
||||||
|
if [ -n "$optMpiThreads" ]
|
||||||
|
then
|
||||||
|
configOpt="$configOpt -${optMpiThreads}-mpi-thread-multiple"
|
||||||
|
fi
|
||||||
|
|
||||||
# end of configuration options
|
# end of configuration options
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
|
|
||||||
@ -178,7 +191,6 @@ else
|
|||||||
--disable-orterun-prefix-by-default \
|
--disable-orterun-prefix-by-default \
|
||||||
--enable-shared --disable-static \
|
--enable-shared --disable-static \
|
||||||
--enable-mpi-fortran=none \
|
--enable-mpi-fortran=none \
|
||||||
--disable-mpi-profile \
|
|
||||||
$configOpt \
|
$configOpt \
|
||||||
&& set +x \
|
&& set +x \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
|||||||
Reference in New Issue
Block a user