Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[develop] Update modulefiles to use spack-stack unified environment #740

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fc724c6
Update Orion's build modulefile.
ulmononian Mar 22, 2023
9cad1db
More modulefile stuff.
ulmononian Mar 22, 2023
a7da260
Merge branch 'ufs-community:develop' into feature/test_spack_ue
ulmononian Mar 22, 2023
444a035
Modifications to ush scripts to remove calls to miniconda regional_wo…
ulmononian Mar 23, 2023
d33fa98
Remove commented sections from wflow_orion.lua.
ulmononian Mar 23, 2023
2b2df09
Update Externals.cfg
ulmononian Mar 23, 2023
12c0e49
Update Orion and srw_common_spack modulefiles.
ulmononian Mar 24, 2023
1ca58dd
Merge branch 'ufs-community:develop' into feature/test_spack_ue
ulmononian Mar 26, 2023
bf19961
Update Jet modulefiles to use spack-stack.
Mar 26, 2023
fa8893c
Merge branch 'ufs-community:develop' into feature/test_spack_ue
ulmononian Mar 29, 2023
f4c2b2c
Update build_orion_intel.lua
ulmononian Mar 29, 2023
04f4260
Update build_jet_intel.lua
ulmononian Mar 29, 2023
109be11
Update Cheyenne build/wflow modulefiles to use spack-stack UE. Update…
Mar 29, 2023
b6277bd
Merge branch 'ufs-community:develop' into feature/test_spack_ue
ulmononian Mar 30, 2023
4081942
Merge branch 'ufs-community:develop' into feature/test_spack_ue
ulmononian Apr 20, 2023
88d0a9c
Slight tweaks for Orion, Cheyenne, and Jet modulefiles.
ulmononian Apr 21, 2023
3a478f5
Update noaacloud build modulefiles.
ulmononian Apr 21, 2023
d16a091
Update wflow_noaacloud for spack-stack.
ulmononian Apr 21, 2023
b87baa9
Update Hera modulefiles.
ulmononian Apr 21, 2023
59b8b0b
Update build_gaea_intel.lua
ulmononian Apr 28, 2023
cb283d5
Update build_gaea_intel.lua
ulmononian Apr 28, 2023
8a1f463
Update cheyenne compiler vars.
Apr 28, 2023
9ece369
Update cheyenne intel with unload statements.
Apr 28, 2023
acb0813
Update wflow_orion.lua
ulmononian Apr 30, 2023
e2077f6
Update build_macos_gnu.lua
ulmononian Apr 30, 2023
653508d
Update build_linux_gnu.lua
ulmononian Apr 30, 2023
f9bc8c6
Update build_linux_gnu.lua
ulmononian Apr 30, 2023
8086bbe
Update build_macos_gnu.lua
ulmononian Apr 30, 2023
5f44fac
Update build_jet_intel.lua
ulmononian Apr 30, 2023
d44d6f7
Update wflow_gaea.lua
ulmononian Apr 30, 2023
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
47 changes: 21 additions & 26 deletions modulefiles/build_cheyenne_gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,29 @@ the CISL machine Cheyenne using GNU

whatis([===[Loads libraries needed for building the UFS SRW App on Cheyenne ]===])

load(pathJoin("cmake", os.getenv("cmake_ver") or "3.22.0"))
load(pathJoin("ncarenv", os.getenv("ncarenv_ver") or "1.3"))
load(pathJoin("gnu", os.getenv("gnu_ver") or "11.2.0"))
load(pathJoin("mpt", os.getenv("mpt_ver") or "2.25"))
load(pathJoin("python", os.getenv("python_ver") or "3.7.9"))
setenv("MKLROOT", "/glade/u/apps/opt/intel/2022.1/mkl/latest")
load(pathJoin("ncarcompilers", os.getenv("ncarcompilers_ver") or "0.5.0"))
unload("netcdf")

prepend_path("MODULEPATH","/glade/work/epicufsrt/contrib/hpc-stack/gnu11.2.0/modulefiles/stack")
load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))
load(pathJoin("hpc-gnu", os.getenv("hpc_gnu_ver") or "11.2.0"))
load(pathJoin("hpc-mpt", os.getenv("hpc_mpt_ver") or "2.25"))

