From 0b0914f024b476ae3f90a37606130316dca4e047 Mon Sep 17 00:00:00 2001 From: Natalie Perlin Date: Wed, 20 Dec 2023 09:43:15 -0500 Subject: [PATCH] correct devclean.sh, devbuild.sh and Gaea-c5 modulefiles --- devbuild.sh | 11 +++++++++-- devclean.sh | 8 +++++--- modulefiles/tasks/gaea-c5/plot_allvars.local.lua | 8 ++++++-- modulefiles/tasks/gaea-c5/python_srw.lua | 8 ++++++-- modulefiles/tasks/gaea-c5/run_vx.local.lua | 2 +- modulefiles/wflow_gaea-c5.lua | 5 +++-- 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/devbuild.sh b/devbuild.sh index 6ec2615e23..3ea90e2fd3 100755 --- a/devbuild.sh +++ b/devbuild.sh @@ -212,6 +212,11 @@ printf "PLATFORM(MACHINE)=${PLATFORM}\n" >&2 if [ "${PLATFORM}" = "wcoss2" ]; then BUILD_CONDA="off" fi +# Conda is not used on Gaea-c5 F2 filesystem +# it needs to be reevaluated when moved to F2 filesystem +if [ "${PLATFORM}" = "gaea-c5" ]; then + BUILD_CONDA="off" +fi # build conda and conda environments, if requested. if [ "${BUILD_CONDA}" = "on" ] ; then @@ -244,8 +249,10 @@ if [ "${BUILD_CONDA}" = "on" ] ; then fi else - source ${CONDA_BUILD_DIR}/etc/profile.d/conda.sh - conda activate + if [ -d "${CONDA_BUILD_DIR}" ] ; then + source ${CONDA_BUILD_DIR}/etc/profile.d/conda.sh + conda activate + fi fi # Conda environment should have linux utilities to perform these tasks on macos. diff --git a/devclean.sh b/devclean.sh index 8d13b0f061..2bdd8e9626 100755 --- a/devclean.sh +++ b/devclean.sh @@ -137,10 +137,12 @@ elif [ "${CLEAN}" = true ]; then "${INSTALL_DIR}/lib64" \ "${SRW_DIR}/manage_externals/manic" \ ) - for directory in $directories; do - [[ -d $directory ]] && rm -rfv $directory - done + if [ ${#directories[@]} -ge 1 ]; then + for dir in ${directories[@]}; do + [[ -d "${dir}" ]] && rm -rfv ${dir} + done echo " " + fi fi # Clean all the submodules if requested. Note: Need to check out them again before attempting subsequent builds, by sourcing ${SRW_DIR}/manage_externals/checkout_externals if [ ${INCLUDE_SUB_MODULES} == true ]; then diff --git a/modulefiles/tasks/gaea-c5/plot_allvars.local.lua b/modulefiles/tasks/gaea-c5/plot_allvars.local.lua index b7e9528710..2ce42ff57f 100644 --- a/modulefiles/tasks/gaea-c5/plot_allvars.local.lua +++ b/modulefiles/tasks/gaea-c5/plot_allvars.local.lua @@ -1,2 +1,6 @@ -load("conda") -setenv("SRW_ENV", "srw_graphics") +unload("miniconda3") +unload("python") +prepend_path("MODULEPATH","/lustre/f2/dev/role.epic/contrib/C5/miniconda3/modulefiles") +load(pathJoin("miniconda3", os.getenv("miniconda3_ver") or "4.12.0")) + +setenv("SRW_ENV", "regional_workflow") diff --git a/modulefiles/tasks/gaea-c5/python_srw.lua b/modulefiles/tasks/gaea-c5/python_srw.lua index 66f3fb4203..0ae31da067 100644 --- a/modulefiles/tasks/gaea-c5/python_srw.lua +++ b/modulefiles/tasks/gaea-c5/python_srw.lua @@ -1,4 +1,8 @@ unload("miniconda3") -load("conda") -setenv("SRW_ENV", "srw_app") +unload("python") +prepend_path("MODULEPATH","/lustre/f2/dev/role.epic/contrib/C5/miniconda3/modulefiles") +load(pathJoin("miniconda3", os.getenv("miniconda3_ver") or "4.12.0")) + +setenv("SRW_ENV", "workflow_tools") + load("darshan-runtime/3.4.0") diff --git a/modulefiles/tasks/gaea-c5/run_vx.local.lua b/modulefiles/tasks/gaea-c5/run_vx.local.lua index 83949cff83..cb64e9a38a 100644 --- a/modulefiles/tasks/gaea-c5/run_vx.local.lua +++ b/modulefiles/tasks/gaea-c5/run_vx.local.lua @@ -22,4 +22,4 @@ if (mode() == "unload") then unload(pathJoin("met", met_ver)) unload(pathJoin("metplus",metplus_ver)) end -load("ufs-pyenv") +load("python_srw") diff --git a/modulefiles/wflow_gaea-c5.lua b/modulefiles/wflow_gaea-c5.lua index 5f9d93e58f..12467dfd74 100644 --- a/modulefiles/wflow_gaea-c5.lua +++ b/modulefiles/wflow_gaea-c5.lua @@ -7,7 +7,8 @@ whatis([===[Loads libraries needed for running the UFS SRW App on gaea ]===]) unload("python") load("set_pythonpath") -load("conda") +prepend_path("MODULEPATH","/lustre/f2/dev/role.epic/contrib/C5/miniconda3/modulefiles") +load(pathJoin("miniconda3", os.getenv("miniconda3_ver") or "4.12.0")) prepend_path("MODULEPATH","/lustre/f2/dev/role.epic/contrib/C5/rocoto/modulefiles") load("rocoto") @@ -15,6 +16,6 @@ pushenv("MKLROOT", "/opt/intel/oneapi/mkl/2023.1.0/") if mode() == "load" then LmodMsgRaw([===[Please do the following to activate conda: - > conda activate srw_app + > conda activate workflow_tools ]===]) end