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

Use spack-stack python on Hercules #1133

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
36 changes: 36 additions & 0 deletions modulefiles/EVA/hercules.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
-- NOAA HPC Orion Modulefile for EVA
CoryMartin-NOAA marked this conversation as resolved.
Show resolved Hide resolved
help([[
]])

local pkgName = myModuleName()
local pkgVersion = myModuleVersion()
local pkgNameVer = myModuleFullName()

prepend_path("MODULEPATH", '/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core')

load("stack-intel/2021.9.0")
load("python/3.10.13")
CoryMartin-NOAA marked this conversation as resolved.
Show resolved Hide resolved
load("proj/9.2.1")
load("py-matplotlib/3.7.3")
load("py-xarray/2023.7.0")
load("py-cartopy/0.21.1")
load("py-scipy/1.11.3")

local pyenvpath = "/work2/noaa/da/python/envs/"
local pyenvname = "eva"

local pyenvactivate = pathJoin(pyenvpath, pyenvname, "bin/activate")
if (mode() == "load") then
local activate_cmd = "source "..pyenvactivate
execute{cmd=activate_cmd, modeA={"load"}}
else
if (mode() == "unload") then
local deactivate_cmd = "deactivate"
execute{cmd=deactivate_cmd, modeA={"unload"}}
end
end

whatis("Name: ".. pkgName)
whatis("Version: " .. pkgVersion)
whatis("Category: EVA")
whatis("Description: Load all libraries needed for EVA")
20 changes: 12 additions & 8 deletions modulefiles/GDAS/hercules.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ local pkgVersion = myModuleVersion()
local pkgNameVer = myModuleFullName()

prepend_path("MODULEPATH", '/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core')
prepend_path("MODULEPATH", '/work2/noaa/da/python/opt/modulefiles/stack')

-- below two lines get us access to the spack-stack modules
load("stack-intel/2021.9.0")
Expand Down Expand Up @@ -56,20 +55,25 @@ load("libxaw/1.0.13")
load("udunits/2.2.28")
load("ncview/2.1.9")
load("netcdf-cxx4/4.3.1")
load("py-pybind11/2.11.0")
load("json/3.10.5")
--load("crtm/v2.4_jedi")
load("contrib/0.1")
load("noaatools/3.1")
load("rocoto/1.3.5")
load("prod_util/2.1.1")

load("hpc/1.2.0")
unload("python/3.10.13")
unload("py-numpy/1.22.3")
load("miniconda3/4.6.14")
load("gdasapp/1.0.0")
load("py-jinja2/3.0.3")
load("py-netcdf4/1.5.8")
load("py-pybind11/2.11.0")
load("py-pycodestyle/2.11.0")
load("py-pyyaml/6.0")
load("py-scipy/1.11.3")
load("py-xarray/2023.7.0")
load("py-f90nml/1.4.3")
load("py-pip/23.1.2")

-- below is a hack because of cmake finding the wrong python...
setenv("CONDA_PREFIX", "/work2/noaa/da/python/opt/core/miniconda3/4.6.14/envs/gdasapp/")
prepend_path("PYTHONPATH", "/work2/noaa/da/python/gdasapp/wxflow/20240528/src")
aerorahul marked this conversation as resolved.
Show resolved Hide resolved

setenv("CC","mpiicc")
setenv("FC","mpiifort")
Expand Down
Loading