Skip to content

Commit c374b03

Browse files
committed
Fix abort in install.sh when using system MPICH
1 parent b6d30a8 commit c374b03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

prerequisites/install-functions/build_opencoarrays.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ build_opencoarrays()
2323
# Set CC to the MPI implementation's gcc command...
2424
CC="${MPICC_show[0]}"
2525
# try to find mpiexec
26-
MPIEXEC_CANDIDATES=($(find "${MPICC%/*}" -name 'mpiexec' -o -name 'mpirun' -o -name 'lamexec' -o -name 'srun'))
26+
MPI_BIN_DIR="$(type -P "${MPICC}")"
27+
MPIEXEC_CANDIDATES=($(find "${MPI_BIN_DIR%/*}" -name 'mpiexec' -o -name 'mpirun' -o -name 'lamexec' -o -name 'srun'))
2728
if ! ((${#MPIEXEC_CANDIDATES[@]} >= 1)); then
2829
emergency "Could not find a suitable \`mpiexec\` in directory containing mpi wrappers (${MPICC%/*})"
2930
else

0 commit comments

Comments
 (0)