Skip to content

Commit 7be854c

Browse files
committed
repair install_mpich.sh to fix mpich installation
1 parent 4bda3c2 commit 7be854c

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

toolchain/scripts/stage1/install_mpich.sh

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ case "${with_mpich}" in
8181
MPICC="" \
8282
FFLAGS="${FCFLAGS} ${compat_flag}" \
8383
FCFLAGS="${FCFLAGS} ${compat_flag}" \
84+
--without-x \
85+
--enable-gl=no \
8486
--with-device=${MPICH_DEVICE} \
8587
> configure.log 2>&1 || tail -n ${LOG_LINES} configure.log
8688
make -j $(get_nprocs) > make.log 2>&1 || tail -n ${LOG_LINES} make.log
@@ -90,19 +92,19 @@ case "${with_mpich}" in
9092
fi
9193
if [ "${PACK_RUN}" = "__TRUE__" ]; then
9294
echo "--pack-run mode specified, skip system check"
93-
else
94-
check_dir "${pkg_install_dir}/bin"
95-
check_dir "${pkg_install_dir}/lib"
96-
check_dir "${pkg_install_dir}/include"
97-
check_install ${pkg_install_dir}/bin/mpiexec "mpich" && MPIRUN="${pkg_install_dir}/bin/mpiexec" || exit 1
98-
check_install ${pkg_install_dir}/bin/mpicc "mpich" && MPICC="${pkg_install_dir}/bin/mpicc" || exit 1
99-
check_install ${pkg_install_dir}/bin/mpicxx "mpich" && MPICXX="${pkg_install_dir}/bin/mpicxx" || exit 1
100-
check_install ${pkg_install_dir}/bin/mpifort "mpich" && MPIFC="${pkg_install_dir}/bin/mpifort" || exit 1
101-
MPIFORT="${MPIFC}"
102-
MPIF77="${MPIFC}"
103-
MPICH_CFLAGS="-I'${pkg_install_dir}/include'"
104-
MPICH_LDFLAGS="-L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib'"
95+
exit 0
10596
fi
97+
check_dir "${pkg_install_dir}/bin"
98+
check_dir "${pkg_install_dir}/lib"
99+
check_dir "${pkg_install_dir}/include"
100+
check_install ${pkg_install_dir}/bin/mpiexec "mpich" && MPIRUN="${pkg_install_dir}/bin/mpiexec" || exit 1
101+
check_install ${pkg_install_dir}/bin/mpicc "mpich" && MPICC="${pkg_install_dir}/bin/mpicc" || exit 1
102+
check_install ${pkg_install_dir}/bin/mpicxx "mpich" && MPICXX="${pkg_install_dir}/bin/mpicxx" || exit 1
103+
check_install ${pkg_install_dir}/bin/mpifort "mpich" && MPIFC="${pkg_install_dir}/bin/mpifort" || exit 1
104+
MPIFORT="${MPIFC}"
105+
MPIF77="${MPIFC}"
106+
MPICH_CFLAGS="-I'${pkg_install_dir}/include'"
107+
MPICH_LDFLAGS="-L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib'"
106108
;;
107109
__SYSTEM__)
108110
echo "==================== Finding MPICH from system paths ===================="
@@ -176,9 +178,9 @@ EOF
176178
prepend_path PATH "${pkg_install_dir}/bin"
177179
export PATH="${pkg_install_dir}/bin":\${PATH}
178180
export LD_LIBRARY_PATH="${pkg_install_dir}/lib":\${LD_LIBRARY_PATH}
179-
export LD_RUN_PATH "${pkg_install_dir}/lib":\${LD_RUN_PATH}
180-
export LIBRARY_PATH "${pkg_install_dir}/lib":\${LIBRARY_PATH}
181-
export CPATH "${pkg_install_dir}/include":\${CPATH}
181+
export LD_RUN_PATH="${pkg_install_dir}/lib":\${LD_RUN_PATH}
182+
export LIBRARY_PATH="${pkg_install_dir}/lib":\${LIBRARY_PATH}
183+
export CPATH="${pkg_install_dir}/include":\${CPATH}
182184
EOF
183185
fi
184186
cat "${BUILDDIR}/setup_mpich" >> ${SETUPFILE}
@@ -189,6 +191,8 @@ cat << EOF >> ${INSTALLDIR}/lsan.supp
189191
# MPICH 3.3.2 with GCC 10.3.0
190192
leak:MPIR_Find_local_and_external
191193
leak:MPIU_Find_local_and_external
194+
# MPICH 4.2.3
195+
leak:MPL_malloc
192196
EOF
193197

194198
load "${BUILDDIR}/setup_mpich"

0 commit comments

Comments
 (0)