Skip to content

Commit d44c97b

Browse files
authored
Merge pull request #1 from zbeekman/issue305
Fixes #306
2 parents b5d2bef + f269bf1 commit d44c97b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

prerequisites/install-functions/build_opencoarrays.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ build_opencoarrays()
1313
if [[ -z ${MPIFC:-} || -z ${MPICC:-} ]]; then
1414
emergency "build_opencoarrays.sh: empty \${MPIFC}=${MPIFC:-} or \${MPICC}=${MPICC:-}"
1515
fi
16-
MPIFC_show=`$MPIFC -show`
17-
MPICC_show=`$MPICC -show`
18-
if [[ ${MPIFC_show} != *gfortran* || ${MPICC_show} != *gcc* ]]; then
19-
emergency "build_opencoarrays.sh: MPI doesn't wrap gfortran/gcc: \${MPIFC_show}=${MPIFC_show}, \${MPICC_show}=${MPICC_show}"
20-
fi
16+
MPIFC_show=($($MPIFC -show))
17+
MPICC_show=($($MPICC -show))
18+
if [[ "${MPIFC_show[0]}" != *gfortran* || "${MPICC_show[0]}" != *gcc* ]]; then
19+
emergency "build_opencoarrays.sh: MPI doesn't wrap gfortran/gcc: \${MPIFC_show}=${MPIFC_show[*]}, \${MPICC_show}=${MPICC_show[*]}"
20+
fi
2121
# Set FC to the MPI implementation's gfortran command with any preceding path but without any subsequent arguments:
22-
FC="${MPIFC_show%%gfortran*}"gfortran
22+
FC="${MPIFC_show[0]}"
2323
# Set CC to the MPI implementation's gcc command...
24-
CC="${MPICC_show%%gcc*}"gcc
24+
CC="${MPICC_show[0]}"
2525
info "Configuring OpenCoarrays in ${PWD} with the command:"
2626
info "CC=\"${CC}\" FC=\"${FC}\" $CMAKE \"${opencoarrays_src_dir}\" -DCMAKE_INSTALL_PREFIX=\"${install_path}\" -DMPI_C_COMPILER=\"${MPICC}\" -DMPI_Fortran_COMPILER=\"${MPIFC}\""
2727
CC="${CC}" FC="${FC}" $CMAKE "${opencoarrays_src_dir}" -DCMAKE_INSTALL_PREFIX="${install_path}" -DMPI_C_COMPILER="${MPICC}" -DMPI_Fortran_COMPILER="${MPIFC}"

0 commit comments

Comments
 (0)