load("srw_common")

load(pathJoin("g2", os.getenv("g2_ver") or "3.4.5"))
load(pathJoin("esmf", os.getenv("esmf_ver") or "8.3.0b09"))
load(pathJoin("netcdf", os.getenv("netcdf_ver") or "4.7.4"))
load(pathJoin("libpng", os.getenv("libpng_ver") or "1.6.37"))
load(pathJoin("pio", os.getenv("pio_ver") or "2.5.7"))
load(pathJoin("fms", os.getenv("fms_ver") or "2022.04"))
unload("ncarenv/1.3")
unload("intel/19.1.1")
unload("ncarcompilers/0.5.0")
unload("mpt/2.25")
unload("netcdf/4.8.1")

prepend_path("MODULEPATH", "/glade/work/epicufsrt/contrib/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/glade/work/jedipara/cheyenne/spack-stack/modulefiles/misc")

load("stack-gcc/10.1.0")
load("stack-openmpi/4.1.1")
load("stack-python/3.9.12")
load("cmake/3.22.0")


load("srw_common_spack")
load("ufs-pyenv")

setenv("CMAKE_C_COMPILER","mpicc")
setenv("CMAKE_CXX_COMPILER","mpicxx")
setenv("CMAKE_CXX_COMPILER","mpic++")
setenv("CMAKE_Fortran_COMPILER","mpif90")
setenv("CMAKE_Platform","cheyenne.gnu")
setenv("CC", "mpicc")
setenv("CXX", "mpicxx")
setenv("FC", "mpif90")
setenv("CC", "gcc")
setenv("CXX", "g++")
setenv("FC", "gfortran")

41 changes: 17 additions & 24 deletions modulefiles/build_cheyenne_intel.lua
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
help([[
This module loads libraries for building the UFS SRW App on
the CISL machine Cheyenne using Intel-2022.1
the CISL machine Cheyenne using Intel-19.1.1.217
]])

whatis([===[Loads libraries needed for building the UFS SRW App on Cheyenne ]===])

load(pathJoin("cmake", os.getenv("cmake_ver") or "3.22.0"))
load(pathJoin("ncarenv", os.getenv("ncarenv_ver") or "1.3"))
load(pathJoin("intel", os.getenv("intel_ver") or "2022.1"))
load(pathJoin("mpt", os.getenv("mpt_ver") or "2.25"))
load(pathJoin("mkl", os.getenv("mkl_ver") or "2022.1"))
load(pathJoin("python", os.getenv("python_ver") or "3.7.9"))
load(pathJoin("ncarcompilers", os.getenv("ncarcompilers_ver") or "0.5.0"))
unload("netcdf")
unload("ncarenv/1.3")
unload("intel/19.1.1")
unload("ncarcompilers/0.5.0")
unload("mpt/2.25")
unload("netcdf/4.8.1")

prepend_path("MODULEPATH","/glade/work/epicufsrt/contrib/hpc-stack/intel2022.1/modulefiles/stack")
load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))
load(pathJoin("hpc-intel", os.getenv("hpc_intel_ver") or "2022.1"))
load(pathJoin("hpc-mpt", os.getenv("hpc_mpt_ver") or "2.25"))
prepend_path("MODULEPATH","/glade/work/epicufsrt/contrib/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/glade/work/jedipara/cheyenne/spack-stack/modulefiles/misc")

load("srw_common")
load("stack-intel/19.1.1.217")
load("stack-intel-mpi/2019.7.217")
load("stack-python/3.9.12")
load("cmake/3.22.0")

load(pathJoin("g2", os.getenv("g2_ver") or "3.4.5"))
load(pathJoin("esmf", os.getenv("esmf_ver") or "8.3.0b09"))
load(pathJoin("netcdf", os.getenv("netcdf_ver") or "4.7.4"))
load(pathJoin("libpng", os.getenv("libpng_ver") or "1.6.37"))
load(pathJoin("pio", os.getenv("pio_ver") or "2.5.7"))
load(pathJoin("fms", os.getenv("fms_ver") or "2022.04"))
load("srw_common_spack")
load("ufs-pyenv")

