Skip to content

Commit 3947bdb

Browse files
committed
Apply segfault patch to MPICH 3.2 on OSX
1 parent ade6767 commit 3947bdb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

prerequisites/build-functions/build_and_install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ build_and_install()
2020

2121
if [[ "${package_to_build}" != "gcc" ]]; then
2222

23+
if [[ "${package_to_build}" == "mpich" && "${version_to_build}" == "3.2" && "${OSTYPE}" == "darwin"* ]]; then
24+
info "Patching MPICH 3.2 on Mac OS due to segfault bug."
25+
sed -i '' 's/} MPID_Request ATTRIBUTE((__aligned__(32)));/} ATTRIBUTE((__aligned__(32))) MPID_Request;/g' \
26+
"${download_path}/${package_source_directory}/src/include/mpiimpl.h"
27+
fi
28+
2329
info "Configuring ${package_to_build} ${version_to_build} with the following command:"
2430
info "FC=\"${FC:-'gfortran'}\" CC=\"${CC:-'gcc'}\" CXX=\"${CXX:-'g++'}\" \"${download_path}/${package_source_directory}\"/configure --prefix=\"${install_path}\""
2531
FC="${FC:-'gfortran'}" CC="${CC:-'gcc'}" CXX="${CXX:-'g++'}" "${download_path}/${package_source_directory}"/configure --prefix="${install_path}"

0 commit comments

Comments
 (0)