diff --git a/Build/Scripts/HYPRE/confmake_impi_intel_linux.sh b/Build/Scripts/HYPRE/confmake_impi_intel_linux.sh index 6147986559b..58bd9e910ba 100755 --- a/Build/Scripts/HYPRE/confmake_impi_intel_linux.sh +++ b/Build/Scripts/HYPRE/confmake_impi_intel_linux.sh @@ -1,3 +1,13 @@ -./configure CC=mpiicc FC=mpiifort CFLAGS="-O3 -fno-unsafe-math-optimizations -fp-model=precise" FFLAGS="-O3 -fno-unsafe-math-optimizations -fp-model=precise" \ +# Check for mpiicx or mpiicc +if command -v mpiicx &> /dev/null; then + CC=mpiicx +elif command -v mpiicc &> /dev/null; then + CC=mpiicc +else + echo "Error: Neither mpiicx nor mpiicc is available on this system." + exit 1 +fi + +./configure CC=$CC FC=mpiifort CFLAGS="-O3 -fno-unsafe-math-optimizations -fp-model=precise" FFLAGS="-O3 -fno-unsafe-math-optimizations -fp-model=precise" \ --prefix=$FIREMODELS/libs/hypre/$HYPRE_VERSION make install