setenv("CMAKE_C_COMPILER","mpicc")
setenv("CMAKE_CXX_COMPILER","mpicpc")
setenv("CMAKE_Fortran_COMPILER","mpif90")
setenv("CMAKE_C_COMPILER","mpiicc")
setenv("CMAKE_CXX_COMPILER","mpiicpc")
setenv("CMAKE_Fortran_COMPILER","mpiifort")
setenv("CMAKE_Platform","cheyenne.intel")

27 changes: 16 additions & 11 deletions modulefiles/build_gaea_intel.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
help([[
This module loads libraries for building the UFS SRW App on
the NOAA RDHPC machine Gaea using Intel-2022.1.2
the NOAA RDHPC machine Gaea using Intel-2021.3.0.
]])

whatis([===[Loads libraries needed for building the UFS SRW App on Gaea ]===])

load(pathJoin("cmake", os.getenv("cmake_ver") or "3.20.1"))
unload("intel")
unload("cray-mpich")
unload("cray-python")
unload("darshan")

prepend_path("MODULEPATH","/lustre/f2/dev/role.epic/contrib/hpc-stack/intel-2021.3.0_noarch/modulefiles/stack")
load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))
load(pathJoin("intel", os.getenv("intel_ver") or "2021.3.0"))
load(pathJoin("hpc-intel", os.getenv("hpc_intel_ver") or "2021.3.0"))
load(pathJoin("hpc-cray-mpich", os.getenv("hpc_cray_mpich_ver") or "7.7.11"))
load(pathJoin("gcc", os.getenv("gcc_ver") or "8.3.0"))
load(pathJoin("libpng", os.getenv("libpng_ver") or "1.6.37"))
prepend_path("MODULEPATH", "/lustre/f2/dev/wpo/role.epic/contrib/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/lustre/f2/pdata/esrl/gsd/spack-stack/modulefiles")

load("srw_common")
load("stack-intel/2021.3.0")
load("stack-cray-mpich/7.7.11")
load("stack-python/3.9.12")
load("cmake/3.23.1")

load("srw_common_spack")
load("ufs-pyenv")

load("gcc/8.3.0")

setenv("CC","cc")
setenv("FC","ftn")
Expand All @@ -24,4 +30,3 @@ setenv("CMAKE_C_COMPILER","cc")
setenv("CMAKE_CXX_COMPILER","CC")
setenv("CMAKE_Fortran_COMPILER","ftn")
setenv("CMAKE_Platform","gaea.intel")

25 changes: 10 additions & 15 deletions modulefiles/build_hera_gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,19 @@ the NOAA RDHPC machine Hera using GNU 9.2.0

whatis([===[Loads libraries needed for building the UFS SRW App on Hera using GNU 9.2.0 ]===])

prepend_path("MODULEPATH","/contrib/sutils/modulefiles")
load("sutils")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")

load(pathJoin("cmake", os.getenv("cmake_ver") or "3.20.1"))
load("stack-gcc/9.2.0")
load("stack-openmpi/3.1.4")
load("stack-python/3.9.12")
load("cmake/3.23.1")

gnu_ver=os.getenv("gnu_ver") or "9.2.0"
load(pathJoin("gnu", gnu_ver))
load("srw_common_spack")

prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/gnu-9.2/modulefiles/stack")

load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))
load(pathJoin("hpc-gnu", os.getenv("hpc-gnu_ver") or "9.2"))
load(pathJoin("hpc-mpich", os.getenv("hpc-mpich_ver") or "3.3.2"))

load("srw_common")

load(pathJoin("nccmp", os.getenv("nccmp_ver") or "1.8.9"))
load(pathJoin("nco", os.getenv("nco_ver") or "4.9.3"))
load("nccmp/1.9.0.1")
load("nco/5.0.6")
load("ufs-pyenv")

setenv("CMAKE_C_COMPILER","mpicc")
setenv("CMAKE_CXX_COMPILER","mpicxx")
Expand Down
30 changes: 11 additions & 19 deletions modulefiles/build_hera_intel.lua
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
help([[
This module loads libraries for building the UFS SRW App on
the NOAA RDHPC machine Hera using Intel-2022.1.2
the NOAA RDHPC machine Hera using Intel-2021.5.0
]])

