Skip to content

Commit

Permalink
updates for container
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-a-potts committed Oct 23, 2024
1 parent f82165c commit 4f8b5fd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
16 changes: 16 additions & 0 deletions modulefiles/container.intel.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
help([[
]])

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

local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.10.0"
local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.12.2"
local cmake_ver=os.getenv("cmake_ver") or "3.27.9"

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 using a container with Intel Compilers")
5 changes: 4 additions & 1 deletion ush/detect_machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ 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 [[ -d /opt/spack-stack ]]; then
# We are in a container
MACHINE_ID=container
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 @@ -22,6 +22,13 @@ elif [[ $MACHINE_ID = orion* ]] ; then
fi
module purge

elif [[ $MACHINE_ID = container* ]] ; then
# We are in a container
if ( ! eval module help > /dev/null 2>&1 ) ; then
source /usr/lmod/lmod/init/bash
fi
module purge

elif [[ $MACHINE_ID = hercules* ]] ; then
# We are on Hercules
if ( ! eval module help > /dev/null 2>&1 ) ; then
Expand Down

0 comments on commit 4f8b5fd

Please sign in to comment.