From 14931d72ff45dd4b07b9a3431c53e31adcc7c480 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Mon, 20 Nov 2023 19:23:25 +0000 Subject: [PATCH] Update modulefiles, reinstate (pared down) machine version files. --- modulefiles/module_base.jet.lua | 28 ++++++++++++++++++---------- modulefiles/module_base.orion.lua | 4 ---- modulefiles/module_base.s4.lua | 23 +++++++++++++++-------- modulefiles/module_gwsetup.jet.lua | 22 +++++++++------------- modulefiles/module_gwsetup.s4.lua | 12 +++++++++++- sorc/link_workflow.sh | 2 ++ versions/build.hera.ver | 2 ++ versions/build.jet.ver | 2 ++ versions/build.orion.ver | 2 ++ versions/build.s4.ver | 2 ++ versions/run.hera.ver | 11 +++++++++++ versions/run.jet.ver | 7 +++++++ versions/run.orion.ver | 5 +++++ versions/run.s4.ver | 4 ++++ versions/run.spack.ver | 8 -------- 15 files changed, 90 insertions(+), 44 deletions(-) create mode 100644 versions/build.hera.ver create mode 100644 versions/build.jet.ver create mode 100644 versions/build.orion.ver create mode 100644 versions/build.s4.ver create mode 100644 versions/run.hera.ver create mode 100644 versions/run.jet.ver create mode 100644 versions/run.orion.ver create mode 100644 versions/run.s4.ver diff --git a/modulefiles/module_base.jet.lua b/modulefiles/module_base.jet.lua index a032cd6273..2e13191797 100644 --- a/modulefiles/module_base.jet.lua +++ b/modulefiles/module_base.jet.lua @@ -2,15 +2,15 @@ help([[ Load environment to run GFS on Jet ]]) -prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") +spack_stack_ver=(os.getenv("spack_stack_ver") or "None") +spack_env=(os.getenv("spack_env") or "None") +prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-" .. spack_stack_ver .. "/envs/" .. spack_env .. "/install/modulefiles/Core") -local stack_python_ver=os.getenv("stack_python_ver") or "3.10.8" -local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0" -local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" -local cmake_ver=os.getenv("cmake_ver") or "3.23.1" -local prod_util_ver=os.getenv("prod_util_ver") or "1.2.2" +load(pathJoin("stack-intel", os.getenv("stack_intel_ver"))) +load(pathJoin("stack-intel-oneapi-mpi", os.getenv("stack_impi_ver"))) +load(pathJoin("python", os.getenv("python_ver"))) -load("hpss") +load(pathJoin("hpss", os.getenv("hpss_ver"))) load(pathJoin("gempak", os.getenv("gempak_ver"))) load(pathJoin("ncl", os.getenv("ncl_ver"))) load(pathJoin("jasper", os.getenv("jasper_ver"))) @@ -19,15 +19,23 @@ load(pathJoin("cdo", os.getenv("cdo_ver"))) load(pathJoin("R", os.getenv("R_ver"))) load(pathJoin("hdf5", os.getenv("hdf5_ver"))) -load(pathJoin("netcdf", os.getenv("netcdf_ver"))) +load(pathJoin("netcdf-c", os.getenv("netcdf_c_ver"))) +load(pathJoin("netcdf-fortran", os.getenv("netcdf_fortran_ver"))) load(pathJoin("nco", os.getenv("nco_ver"))) load(pathJoin("prod_util", os.getenv("prod_util_ver"))) -load(pathJoin("grib_util", os.getenv("grib_util_ver"))) +load(pathJoin("grib-util", os.getenv("grib_util_ver"))) load(pathJoin("g2tmpl", os.getenv("g2tmpl_ver"))) -load(pathJoin("ncdiag", os.getenv("ncdiag_ver"))) +load(pathJoin("gsi-ncdiag", os.getenv("gsi_ncdiag_ver"))) load(pathJoin("crtm", os.getenv("crtm_ver"))) +load(pathJoin("bufr", os.getenv("bufr_ver"))) load(pathJoin("wgrib2", os.getenv("wgrib2_ver"))) +load(pathJoin("py-netcdf4", os.getenv("py_netcdf4_ver"))) +load(pathJoin("py-pyyaml", os.getenv("py_pyyaml_ver"))) +load(pathJoin("py-jinja2", os.getenv("py_jinja2_ver"))) + +setenv("WGRIB2","wgrib2") +setenv("UTILROOT",os.getenv("prod_util_ROOT")) --prepend_path("MODULEPATH", pathJoin("/lfs4/HFIP/hfv3gfs/glopara/git/prepobs/v" .. os.getenv("prepobs_run_ver"), "modulefiles")) prepend_path("MODULEPATH", pathJoin("/lfs4/HFIP/hfv3gfs/glopara/git/prepobs/feature-GFSv17_com_reorg_log_update/modulefiles")) diff --git a/modulefiles/module_base.orion.lua b/modulefiles/module_base.orion.lua index 9a34ba7b38..1c683157b5 100644 --- a/modulefiles/module_base.orion.lua +++ b/modulefiles/module_base.orion.lua @@ -35,8 +35,4 @@ load(pathJoin("prepobs", os.getenv("prepobs_run_ver"))) prepend_path("MODULEPATH", pathJoin("/work/noaa/global/glopara/git/Fit2Obs/v" .. os.getenv("fit2obs_ver"), "modulefiles")) load(pathJoin("fit2obs", os.getenv("fit2obs_ver"))) --- Disabled verif-global until met/metplus are included in spack-stack ---load(pathJoin("met", "9.1")) ---load(pathJoin("metplus", "3.1")) - whatis("Description: GFS run environment") diff --git a/modulefiles/module_base.s4.lua b/modulefiles/module_base.s4.lua index ce42012417..23e61ef9a7 100644 --- a/modulefiles/module_base.s4.lua +++ b/modulefiles/module_base.s4.lua @@ -2,30 +2,37 @@ help([[ Load environment to run GFS on S4 ]]) -load("license_intel") -prepend_path("MODULEPATH", "/data/prod/hpc-stack/modulefiles/stack") +spack_stack_ver=(os.getenv("spack_stack_ver") or "None") +spack_env=(os.getenv("spack_env") or "None") +prepend_path("MODULEPATH", "/data/prod/jedi/spack-stack/spack-stack-" .. spack_stack_ver .. "/envs/" .. spack_env .. "/install/modulefiles/Core") -load(pathJoin("hpc", os.getenv("hpc_ver"))) -load(pathJoin("hpc-intel", os.getenv("hpc_intel_ver"))) -load(pathJoin("hpc-impi", os.getenv("hpc_impi_ver"))) +load(pathJoin("stack-intel", os.getenv("stack_intel_ver"))) +load(pathJoin("stack-intel-oneapi-mpi", os.getenv("stack_impi_ver"))) +load(pathJoin("python", os.getenv("python_ver"))) -load(pathJoin("miniconda", os.getenv("miniconda_ver"))) load(pathJoin("ncl", os.getenv("ncl_ver"))) load(pathJoin("cdo", os.getenv("cdo_ver"))) load(pathJoin("jasper", os.getenv("jasper_ver"))) load(pathJoin("libpng", os.getenv("libpng_ver"))) load(pathJoin("hdf5", os.getenv("hdf5_ver"))) -load(pathJoin("netcdf", os.getenv("netcdf_ver"))) +load(pathJoin("netcdf-c", os.getenv("netcdf_c_ver"))) +load(pathJoin("netcdf-fortran", os.getenv("netcdf_fortran_ver"))) load(pathJoin("nco", os.getenv("nco_ver"))) load(pathJoin("prod_util", os.getenv("prod_util_ver"))) load(pathJoin("grib_util", os.getenv("grib_util_ver"))) load(pathJoin("g2tmpl", os.getenv("g2tmpl_ver"))) -load(pathJoin("ncdiag", os.getenv("ncdiag_ver"))) +load(pathJoin("gsi-ncdiag", os.getenv("gsi_ncdiag_ver"))) load(pathJoin("crtm", os.getenv("crtm_ver"))) load(pathJoin("wgrib2", os.getenv("wgrib2_ver"))) +load(pathJoin("bufr", os.getenv("bufr_ver"))) +load(pathJoin("py-netcdf4", os.getenv("py_netcdf4_ver"))) +load(pathJoin("py-pyyaml", os.getenv("py_pyyaml_ver"))) +load(pathJoin("py-jinja2", os.getenv("py_jinja2_ver"))) + setenv("WGRIB2","wgrib2") +setenv("UTILROOT",os.getenv("prod_util_ROOT")) --prepend_path("MODULEPATH", pathJoin("/data/prod/glopara/git/prepobs/v" .. os.getenv("prepobs_run_ver"), "modulefiles")) prepend_path("MODULEPATH", pathJoin("/data/prod/glopara/git/prepobs/feature-GFSv17_com_reorg/modulefiles")) diff --git a/modulefiles/module_gwsetup.jet.lua b/modulefiles/module_gwsetup.jet.lua index 10fc39ce8a..d08389c711 100644 --- a/modulefiles/module_gwsetup.jet.lua +++ b/modulefiles/module_gwsetup.jet.lua @@ -4,19 +4,15 @@ Load environment to run GFS workflow setup scripts on Jet load(pathJoin("rocoto", "1.3.3")) -if (mode() == "unload") then - -- `execute` delays commands until last, but we need conda deactivated - -- before unloading miniconda. `print` (bizarrely) still executes the - -- command, but does it immediately. The semicolon is necessary - -- because otherwise other commands get tacked onto the same line. - print("conda deactivate;") -end +prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") --- Temporary until official hpc-stack is updated -prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/miniconda3/modulefiles") -load(pathJoin("miniconda3", "4.12.0")) -if (mode() == "load") then - execute{cmd="conda activate ufswm", modeA={"load"}} -end +local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0" +local python_ver=os.getenv("python_ver") or "3.10.8" + +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("python", python_ver)) +load("py-jinja2") +load("py-pyyaml") +load("py-numpy") whatis("Description: GFS run setup environment") diff --git a/modulefiles/module_gwsetup.s4.lua b/modulefiles/module_gwsetup.s4.lua index 8324a148d8..291c654bb3 100644 --- a/modulefiles/module_gwsetup.s4.lua +++ b/modulefiles/module_gwsetup.s4.lua @@ -2,8 +2,18 @@ help([[ Load environment to run GFS workflow setup scripts on S4 ]]) -load(pathJoin("miniconda", "3.8-s4")) load(pathJoin("rocoto","1.3.5")) load(pathJoin("git","2.30.0")) +prepend_path("MODULEPATH", "/data/prod/jedi/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") + +local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0" +local python_ver=os.getenv("python_ver") or "3.10.8" + +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("python", python_ver)) +load("py-jinja2") +load("py-pyyaml") +load("py-numpy") + whatis("Description: GFS run setup environment") diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index f274c714ba..5b039030ca 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -55,6 +55,8 @@ if [[ "${machine}" == "wcoss2" ]]; then else cp "${HOMEgfs}/versions/build.spack.ver" "${HOMEgfs}/versions/build.ver" cp "${HOMEgfs}/versions/run.spack.ver" "${HOMEgfs}/versions/run.ver" + cat "${HOMEgfs}/versions/build.${machine}.ver" >> "${HOMEgfs}/versions/build.ver" + cat "${HOMEgfs}/versions/run.${machine}.ver" >> "${HOMEgfs}/versions/run.ver" fi #------------------------------ diff --git a/versions/build.hera.ver b/versions/build.hera.ver new file mode 100644 index 0000000000..cba2bb5a76 --- /dev/null +++ b/versions/build.hera.ver @@ -0,0 +1,2 @@ +export stack_intel_ver=2021.5.0 +export stack_impi_ver=2021.5.1 diff --git a/versions/build.jet.ver b/versions/build.jet.ver new file mode 100644 index 0000000000..cba2bb5a76 --- /dev/null +++ b/versions/build.jet.ver @@ -0,0 +1,2 @@ +export stack_intel_ver=2021.5.0 +export stack_impi_ver=2021.5.1 diff --git a/versions/build.orion.ver b/versions/build.orion.ver new file mode 100644 index 0000000000..cba2bb5a76 --- /dev/null +++ b/versions/build.orion.ver @@ -0,0 +1,2 @@ +export stack_intel_ver=2021.5.0 +export stack_impi_ver=2021.5.1 diff --git a/versions/build.s4.ver b/versions/build.s4.ver new file mode 100644 index 0000000000..cba2bb5a76 --- /dev/null +++ b/versions/build.s4.ver @@ -0,0 +1,2 @@ +export stack_intel_ver=2021.5.0 +export stack_impi_ver=2021.5.1 diff --git a/versions/run.hera.ver b/versions/run.hera.ver new file mode 100644 index 0000000000..d82e9fba62 --- /dev/null +++ b/versions/run.hera.ver @@ -0,0 +1,11 @@ +export stack_intel_ver=2021.5.0 +export stack_impi_ver=2021.5.1 + +export hpss_ver=hpss +export ncl_ver=6.6.2 +export R_ver=3.5.0 +export gempak_ver=7.4.2 + +#For metplus jobs, not currently working with spack-stack +#export met_ver=9.1.3 +#export metplus_ver=3.1.1 diff --git a/versions/run.jet.ver b/versions/run.jet.ver new file mode 100644 index 0000000000..ab350da770 --- /dev/null +++ b/versions/run.jet.ver @@ -0,0 +1,7 @@ +export stack_intel_ver=2021.5.0 +export stack_impi_ver=2021.5.1 + +export hpss_ver= +export ncl_ver=6.6.2 +export R_ver=4.0.2 +export gempak_ver=7.4.2 diff --git a/versions/run.orion.ver b/versions/run.orion.ver new file mode 100644 index 0000000000..f016816a15 --- /dev/null +++ b/versions/run.orion.ver @@ -0,0 +1,5 @@ +export stack_intel_ver=2022.0.2 +export stack_impi_ver=2021.5.1 + +export ncl_ver=6.6.2 +export gempak_ver=7.4.1 diff --git a/versions/run.s4.ver b/versions/run.s4.ver new file mode 100644 index 0000000000..1125787b09 --- /dev/null +++ b/versions/run.s4.ver @@ -0,0 +1,4 @@ +export stack_intel_ver=2021.5.0 +export stack_impi_ver=2021.5.1 + +export ncl_ver=6.6.2 diff --git a/versions/run.spack.ver b/versions/run.spack.ver index d5e64f8be5..7045f2ed01 100644 --- a/versions/run.spack.ver +++ b/versions/run.spack.ver @@ -1,17 +1,11 @@ export spack_stack_ver=1.5.1 export spack_env=gsi-addon -export stack_intel_ver=2021.5.0 -export stack_impi_ver=2021.5.1 export python_ver=3.10.8 -export hpss_ver=hpss - -export gempak_ver=7.4.2 export jasper_ver=2.0.32 export libpng_ver=1.6.37 export cdo_ver=2.0.5 export nco_ver=5.0.6 -export ncl_ver=6.6.2 export hdf5_ver=1.14.0 export netcdf_c_ver=4.9.2 @@ -31,5 +25,3 @@ export prepobs_run_ver=1.0.1 export ens_tracker_ver=feature-GFSv17_com_reorg export fit2obs_ver=1.0.0 -export met_ver=9.1.3 -export metplus_ver=3.1.1