whatis([===[Loads libraries needed for building the UFS SRW App on Hera ]===])

prepend_path("MODULEPATH","/contrib/sutils/modulefiles")
load("sutils")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")

load(pathJoin("cmake", os.getenv("cmake_ver") or "3.20.1"))
load("stack-intel/2021.5.0")
load("stack-intel-oneapi-mpi/2021.5.1")
load("stack-python/3.9.12")
load("cmake/3.23.1")

intel_ver=os.getenv("intel_ver") or "2022.1.2"
load(pathJoin("intel", intel_ver))
load("srw_common_spack")

impi_ver=os.getenv("impi_ver") or "2022.1.2"
load(pathJoin("impi", impi_ver))

prepend_path("MODULEPATH","/scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/modulefiles/stack")

load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))
load(pathJoin("hpc-intel", os.getenv("hpc_intel_ver") or "2022.1.2"))
load(pathJoin("hpc-impi", os.getenv("hpc_impi_ver") or "2022.1.2"))

load("srw_common")

load(pathJoin("nccmp", os.getenv("nccmp_ver") or "1.8.9.0"))
load(pathJoin("nco", os.getenv("nco_ver") or "4.9.3"))
load("nccmp/1.9.0.1")
load("nco/5.0.6")
load("ufs-pyenv")

setenv("CMAKE_C_COMPILER","mpiicc")
setenv("CMAKE_CXX_COMPILER","mpiicpc")
Expand Down
25 changes: 12 additions & 13 deletions modulefiles/build_jet_intel.lua
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
help([[
This module loads libraries for building the UFS SRW App on
the NOAA RDHPC machine Jet using Intel-2022.1.2
the NOAA RDHPC machine Jet using Intel-2021.5.0
]])

whatis([===[Loads libraries needed for building the UFS SRW App on Jet ]===])

prepend_path("MODULEPATH","/contrib/sutils/modulefiles")
load("sutils")
prepend_path("MODULEPATH","/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/spack-stack/modulefiles")

load(pathJoin("cmake", os.getenv("cmake_ver") or "3.20.1"))
load("stack-intel/2021.5.0")
load("stack-intel-oneapi-mpi/2021.5.1")
load("stack-python/3.9.12")
load("cmake/3.23.1")

prepend_path("MODULEPATH","/mnt/lfs4/HFIP/hfv3gfs/role.epic/hpc-stack/libs/intel-2022.1.2/modulefiles/stack")
load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))
load(pathJoin("hpc-intel", os.getenv("hpc_intel_ver") or "2022.1.2"))
load(pathJoin("hpc-impi", os.getenv("hpc_impi_ver") or "2022.1.2"))
load("srw_common_spack")

load("srw_common")

load(pathJoin("prod_util", os.getenv("prod_util_ver") or "1.2.2"))
load(pathJoin("nccmp", os.getenv("nccmp_ver") or "1.8.9.0"))
load(pathJoin("nco", os.getenv("nco_ver") or "4.9.3"))
load("prod-util/1.2.2")
load("nccmp/1.9.0.1")
load("nco/5.0.6")
load("ufs-pyenv")

setenv("CMAKE_C_COMPILER","mpiicc")
setenv("CMAKE_CXX_COMPILER","mpiicpc")
Expand Down
31 changes: 16 additions & 15 deletions modulefiles/build_linux_gnu.lua
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
help([[
This module needs to be customized for the user's Linux environment:
specify compilers, path for HPC-stack, load the modules, set compiler and linker flags
specify compilers, path for spack-stack, load the modules, set compiler and linker flags
]])

whatis([===[Loads libraries needed for building the UFS SRW App on Linux ]===])

-- This path should point to your HPCstack installation directory
local HPCstack="/home/username/hpc-stack/install"
-- This path should point to your spack-stack installation directory
local spack_stack="/Users/username/spack-stack/envs/unified-env/install"
-- This path should point to the modulefile directory of the Miniconda/Python used to build spack-stack
local stack_python="/Users/username/spack-stack/modulefiles"

