Skip to content

Commit 3740b28

Browse files
committed
Fix MPI include path for Ubuntu
1 parent 3a3e92b commit 3740b28

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

auto_hpl/build_run_hpl.sh

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -505,17 +505,24 @@ build_hpl()
505505
cd hpl-$HPL_VER
506506

507507
# Determine architecture-specific MPI include path
508-
case "$arch" in
509-
x86_64)
510-
mpi_inc="/usr/include/openmpi-x86_64"
511-
;;
512-
aarch64)
513-
mpi_inc="/usr/include/openmpi-aarch64"
514-
;;
515-
*)
516-
mpi_inc="/usr/include/openmpi"
517-
;;
518-
esac
508+
os=$(get_os)
509+
if [[ "$os" == "ubuntu" ]]; then
510+
# Ubuntu uses lib path for MPI includes
511+
mpi_inc="/usr/lib/x86_64-linux-gnu/openmpi/include"
512+
else
513+
# RHEL, Amazon Linux, SLES use include path
514+
case "$arch" in
515+
x86_64)
516+
mpi_inc="/usr/include/openmpi-x86_64"
517+
;;
518+
aarch64)
519+
mpi_inc="/usr/include/openmpi-aarch64"
520+
;;
521+
*)
522+
mpi_inc="/usr/include/openmpi"
523+
;;
524+
esac
525+
fi
519526

520527
# Choose base template makefile and set BLAS library name
521528
if [[ "$blaslib" == *"MKL"* ]]; then

0 commit comments

Comments
 (0)