diff --git a/CHANGELOG.md b/CHANGELOG.md index b5ac4b48e6856cd9b93b4cc0484f463308bbd1b0..4da69e8fd1d0837e27af0eebc11e1b896994ee0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Log of backward compatibility changes and critical bugs + +## 2022-06-24 Test in configure.sh for Lapack and BLAS + +Author : J.S.E. Portela
+Merge request !145 + +## 2022-MM-DD Write parameters to HDF5 file + ## 2022-06-13 Work-around for (likely) preprocessor bug Author : J.Schwab
diff --git a/configure.sh b/configure.sh index dd4380fe5f10e65901aa5d7208a84143b3c088d6..03b0a008aa744179074bdeca7a9de828f2697508 100755 --- a/configure.sh +++ b/configure.sh @@ -67,17 +67,21 @@ set_hdf5_flags() check_libs() { FC="$1" LIBS="$2" - COMPILE="$FC check_libs.f90 $LIBS -o check_libs.out" - if command -v "$FC" > /dev/null; then # Calling the compiler is successful - if $COMPILE; then # Compiling with $LIBS is successful - ./check_libs.out - else - printf "${RED}\n==== Error: Linear algebra libraries <%s> not found. ====${NC}\n\n" "$LIBS" - return 1 - fi + if command -v "$FC" > /dev/null; then # Compiler binary found + sh -c "$FC check_libs.f90 $LIBS -o check_libs.out" + if [ $? -eq 0 ]; then # Compiling with $LIBS is successful + ./check_libs.out || ( + printf "${RED}\n==== Error: Execution of test program using compiler <%s> ====${NC}\n" "$FC" + printf "${RED}==== and linear algebra libraries <%s> not successful. ====${NC}\n\n" "$LIBS" + return 1 + ) + else + printf "${RED}\n==== Error: Linear algebra libraries <%s> not found. ====${NC}\n\n" "$LIBS" + return 1 + fi else - printf "${RED}\n==== Error: Compiler <%s> not found. ====${NC}\n\n" "$FC" - return 1 + printf "${RED}\n==== Error: Compiler <%s> not found. ====${NC}\n\n" "$FC" + return 1 fi } @@ -327,7 +331,7 @@ case $MACHINE in ;; esac -# check_libs "$ALF_FC" "${LIB_BLAS_LAPACK}" || return 1 +check_libs "$ALF_FC" "${LIB_BLAS_LAPACK}" || return 1 check_python || return 1