Skip to content

Commit

Permalink
[develop] Replace hpc-stack with spack-stack (ufs-community#913)
Browse files Browse the repository at this point in the history
* Replaced use of hpc-stack with spack-stack version 1.4.1 for Gaea, Hera, Hercules, Jet, and Orion.
* In modulefiles directory, build* and wflow* scripts are updated. Also removed srw_common_spack.lua and all *.lua files are calling same srw_common.lua file.
* HPC-Stack will still be used for Derecho, Gaea C5, MacOS, and Linux.

---------

Co-authored-by: Natalie Perlin <[email protected]>
Co-authored-by: EdwardSnyder-NOAA <[email protected]>
  • Loading branch information
3 people committed Oct 6, 2023
1 parent aeb6de6 commit 67b8207
Show file tree
Hide file tree
Showing 22 changed files with 258 additions and 133 deletions.
19 changes: 12 additions & 7 deletions modulefiles/build_gaea_intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ the NOAA RDHPC machine Gaea using Intel-2022.0.2

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-classic-2023.1.0/modulefiles/stack")
load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))
load(pathJoin("hpc-intel-classic", os.getenv("hpc_intel_classic_ver") or "2023.1.0"))
load(pathJoin("hpc-cray-mpich", os.getenv("hpc_cray_mpich_ver") or "7.7.20"))
prepend_path("MODULEPATH", "/lustre/f2/dev/wpo/role.epic/contrib/spack-stack/spack-stack-1.4.1-c4/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/lustre/f2/pdata/esrl/gsd/spack-stack/modulefiles")

load("stack-intel/2022.0.2")
load("stack-cray-mpich/7.7.20")
load("stack-python/3.9.12")
load("cmake/3.23.1")

load("srw_common")
load("ufs-pyenv")
-- Need at runtime
load("alps")

Expand All @@ -26,5 +33,3 @@ setenv("CMAKE_Platform","gaea.intel")

setenv("CFLAGS","-diag-disable=10441")
setenv("FFLAGS","-diag-disable=10441 -fp-model source")


24 changes: 9 additions & 15 deletions modulefiles/build_hera_gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,21 @@ 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.4.1/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"))

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

prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/gnu-9.2_ncdf492/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("stack-gcc/9.2.0")
load("stack-openmpi/4.1.5")
load("stack-python/3.9.12")
load("cmake/3.23.1")

load("srw_common")

load(pathJoin("nccmp", os.getenv("nccmp_ver") or "1.9.1.0"))
load(pathJoin("nccmp", os.getenv("nccmp_ver") or "1.9.0.1"))
load(pathJoin("nco", os.getenv("nco_ver") or "5.0.6"))
load(pathJoin("openblas", os.getenv("openblas_ver") or "0.3.23"))
load(pathJoin("openblas", os.getenv("openblas_ver") or "0.3.19"))
load("ufs-pyenv")

unsetenv("MKLROOT")
setenv("CMAKE_C_COMPILER","mpicc")
setenv("CMAKE_CXX_COMPILER","mpicxx")
setenv("CMAKE_Fortran_COMPILER","mpif90")
Expand Down
25 changes: 13 additions & 12 deletions modulefiles/build_hera_intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,28 @@ whatis([===[Loads libraries needed for building the UFS SRW App on Hera ]===])
prepend_path("MODULEPATH","/contrib/sutils/modulefiles")
load("sutils")

load(pathJoin("cmake", os.getenv("cmake_ver") or "3.20.1"))
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.4.1/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")

intel_ver=os.getenv("intel_ver") or "2022.1.2"
load(pathJoin("intel", intel_ver))
stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
load(pathJoin("stack-intel", stack_intel_ver))

impi_ver=os.getenv("impi_ver") or "2022.1.2"
load(pathJoin("impi", impi_ver))
stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1"
load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))

prepend_path("MODULEPATH","/scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2_ncdf492/modulefiles/stack")
stack_python_ver=os.getenv("stack_python_ver") or "3.9.12"
load(pathJoin("stack-python", stack_python_ver))

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"))
cmake_ver=os.getenv("cmake_ver") or "3.20.1"
load(pathJoin("cmake", cmake_ver))

load("srw_common")

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

setenv("CMAKE_C_COMPILER","mpiicc")
setenv("CMAKE_CXX_COMPILER","mpiicpc")
setenv("CMAKE_Fortran_COMPILER","mpiifort")
setenv("CMAKE_Platform","hera.intel")

