diff --git a/build.bash b/build.bash index 703bb7acb..7ee4cd7fd 100755 --- a/build.bash +++ b/build.bash @@ -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" @@ -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 @@ -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