Skip to content

Commit

Permalink
[develop] modulefile updates for generic linux (#501)
Browse files Browse the repository at this point in the history
* Update build_linux_gnu.lua

Use the srw_common module with the standard list of modules

* Update wflow_linux.lua

* Update build_linux_gnu.lua
  • Loading branch information
natalie-perlin authored Dec 1, 2022
1 parent 4a9d1fe commit ce9b0cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 45 deletions.
40 changes: 6 additions & 34 deletions modulefiles/build_linux_gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,12 @@ load("hpc-gnu")
load("openmpi")
load("hpc-openmpi")

load("jasper/2.0.25")
load("zlib/1.2.11")
load("srw_common")

load("hdf5/1.10.6")
load("netcdf/4.7.4")
load("pio/2.5.3")
load("esmf/8.3.0b09")
load("fms/2022.01")

load("bacio/2.4.1")
load("crtm/2.3.0")
load("g2/3.4.3")
load("g2tmpl/1.10.0")
load("ip/3.3.3")
load("sp/2.3.3")
load("w3nco/2.4.1")
load("upp/10.0.10")

load("gftl-shared/1.3.3")
load("yafyaml/0.5.1")
load("mapl/2.11.0-esmf-8.3.0b09")
load("gfsio/1.4.1")
load("landsfcutil/2.4.1")
load("nemsio/2.5.2")
load("nemsiogfs/2.5.3")
load("sfcio/1.4.1")
load("sigio/2.3.2")
load("w3emc/2.7.3")
load("wgrib2/2.0.8")

-- Set the env. variables for the serial compilers (CC, FC, CXX), if not present
setenv("CC", "/usr/local/bin/gcc")
setenv("FC", "/usr/local/bin/gfortran")
setenv("CXX", "/usr/local/bin/g++")
-- Set the env. variables for the serial compilers (CC, FC, CXX)
setenv("CC", "gcc")
setenv("FC", "gfortran")
setenv("CXX", "g++")

-- Set MPI compilers depending on the MPI libraries built:
local MPI_CC="mpicc"
Expand Down Expand Up @@ -82,6 +54,6 @@ if mode() == "load" then
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
Please export env. variable LDFLAGS after the module is successfully loaded:
> export LDFLAGS=\"-L\$MPI_ROOT/lib \"
> export LDFLAGS+=" -L$MPI_ROOT/lib "
]===])
end
16 changes: 5 additions & 11 deletions modulefiles/wflow_linux.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
help([[
This module activates python environement for running the UFS SRW App on Linux
This module sets a path to activate conda environment needed for running the UFS SRW App on Linux
]])

whatis([===[This module activates python environment for running the UFS SRW App on Linux]===])
whatis([===[This module sets a path for conda environment needed for running the UFS SRW App on Linux]===])

setenv("CMAKE_Platform", "linux")
setenv("VENV", pathJoin(os.getenv("HOME"), "venv/regional_workflow"))
setenv("VENV", pathJoin(os.getenv("HOME"), "condaenv/envs/regional_workflow"))

--[[
local ROCOTOmod="/Users/username/modules"
Expand All @@ -14,13 +14,7 @@ load(rocoto)
--]]

if mode() == "load" then
LmodMsgRaw([===[Verify the Python virtual environment path \$VENV shown below is correct,
set to the correct path otherwise:
VENV=$env(VENV) "
Please do the following to activate python virtual environment:
> source \$VENV/bin/activate
LmodMsgRaw([===[Please do the following to activate conda:
> conda activate $VENV
]===])
end
if mode() == "unload" then
execute{cmd="deactivate", modeA={"unload"}}
end

0 comments on commit ce9b0cc

Please sign in to comment.