22 changes: 10 additions & 12 deletions modulefiles/build_hercules_intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ This module loads libraries for building the UFS SRW App on
the MSU machine Hercules using intel-oneapi-compilers/2022.2.1
]])

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

load("contrib")
load("noaatools")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.4.1/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/da/role-da/spack-stack/modulefiles")

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

prepend_path("MODULEPATH","/work/noaa/epic/role-epic/contrib/hercules/hpc-stack/intel-2022.2.1/modulefiles/stack")
load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))
load(pathJoin("hpc-intel-oneapi-compilers", os.getenv("hpc_intel_ver") or "2022.2.1"))
load(pathJoin("hpc-intel-oneapi-mpi", os.getenv("hpc_mpi_ver") or "2021.7.1"))
load("stack-intel/2021.7.1")
load("stack-intel-oneapi-mpi/2021.7.1")
load("stack-python/3.9.14")
load("cmake/3.26.3")

load("srw_common")

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

setenv("CFLAGS","-diag-disable=10441")
setenv("FFLAGS","-diag-disable=10441")
Expand All @@ -27,4 +26,3 @@ setenv("CMAKE_C_COMPILER","mpiicc")
setenv("CMAKE_CXX_COMPILER","mpiicpc")
setenv("CMAKE_Fortran_COMPILER","mpiifort")
setenv("CMAKE_Platform","hercules.intel")

23 changes: 11 additions & 12 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.4.1/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"))