-- Load HPC stack
prepend_path("MODULEPATH", pathJoin(HPCstack, "modulefiles/stack"))
load("hpc")
load("hpc-python")
-- Load spack-stack
prepend_path("MODULEPATH", pathJoin(spack_stack, "modulefiles/Core"))
prepend_path("MODULEPATH", stack_python)
load("stack-gcc")
load("stack-openmpi")
load("stack-python")

load("hpc-gnu")
load("hpc-openmpi")

load("srw_common")
load("srw_common_spack")

-- Set the env. variables for the serial compilers (CC, FC, CXX)
setenv("CC", "gcc")
Expand Down Expand Up @@ -45,10 +46,10 @@ setenv("FFLAGS", " -fallow-argument-mismatch")
if mode() == "load" then
LmodMsgRaw([===[
This module needs to be customized for the user's Linux environment:
load the environment modules if present, hpc-stack modules,
specify compilers, path for HPC-stack and SRW directory on Linux systems
1) env. variable HPCstack is the hpc-stack installation directory
2) Load the modules build with the hpc-stack on your system
load the environment modules if present, spack-stack metamodules,
specify compilers, path for spack-stack and SRW directory on Linux systems
1) env. variable spack_stack is the spack-stack installation directory
2) Load the modules built with the spack-stack on your system
3) Specify compilers, compiler and linker flags, and a platform name
The example below is for the GNU compilers built with OpenMPI libraries
NB: After the module is customized, comment out the this line and lines above
Expand Down
23 changes: 12 additions & 11 deletions modulefiles/build_macos_gnu.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
help([[
This module needs to be customized for the user's MacOS environment:
specify compilers, path for HPC-stack, load the modules, set compiler and linker flags
specify compilers, path for spack-stack, load the modules, set compiler and linker flags
]])

whatis([===[Loads libraries needed for building the UFS SRW App on macos ]===])
Expand All @@ -9,18 +9,19 @@ if mode() == "load" then
execute{cmd="ulimit -S -s unlimited", modeA={"load"}}
end

-- This path should point to your HPCstack installation directory
local HPCstack="/Users/username/hpc-stack/install"
-- This path should point to your spack-stack installation directory
local spack_stack="/Users/username/spack-stack/envs/unified-env/install"
-- This path should point to the modulefile directory of the Miniconda/Python used to build spack-stack
local stack_python="/Users/username/spack-stack/modulefiles"

-- Load HPC stack
prepend_path("MODULEPATH", pathJoin(HPCstack, "modulefiles/stack"))
load("hpc")
load("hpc-python")
-- Load spack-stack
prepend_path("MODULEPATH", pathJoin(spack_stack, "modulefiles/Core"))
prepend_path("MODULEPATH", stack_python)
load("stack-gcc")
load("stack-openmpi")
load("stack-python")

load("hpc-gnu")
load("hpc-openmpi")

load("srw_common")
load("srw_common_spack")

-- MacOS with arm64 architecture: `uname -m` expands to arm64
-- MacOS with Intel architecture: `uname -m` expands to x86_64
Expand Down
15 changes: 8 additions & 7 deletions modulefiles/build_noaacloud_intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ the NOAA cloud using Intel-oneapi

whatis([===[Loads libraries needed for building the UFS SRW App on NOAA cloud ]===])

prepend_path("MODULEPATH", "/contrib/EPIC/spack-stack/envs/srw-develop-intel/install/modulefiles/Core")
prepend_path("MODULEPATH", "/apps/modules/modulefiles")
prepend_path("PATH", "/contrib/EPIC/bin")
load("intel/2021.3.0")
load("impi/2021.3.0")
load("stack-intel")
load("stack-intel-oneapi-mpi")
prepend_path("MODULEPATH", "/contrib/EPIC/spack-stack/spack-stack-1.3.0/envs/unified-dev/install/modulefiles/Core")
prepend_path("MODULEPATH", "/contrib/spack-stack/modulefiles/core")

load("stack-intel/2021.3.0")
load("stack-intel-oneapi-mpi/2021.3.0")
load("stack-python/3.9.12")
load("cmake/3.22.1")

load("srw_common_spack")

load("ufs-pyenv")
Loading