Commit d9bde977 authored by Jefferson Stafusa E. Portela's avatar Jefferson Stafusa E. Portela
Browse files

Merge branch...

Merge branch '219-add-a-test-to-configure-sh-on-whether-the-lapack-and-blas-libraries-are-found' into 'master'

Resolve "Add a test to configure.sh on whether the Lapack and blas libraries are found"

Closes #219

See merge request !145
parents 8c242f64 0afde740
Pipeline #15676 passed with stages
in 41 minutes and 31 seconds
# Log of backward compatibility changes and critical bugs
## 2022-06-24 Test in configure.sh for Lapack and BLAS
Author : J.S.E. Portela <br>
Merge request !145
## 2022-MM-DD Write parameters to HDF5 file
## 2022-06-13 Work-around for (likely) preprocessor bug
Author : J.Schwab <br>
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment