Skip to content

Commit

Permalink
Add logic to build_all.sh script to default to Intel classic
Browse files Browse the repository at this point in the history
if Intel LLVM is not available.

Fixes ufs-community#879.
  • Loading branch information
GeorgeGayno-NOAA committed Oct 25, 2024
1 parent 8ae6efa commit 4c6d932
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ source "${DIR_ROOT}/sorc/machine-setup.sh"

# User Options
target=${target:-"NULL"}
compiler=${compiler:-"intelllvm"}
compiler=${compiler:-"intelllvm"} # If IntelLLVM is not available on the machine, will
# default to Intel classic.

if [[ "$target" == "linux.*" || "$target" == "macosx.*" ]]; then
unset -f module
Expand All @@ -29,6 +30,14 @@ if [[ "$target" == "linux.*" || "$target" == "macosx.*" ]]; then
else
set +x
module use "${DIR_ROOT}/modulefiles"
if [[ "$compiler" == "intelllvm" ]]; then
if [[ ! -f ${DIR_ROOT}/modulefiles/build.$target.$compiler ]];then
set +x
echo "IntelLLVM not available. Will use Intel Classic."
set -x
compiler=intel
fi
fi
module load "build.$target.$compiler" > /dev/null
module list
set -x
Expand Down

0 comments on commit 4c6d932

Please sign in to comment.