Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d24eeee
feature/use_container_stack-stack-1.6.0
weihuang-jedi Apr 9, 2025
b92a89a
fix detect issue in container
weihuang-jedi Apr 14, 2025
8c5ddf8
Merge branch 'develop' of github.com:NOAA-EPIC/ufs-weather-model into…
weihuang-jedi Apr 14, 2025
c8a052f
over-write machine_id if in container
weihuang-jedi Apr 15, 2025
384475b
for container compiled with read-only
weihuang-jedi May 9, 2025
97953d3
Merge branch 'ufs-community:develop' into feature/use_container_stack…
weihuang-jedi May 14, 2025
24f3707
Merge branch 'ufs-community:develop' into feature/use_container_stack…
weihuang-jedi May 21, 2025
3f0d783
remove extra module path
weihuang-jedi Jun 13, 2025
6d08f08
Merge branch 'ufs-community:develop' into feature/use_container_stack…
weihuang-jedi Jun 13, 2025
099fc8d
consistent with ufs_utils/gfs_utils/upp
weihuang-jedi Jun 13, 2025
baee104
Merge branch 'feature/use_container_stack-stack-1.6.0' of github.com:…
weihuang-jedi Jun 13, 2025
b632ae7
Merge branch 'ufs-community:develop' into feature/use_container_stack…
weihuang-jedi Jun 23, 2025
3df4912
Merge branch 'ufs-community:develop' into feature/use_container_stack…
weihuang-jedi Jul 8, 2025
c116d9b
Merge branch 'ufs-community:develop' into feature/use_container_stack…
weihuang-jedi Jul 9, 2025
f4ce9b1
Merge branch 'ufs-community:develop' into feature/use_container_stack…
weihuang-jedi Jul 13, 2025
4053f9a
Merge branch 'develop' of github.com:NOAA-EPIC/ufs-weather-model into…
weihuang-jedi Jul 23, 2025
bdfc61b
save ss192 changes
weihuang-jedi Aug 20, 2025
fae5c0f
Merge remote-tracking branch 'origin/develop' into feature/use_contai…
weihuang-jedi Aug 20, 2025
ce6ab3d
update to ss192
weihuang-jedi Aug 20, 2025
e99fc8b
add gnu to enable scotch
weihuang-jedi Aug 20, 2025
ea50351
sync with emc repo and cleanup
weihuang-jedi Aug 21, 2025
3f40e32
remove unset MODULEPATH
weihuang-jedi Aug 21, 2025
2ec8ebd
Merge branch 'ufs-community:develop' into feature/use_container_spack…
weihuang-jedi Aug 22, 2025
4825ea0
Merge branch 'develop' into feature/use_container_spack-stack-1.9.2
natalie-perlin Aug 29, 2025
d98b7b1
Merge branch 'ufs-community:develop' into feature/use_container_spack…
jkbk2004 Sep 2, 2025
ae22bec
Update module-setup.sh
jkbk2004 Sep 2, 2025
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
31 changes: 31 additions & 0 deletions modulefiles/ufs_container.intel.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
help([[
Load environment to compile ufs-weather-model in a container using Intel
]])

prepend_path("MODULEPATH", "/opt/spack-stack/spack-stack-1.9.2/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/opt/spack-stack/spack-stack-1.9.2/envs/unified-env/install/modulefiles/intel-oneapi-mpi/2021.13-argr3sd/gcc/11.4.0")

stack_oneapi_ver=os.getenv("stack_oneapi_ver") or "2024.2.0"
stack_impi_ver=os.getenv("stack_impi_ver") or "2021.13"

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

cmake_ver=os.getenv("cmake_ver") or "3.27.9"
load(pathJoin("cmake", cmake_ver))

load("ufs_common")

nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1"
load(pathJoin("nccmp", nccmp_ver))

setenv("CC", "mpiicx")
setenv("CXX", "mpiicpx")
setenv("FC", "mpiifort")
setenv("I_MPI_CC", "icx")
setenv("I_MPI_CXX", "icpx")
setenv("I_MPI_F90", "ifort")

setenv("CMAKE_Platform", "container.intel")

whatis("Description: UFS build environment")
3 changes: 3 additions & 0 deletions tests/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ case ${MACHINE_ID} in
fi
if [[ ${MACHINE_ID} == gaeac6 ]]; then
module reset
elif [[ ${MACHINE_ID} == container ]]; then
source /usr/lmod/lmod/init/bash
module purge
elif [[ ${MACHINE_ID} == hercules ]]; then
module purge
fi
Expand Down
15 changes: 15 additions & 0 deletions tests/detect_machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
#
# Thank you for your contribution

# Overwrite auto-detect if in container
if [[ -d /opt/spack-stack && -v SINGULARITY_CONTAINER ]]; then
# We are in a container
MACHINE_ID=container
fi

# If the MACHINE_ID variable is set, skip this script.
[[ -n ${MACHINE_ID:-} ]] && return

Expand Down Expand Up @@ -70,6 +76,12 @@ fi
# Overwrite auto-detect with MACHINE if set
MACHINE_ID=${MACHINE:-${MACHINE_ID}}

# Overwrite auto-detect if in container
if [[ -d /opt/spack-stack && -v SINGULARITY_CONTAINER ]]; then
# We are in a container
MACHINE_ID=container
fi

# If MACHINE_ID is no longer UNKNNOWN, return it
if [[ "${MACHINE_ID}" != "UNKNOWN" ]]; then
return
Expand Down Expand Up @@ -112,6 +124,9 @@ elif [[ -d /gpfs/f6 && -d /ncrc ]]; then
elif [[ -d /data/prod ]]; then
# We are on SSEC's S4
MACHINE_ID=s4
elif [[ -d /opt/spack-stack && -v SINGULARITY_CONTAINER ]]; then
# We are in a container
MACHINE_ID=container
else
echo WARNING: UNKNOWN PLATFORM 1>&2
fi
5 changes: 5 additions & 0 deletions tests/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ elif [[ ${MACHINE_ID} = gaeac6 ]]; then
fi
module reset

elif [[ ${MACHINE_ID} = container ]] ; then
# We are in a container
source /usr/lmod/lmod/init/bash
module purge

elif [[ ${MACHINE_ID} = noaacloud ]] ; then
# We are on NOAA Cloud
module purge
Expand Down