Skip to content

Commit

Permalink
Add and modify module files to compile on AWS (#136)
Browse files Browse the repository at this point in the history
* changes for AWS

* minor word correction

* Remove perl define, as it is unloaded, and unused.
  • Loading branch information
weihuang-jedi authored Apr 26, 2024
1 parent f9d6f5f commit f298c9f
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
18 changes: 18 additions & 0 deletions modulefiles/noaacloud-run.intel.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
help([[
]])

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

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 grads_ver=os.getenv("grads_ver") or "2.2.3"
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("grads", grads_ver))
load(pathJoin("prod_util", prod_util_ver))

load("common-run")

whatis("Description: GSI Monitoring run-time environment on NOAA Cloud Intel compiler")
16 changes: 16 additions & 0 deletions modulefiles/noaacloud.intel.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
help([[
]])

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

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"

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

load("common")

whatis("Description: GSI Monitoring 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 @@ -98,6 +98,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 f298c9f

Please sign in to comment.