Skip to content

Commit 6f90cb9

Browse files
author
Damian Rouson
authored
Merge pull request #372 from sourceryinstitute/issue-355-upgrade-mpich
Issue 355 upgrade mpich
2 parents 7bafa13 + a66121a commit 6f90cb9

File tree

11 files changed

+30
-15
lines changed

11 files changed

+30
-15
lines changed

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ acceptable prerequisite or reaching the end of a branch.
199199
```text
200200
opencoarrays
201201
├── cmake-3.4.0
202-
└── mpich-3.1.4
202+
└── mpich-3.2
203203
└── gcc-6.1.0
204204
├── flex-2.6.0
205205
│   └── bison-3.0.4

doc/dependency_tree/opencoarrays-tree.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
opencoarrays
22
├── cmake-3.4.0
3-
└── mpich-3.1.4
3+
└── mpich-3.2
44
└── gcc-6.1.0
55
├── flex-2.6.0
66
│   └── bison-3.0.4

prerequisites/build-functions/build_and_install.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Make the build directory, configure, and build
22
# shellcheck disable=SC2154
33

4-
source ${OPENCOARRAYS_SRC_DIR}/prerequisites/build-functions/edit_GCC_download_prereqs_file_if_necessary.sh
4+
# shellcheck source=prerequisites/build-functions/edit_GCC_download_prereqs_file_if_necessary.sh
5+
source "${OPENCOARRAYS_SRC_DIR}/prerequisites/build-functions/edit_GCC_download_prereqs_file_if_necessary.sh"
56

67
build_and_install()
78
{
@@ -20,6 +21,12 @@ build_and_install()
2021

2122
if [[ "${package_to_build}" != "gcc" ]]; then
2223

24+
if [[ "${package_to_build}" == "mpich" && "${version_to_build}" == "3.2" ]]; then
25+
info "Patching MPICH 3.2 on Mac OS due to segfault bug (see http://lists.mpich.org/pipermail/discuss/2016-May/004764.html)."
26+
sed 's/} MPID_Request ATTRIBUTE((__aligned__(32)));/} ATTRIBUTE((__aligned__(32))) MPID_Request;/g' \
27+
"${download_path}/${package_source_directory}/src/include/mpiimpl.h"
28+
fi
29+
2330
info "Configuring ${package_to_build} ${version_to_build} with the following command:"
2431
info "FC=\"${FC:-'gfortran'}\" CC=\"${CC:-'gcc'}\" CXX=\"${CXX:-'g++'}\" \"${download_path}/${package_source_directory}\"/configure --prefix=\"${install_path}\""
2532
FC="${FC:-'gfortran'}" CC="${CC:-'gcc'}" CXX="${CXX:-'g++'}" "${download_path}/${package_source_directory}"/configure --prefix="${install_path}"

prerequisites/build-functions/edit_GCC_download_prereqs_file_if_necessary.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ replace_wget()
1414
sed -i${backup_extension} -e '2 a\'$'\n'". ${OPENCOARRAYS_SRC_DIR}/prerequisites/build-functions/ftp_url.sh"$'\n' "${download_prereqs_file}"
1515
fi
1616

17-
arg_string="${gcc_prereqs_fetch_args[@]:-}"
17+
arg_string="${gcc_prereqs_fetch_args[*]:-}"
1818

1919
info "Using the following command to replace wget in the GCC download_prerequisites file:"
2020
info "sed -i${backup_extension} s/\"${wget_command}\"/\"${gcc_prereqs_fetch} ${arg_string} \"/ \"${download_prereqs_file}\""
@@ -31,7 +31,7 @@ edit_GCC_download_prereqs_file_if_necessary()
3131
download_prereqs_file="${PWD}/contrib/download_prerequisites"
3232

3333
# Grab the line with the first occurence of 'wget'
34-
wget_line=`grep wget "${download_prereqs_file}" | head -1` || true
34+
wget_line=$(grep wget "${download_prereqs_file}" | head -1) || true
3535
wget_command="${wget_line%%ftp*}" # grab everything before ftp
3636

3737
# Check for wget format used before GCC 7

prerequisites/build-functions/set_or_print_default_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ set_or_print_default_version()
2828
package_version=(
2929
"cmake:3.4.0"
3030
"gcc:6.1.0"
31-
"mpich:3.1.4"
31+
"mpich:3.2"
3232
"wget:1.16.3"
3333
"flex:2.6.0"
3434
"bison:3.0.4"

prerequisites/install-functions/print_header.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ print_header()
44
clear
55
echo ""
66
echo "*** By default, building OpenCoarrays requires CMake 3.4.0 or later, ***"
7-
echo "*** MPICH 3.1.4, and GCC Fortran (gfortran) 6.1.0 or later. To see ***"
7+
echo "*** MPICH 3.2, and GCC Fortran (gfortran) 6.1.0 or later. To see ***"
88
echo "*** options for forcing the use of older or alternative packages, execute ***"
99
echo "*** this script with the -h flag. This script will recursively traverse ***"
1010
echo "*** the following dependency tree, asking permission to download, build, ***"

0 commit comments

Comments
 (0)