mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
COMP: update makeMPICH for mpich-3.2
- not necessarily supported by OpenFOAM, but at least the build script works again, and the build is now out-of-source.
This commit is contained in:
74
makeMPICH
74
makeMPICH
@ -36,13 +36,13 @@ if [ "$1" = "-test" ]
|
|||||||
then
|
then
|
||||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||||
dir="$2" # <- MPI_ARCH_PATH
|
dir="$2" # <- MPI_ARCH_PATH
|
||||||
if [ -r "$dir/lib/libmpich.so" ]
|
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpich.so" ]
|
||||||
then
|
then
|
||||||
echo "Have mpich shared library"
|
echo "Have mpich shared library (${dir##*/})"
|
||||||
exit 0
|
exit 0
|
||||||
elif [ -r "$dir/lib/libmpich.a" ]
|
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpich.a" ]
|
||||||
then
|
then
|
||||||
echo "Have mpich static library"
|
echo "Have mpich static library (${dir##*/})"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "No mpich libraries found: ${dir:-not-specified}"
|
echo "No mpich libraries found: ${dir:-not-specified}"
|
||||||
@ -145,51 +145,35 @@ else
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
(
|
(
|
||||||
# WARNING: unmaintained build code:
|
# configuration options:
|
||||||
# ---------------------------------
|
unset configOpt
|
||||||
|
# end of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
|
||||||
cd $MPI_SOURCE_DIR || exit 1
|
cd $MPI_SOURCE_DIR || exit 1
|
||||||
|
[ -e Makefile ] && make distclean 2>/dev/null
|
||||||
|
|
||||||
|
rm -rf $MPI_ARCH_PATH
|
||||||
|
rm -rf $buildDIR
|
||||||
|
mkdir -p $buildDIR
|
||||||
|
cd $buildDIR
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
[ -e Makefile ] && make distclean 2>/dev/null
|
$MPI_SOURCE_DIR/configure \
|
||||||
rm -rf $MPI_ARCH_PATH
|
|
||||||
rm -rf util/machines/machines.*
|
|
||||||
|
|
||||||
./configure \
|
|
||||||
--prefix=$MPI_ARCH_PATH \
|
--prefix=$MPI_ARCH_PATH \
|
||||||
--without-mpe \
|
--disable-fortran --disable-g \
|
||||||
--disable-f77 --disable-f90 --disable-f90modules \
|
--libdir=$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
||||||
--disable-debug --disable-mpedbg --disable-devdebug \
|
--enable-shared --disable-static \
|
||||||
--enable-sharedlib=$MPI_ARCH_PATH/lib \
|
$configOpt \
|
||||||
--with-device=ch_p4 \
|
&& set +x \
|
||||||
;
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install \
|
||||||
# For MPICH2 below 1.5a1 uncomment this line and comment next
|
&& echo "Built: $mpiPACKAGE" \
|
||||||
# make && make install
|
&& pkgconfigAdjust $MPI_ARCH_PATH
|
||||||
|
) || {
|
||||||
# For MPICH2 1.5a1 or above
|
echo "Error building: $mpiPACKAGE"
|
||||||
make -j $WM_NCOMPPROCS && make install
|
exit 1
|
||||||
|
}
|
||||||
make distclean
|
|
||||||
|
|
||||||
if [ -r $MPI_ARCH_PATH ]
|
|
||||||
then
|
|
||||||
cd $MPI_ARCH_PATH/bin
|
|
||||||
for file in *
|
|
||||||
do
|
|
||||||
sed s%$MPI_ARCH_PATH%'$MPI_ARCH_PATH'%g $file > temp.$$
|
|
||||||
mv temp.$$ $file
|
|
||||||
chmod 0755 $file
|
|
||||||
done
|
|
||||||
|
|
||||||
cd $MPI_ARCH_PATH/lib
|
|
||||||
|
|
||||||
if [ -r libmpich.so.1.0 ]
|
|
||||||
then
|
|
||||||
rm *.so
|
|
||||||
ln -s libmpich.so.1.0 libmpich.so
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user