Commit 5d592841 authored by mark's avatar mark
Browse files

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.
parent 493d4b01
......@@ -36,13 +36,13 @@ if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="$2" # <- MPI_ARCH_PATH
if [ -r "$dir/lib/libmpich.so" ]
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpich.so" ]
then
echo "Have mpich shared library"
echo "Have mpich shared library (${dir##*/})"
exit 0
elif [ -r "$dir/lib/libmpich.a" ]
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpich.a" ]
then
echo "Have mpich static library"
echo "Have mpich static library (${dir##*/})"
exit 0
else
echo "No mpich libraries found: ${dir:-not-specified}"
......@@ -145,51 +145,35 @@ else
echo
(
# WARNING: unmaintained build code:
# ---------------------------------
cd $MPI_SOURCE_DIR || exit 1
# configuration options:
unset configOpt
# end of configuration options
# ----------------------------
set -x
cd $MPI_SOURCE_DIR || exit 1
[ -e Makefile ] && make distclean 2>/dev/null
rm -rf $MPI_ARCH_PATH
rm -rf util/machines/machines.*
rm -rf $buildDIR
mkdir -p $buildDIR
cd $buildDIR
./configure \
set -x
$MPI_SOURCE_DIR/configure \
--prefix=$MPI_ARCH_PATH \
--without-mpe \
--disable-f77 --disable-f90 --disable-f90modules \
--disable-debug --disable-mpedbg --disable-devdebug \
--enable-sharedlib=$MPI_ARCH_PATH/lib \
--with-device=ch_p4 \
;
# For MPICH2 below 1.5a1 uncomment this line and comment next
# make && make install
# For MPICH2 1.5a1 or above
make -j $WM_NCOMPPROCS && make install
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
)
--disable-fortran --disable-g \
--libdir=$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
--enable-shared --disable-static \
$configOpt \
&& set +x \
&& make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: $mpiPACKAGE" \
&& pkgconfigAdjust $MPI_ARCH_PATH
) || {
echo "Error building: $mpiPACKAGE"
exit 1
}
fi
#------------------------------------------------------------------------------
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment