Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions modulefiles/gsiutils_aws-ec2.intel.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
help([[
GSI utilities environment on AWS ec2 with Intel Compilers
]])

prepend_path("MODULEPATH", "/opt/spack-stack/envs/ue-oneapi-2024.2.1/install/modulefiles/Core")
prepend_path("MODULEPATH", "/opt/modulefiles")

stack_oneapi_ver=os.getenv("stack_oneapi_ver") or "2024.2.1"
stack_impi_ver=os.getenv("stack_impi_ver") or "2021.13"
cmake_ver=os.getenv("cmake_ver") or "3.27.9"

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

load("gsiutils_common")

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

whatis("Description: GSI utilities environment on AWS ec2 with Intel Compilers")
10 changes: 9 additions & 1 deletion ush/detect_machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ case $(hostname -f) in

s4-submit.ssec.wisc.edu) MACHINE_ID=s4 ;; ### s4

ip-*) MACHINE_ID=aws-ec2 ;; ### aws-ec2
compute-dy-*) MACHINE_ID=aws-ec2 ;; ### aws-ec2
processing-dy-*) MACHINE_ID=aws-ec2 ;; ### aws-ec2

fe[1-8]) MACHINE_ID=jet ;; ### jet01-8
tfe[12]) MACHINE_ID=jet ;; ### tjet1-2

Expand Down Expand Up @@ -76,7 +80,11 @@ if [[ "${MACHINE_ID}" != "UNKNOWN" ]]; then
fi

# Try searching based on paths since hostname may not match on compute nodes
if [[ -d /lfs/h3 ]]; then
if [[ -v SINGULARITY_NAME ]]; then
MACHINE_ID=container
elif [[ -d /opt/spack-stack && -d /lustre ]]; then
MACHINE_ID=aws-ec2
elif [[ -d /lfs/h3 ]]; then
# We are on NOAA Cactus or Dogwood
MACHINE_ID=wcoss2
elif [[ -d /lfs/h1 && ! -d /lfs/h3 ]]; then
Expand Down
7 changes: 7 additions & 0 deletions ush/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ if [[ $MACHINE_ID = jet* ]] ; then
source /apps/lmod/lmod/init/bash
fi
module purge

elif [[ $MACHINE_ID = container* ]] ; then
source /usr/lmod/lmod/init/bash
module purge

elif [[ $MACHINE_ID = aws-ec2* ]] ; then
if ( ! eval module help > /dev/null 2>&1 ) ; then
source /usr/share/lmod/lmod/init/bash
fi
module purge

elif [[ $MACHINE_ID = hera* || $MACHINE_ID = ursa* ]] ; then
# We are on NOAA Hera or Ursa
if ( ! eval module help > /dev/null 2>&1 ) ; then
Expand Down
Loading