Skip to content

Commit

Permalink
Use lower case when specifying compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanBryan51 committed Mar 12, 2024
1 parent 8b6246a commit 3a56781
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,20 @@ while [ $# -gt 0 ]; do
done

if hostname -f | grep gadi.nci.org.au > /dev/null; then
: "${compiler:=Intel}"
: "${compiler:=intel}"

. /etc/bashrc
module purge
module add cmake/3.24.2
module add netcdf/4.6.3
case ${compiler} in
Intel)
intel)
module add intel-compiler/2019.5.281
compiler_lib_install_dir=Intel
;;
GNU)
gnu)
module add gcc/13.2.0
compiler_lib_install_dir=GNU
;;
?*)
echo -e "\nError: compiler ${compiler} is not supported.\n"
Expand All @@ -85,7 +87,7 @@ if hostname -f | grep gadi.nci.org.au > /dev/null; then

# This is required so that the netcdf-fortran library is discoverable by
# pkg-config:
prepend_path PKG_CONFIG_PATH "${NETCDF_BASE}/lib/${compiler}/pkgconfig"
prepend_path PKG_CONFIG_PATH "${NETCDF_BASE}/lib/${compiler_lib_install_dir}/pkgconfig"

if [[ -n $mpi ]]; then
module add intel-mpi/2019.5.281
Expand All @@ -94,7 +96,7 @@ if hostname -f | grep gadi.nci.org.au > /dev/null; then
if module is-loaded openmpi; then
# This is required so that the openmpi MPI libraries are discoverable
# via CMake's `find_package` mechanism:
prepend_path CMAKE_PREFIX_PATH "${OPENMPI_BASE}/include/${compiler}"
prepend_path CMAKE_PREFIX_PATH "${OPENMPI_BASE}/include/${compiler_lib_install_dir}"
fi
fi

Expand Down

0 comments on commit 3a56781

Please sign in to comment.