prepend_path("MODULEPATH","/mnt/lfs4/HFIP/hfv3gfs/role.epic/hpc-stack/libs/intel-2022.1.2_ncdf492/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("stack-intel/2021.5.0")
load("stack-intel-oneapi-mpi/2021.5.1")
load("stack-python/3.9.12")
load("cmake/3.23.1")

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
2 changes: 1 addition & 1 deletion modulefiles/build_noaacloud_intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ load("stack-intel")
load("stack-intel-oneapi-mpi")
load("cmake/3.23.1")

load("srw_common_spack")
load("srw_common")
21 changes: 9 additions & 12 deletions modulefiles/build_orion_intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,21 @@ the MSU machine Orion using Intel-2022.1.2

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

load("contrib")
load("noaatools")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/spack-stack-1.4.1/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/da/role-da/spack-stack/modulefiles")

load(pathJoin("cmake", os.getenv("cmake_ver") or "3.22.1"))
load(pathJoin("python", os.getenv("python_ver") or "3.9.2"))

prepend_path("MODULEPATH","/work/noaa/epic/role-epic/contrib/orion/hpc-stack/intel-2022.1.2_ncdf492/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("stack-intel/2022.0.2")
load("stack-intel-oneapi-mpi/2021.5.1")
load("stack-python/3.9.7")
load("cmake/3.22.1")

load("srw_common")

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

setenv("CMAKE_C_COMPILER","mpiicc")
setenv("CMAKE_CXX_COMPILER","mpiicpc")
setenv("CMAKE_Fortran_COMPILER","mpiifort")
setenv("CMAKE_Platform","orion.intel")

18 changes: 9 additions & 9 deletions modulefiles/srw_common.lua
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
load_any("jasper/2.0.25","jasper/2.0.32")
load_any("zlib/1.2.11","zlib/1.2.13")
load("libpng/1.6.37")
load_any("png/1.6.37","libpng/1.6.37")

load_any("netcdf/4.9.2", "netcdf-c/4.9.2")
load_any("netcdf/4.9.2", "netcdf-fortran/4.6.0")
load_any("pio/2.5.10", "parallelio/2.5.9")
load_any("netcdf/4.9.2","netcdf-c/4.9.2")
load_any("netcdf/4.9.2","netcdf-fortran/4.6.0")
load_any("pio/2.5.10","parallelio/2.5.9","parallelio/2.5.10")
load("esmf/8.4.2")
load("fms/2023.01")

load("bacio/2.4.1")
load("g2/3.4.5")
load("crtm/2.4.0")
load("g2/3.4.5")
load("g2tmpl/1.10.2")
load("ip/3.3.3")
load("sp/2.3.3")
load("w3emc/2.9.2")

load_any("gftl-shared/v1.5.0", "gftl-shared/1.5.0")
load_any("yafyaml/v0.5.1", "yafyaml/0.5.1")
load_any("gftl-shared/v1.5.0","gftl-shared/1.5.0")
load_any("yafyaml/v0.5.1","yafyaml/0.5.1")
load("mapl/2.35.2-esmf-8.4.2")

load("nemsio/2.5.4")
load_any("nemsio/2.5.2","nemsio/2.5.4")
load("sfcio/1.4.1")
load("sigio/2.3.2")
load("w3nco/2.4.1")
load_any("wrf_io/1.2.0","wrf-io/1.2.0")

load("wgrib2/2.0.8")
load_any("wgrib2/2.0.8","wgrib2/3.1.1")
28 changes: 0 additions & 28 deletions modulefiles/srw_common_spack.lua

This file was deleted.

23 changes: 21 additions & 2 deletions modulefiles/tasks/cheyenne/run_vx.local.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
--[[
Compiler-specific modules are used for met and metplus libraries
--]]
load(pathJoin("met", os.getenv("met_ver") or "10.1.2"))
load(pathJoin("metplus", os.getenv("metplus_ver") or "4.1.3"))
local met_ver = (os.getenv("met_ver") or "10.1.2")
local metplus_ver = (os.getenv("metplus_ver") or "4.1.3")
if (mode() == "load") then
load(pathJoin("met", met_ver))
load(pathJoin("metplus",metplus_ver))
end
local base_met = os.getenv("met_ROOT") or os.getenv("MET_ROOT")
local base_metplus = os.getenv("metplus_ROOT") or os.getenv("METPLUS_ROOT")

setenv("MET_INSTALL_DIR", base_met)
setenv("MET_BIN_EXEC", pathJoin(base_met,"bin"))
setenv("MET_BASE", pathJoin(base_met,"share/met"))
setenv("MET_VERSION", met_ver)
setenv("METPLUS_VERSION", metplus_ver)
setenv("METPLUS_ROOT", base_metplus)
setenv("METPLUS_PATH", base_metplus)

if (mode() == "unload") then
unload(pathJoin("met", met_ver))
unload(pathJoin("metplus",metplus_ver))
end
load("python_srw")
23 changes: 21 additions & 2 deletions modulefiles/tasks/derecho/run_vx.local.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
--[[
Compiler-specific modules are used for met and metplus libraries
--]]
load(pathJoin("met", os.getenv("met_ver") or "10.1.2"))
load(pathJoin("metplus", os.getenv("metplus_ver") or "4.1.3"))
local met_ver = (os.getenv("met_ver") or "10.1.2")
local metplus_ver = (os.getenv("metplus_ver") or "4.1.3")
if (mode() == "load") then
load(pathJoin("met", met_ver))
load(pathJoin("metplus",metplus_ver))
end
local base_met = os.getenv("met_ROOT") or os.getenv("MET_ROOT")
local base_metplus = os.getenv("metplus_ROOT") or os.getenv("METPLUS_ROOT")

setenv("MET_INSTALL_DIR", base_met)
setenv("MET_BIN_EXEC", pathJoin(base_met,"bin"))
setenv("MET_BASE", pathJoin(base_met,"share/met"))
setenv("MET_VERSION", met_ver)
setenv("METPLUS_VERSION", metplus_ver)
setenv("METPLUS_ROOT", base_metplus)
setenv("METPLUS_PATH", base_metplus)

if (mode() == "unload") then
unload(pathJoin("met", met_ver))
unload(pathJoin("metplus",metplus_ver))
end
load("python_srw")
23 changes: 21 additions & 2 deletions modulefiles/tasks/gaea/run_vx.local.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
--[[
Compiler-specific modules are used for met and metplus libraries
--]]
load(pathJoin("met", os.getenv("met_ver") or "10.1.2"))
load(pathJoin("metplus", os.getenv("metplus_ver") or "4.1.3"))
local met_ver = (os.getenv("met_ver") or "10.1.1")
local metplus_ver = (os.getenv("metplus_ver") or "4.1.1")
if (mode() == "load") then
load(pathJoin("met", met_ver))
load(pathJoin("metplus",metplus_ver))
end
local base_met = os.getenv("met_ROOT") or os.getenv("MET_ROOT")
local base_metplus = os.getenv("metplus_ROOT") or os.getenv("METPLUS_ROOT")

setenv("MET_INSTALL_DIR", base_met)
setenv("MET_BIN_EXEC", pathJoin(base_met,"bin"))
setenv("MET_BASE", pathJoin(base_met,"share/met"))
setenv("MET_VERSION", met_ver)
setenv("METPLUS_VERSION", metplus_ver)
setenv("METPLUS_ROOT", base_metplus)
setenv("METPLUS_PATH", base_metplus)

if (mode() == "unload") then
unload(pathJoin("met", met_ver))
unload(pathJoin("metplus",metplus_ver))
end
load("python_srw")
Loading

0 comments on commit 67b8207

Please sign in to comment.