mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
ENH: out-of-source build for openmpi
- update openmpi infiniband config options
This commit is contained in:
58
Allwmake
58
Allwmake
@ -61,7 +61,7 @@ echo
|
||||
|
||||
echo ========================================
|
||||
echo Build MPI libraries if required
|
||||
echo
|
||||
echo " $MPI_ARCH_PATH"
|
||||
case "$WM_MPLIB" in
|
||||
OPENMPI)
|
||||
if [ -r $MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH}/libmpi.so ]
|
||||
@ -74,24 +74,34 @@ OPENMPI)
|
||||
echo
|
||||
else
|
||||
(
|
||||
set -x
|
||||
cd "${MPI_ARCH_PATH##*/}" || exit 1 # change to openmpi-VERSION
|
||||
|
||||
[ -e Makefile ] && make distclean 2>/dev/null
|
||||
rm -rf $MPI_ARCH_PATH
|
||||
|
||||
# start with GridEngine support,
|
||||
# it can be built without external libraries
|
||||
# configuration options:
|
||||
# Start with GridEngine support - builds without external libraries
|
||||
configOpt="--with-sge"
|
||||
|
||||
# Infiniband support
|
||||
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
|
||||
# then
|
||||
# configOpt="$configOpt --with-openib=/usr/local/ofed"
|
||||
# configOpt="$configOpt --with-openib-libdir=/usr/local/ofed/lib64"
|
||||
# fi
|
||||
# Add InfiniBand support
|
||||
ibDir=/usr/local/ofed
|
||||
ibLib=$infbDIR/lib${WM_COMPILER_LIB_ARCH}
|
||||
if [ -d "$ibDir" -a -d "$ibLib" ]
|
||||
then
|
||||
configOpt="$configOpt --with-verbs=$ibDir --with-verbs-lib=$ibLib"
|
||||
fi
|
||||
|
||||
./configure \
|
||||
# end of configuration options
|
||||
# ----------------------------
|
||||
mpiPACKAGE="${MPI_ARCH_PATH##*/}"
|
||||
sourceDIR=$WM_THIRD_PARTY_DIR/$mpiPACKAGE
|
||||
buildDIR=$buildBASE/$mpiPACKAGE
|
||||
|
||||
cd $sourceDIR || exit 1
|
||||
[ -e Makefile ] && make distclean 2>/dev/null
|
||||
|
||||
rm -rf $MPI_ARCH_PATH
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
|
||||
set -x
|
||||
$sourceDIR/configure \
|
||||
--prefix=$MPI_ARCH_PATH \
|
||||
--disable-orterun-prefix-by-default \
|
||||
--enable-shared --disable-static \
|
||||
@ -99,11 +109,13 @@ OPENMPI)
|
||||
--enable-mpi-fortran=none \
|
||||
--disable-mpi-profile \
|
||||
$configOpt \
|
||||
;
|
||||
|
||||
make -j $WM_NCOMPPROCS && make install
|
||||
make distclean
|
||||
)
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built: $mpiPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $mpiPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
;;
|
||||
|
||||
@ -118,12 +130,14 @@ MPICH)
|
||||
echo
|
||||
else
|
||||
(
|
||||
# WARNING: unmaintained build code:
|
||||
# ---------------------------------
|
||||
set -x
|
||||
cd $MPI_HOME || exit 1 # change to mpich-VERSION
|
||||
|
||||
[ -e Makefile ] && make distclean 2>/dev/null
|
||||
rm -rf $MPI_ARCH_PATH
|
||||
rm util/machines/machines.*
|
||||
rm -rf util/machines/machines.*
|
||||
|
||||
./configure \
|
||||
--prefix=$MPI_ARCH_PATH \
|
||||
|
||||
Reference in New Issue
Block a user