Skip to content

Commit

Permalink
Add and modify module files to compile GSI-utils on AWS (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuang-jedi committed Apr 26, 2024
1 parent 68bc14d commit 5202138
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
25 changes: 25 additions & 0 deletions modulefiles/gsiutils_noaacloud.intel.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
help([[
GSI utilities environment on NOAA Cloud with Intel Compilers
]])

prepend_path("MODULEPATH", "/contrib/spack-stack/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/contrib/spack-stack/spack-stack-1.6.0/envs/gsi-addon-env/install/modulefiles/Core")

local stack_python_ver=os.getenv("python_ver") or "3.11.6"
local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.3.0"
local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.3.0"
local cmake_ver=os.getenv("cmake_ver") or "3.23.1"
local prod_util_ver=os.getenv("prod_util_ver") or "2.1.1"

load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))
load(pathJoin("python", stack_python_ver))
load(pathJoin("cmake", cmake_ver))

load("gsiutils_common")
load(pathJoin("prod_util", prod_util_ver))

pushenv("CFLAGS", "-xHOST")
pushenv("FFLAGS", "-xHOST")

whatis("Description: GSI utilities environment on NOAA Cloud with Intel Compilers")
7 changes: 7 additions & 0 deletions ush/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ elif [[ $MACHINE_ID = discover* ]]; then
export PATH=$PATH:$SPACK_ROOT/bin
. $SPACK_ROOT/share/spack/setup-env.sh

elif [[ $MACHINE_ID = noaacloud* ]]; then
# We are on NOAA Cloud
if ( ! eval module help > /dev/null 2>&1 ) ; then
source /apps/lmod/8.5.2/init/bash
fi
module purge

else
echo WARNING: UNKNOWN PLATFORM 1>&2
fi

0 comments on commit 5202138

Please sign in to comment.