From 5b2bfa39a5b1fbe6bb1d247102679885685c9336 Mon Sep 17 00:00:00 2001 From: DavidBurrows-NCO <82525974+DavidBurrows-NCO@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:40:16 -0500 Subject: [PATCH] Update to build on both Gaea-C5 and C6 (#995) The Gaea-C5 OS upgrade changed the version numbers for stack-intel and stack-cray-mpich. Point to these versions. Specify either Gaea-C5 or Gaea-C6 when linking the fixed directories. Include separate builds for Gaea-C5 and Gaea-C6. Fixes #994. --- fix/link_fixdirs.sh | 12 ++-- modulefiles/build.container.intel.lua | 55 +++++++++++++++++++ ....gaea.intel.lua => build.gaeac5.intel.lua} | 4 +- ...aeaC6.intel.lua => build.gaeac6.intel.lua} | 28 +++++----- sorc/machine-setup.sh | 14 ++++- 5 files changed, 90 insertions(+), 23 deletions(-) create mode 100644 modulefiles/build.container.intel.lua rename modulefiles/{build.gaea.intel.lua => build.gaeac5.intel.lua} (96%) rename modulefiles/{build.gaeaC6.intel.lua => build.gaeac6.intel.lua} (67%) diff --git a/fix/link_fixdirs.sh b/fix/link_fixdirs.sh index 97136e4db..d3c539fc4 100755 --- a/fix/link_fixdirs.sh +++ b/fix/link_fixdirs.sh @@ -9,7 +9,7 @@ set -ex # 'nco' (copies data). # # $machine - is the machine. Choices are: -# 'wcoss2', 'hera', 'jet', 'orion', 'hercules', 's4', 'gaea' +# 'wcoss2', 'hera', 'jet', 'orion', 'hercules', 's4', 'gaeac5', 'gaeac6' RUN_ENVIR=${1} machine=${2} @@ -17,7 +17,7 @@ machine=${2} if [ $# -lt 2 ]; then set +x echo '***ERROR*** must specify two arguements: (1) RUN_ENVIR, (2) machine' - echo ' Syntax: link_fv3gfs.sh ( nco | emc ) ( wcoss2 | hera | jet | orion | hercules | s4 | gaea )' + echo ' Syntax: link_fv3gfs.sh ( nco | emc ) ( wcoss2 | hera | jet | orion | hercules | s4 | gaeac5 | gaeac6 )' exit 1 fi @@ -28,10 +28,10 @@ if [ $RUN_ENVIR != emc -a $RUN_ENVIR != nco ]; then exit 1 fi -if [ $machine != wcoss2 -a $machine != hera -a $machine != jet -a $machine != orion -a $machine != s4 -a $machine != hercules -a $machine != gaea ]; then +if [ $machine != wcoss2 -a $machine != hera -a $machine != jet -a $machine != orion -a $machine != s4 -a $machine != hercules -a $machine != gaeac5 -a $machine != gaeac6 ]; then set +x echo '***ERROR*** unsupported machine' - echo 'Syntax: link_fv3gfs.sh ( nco | emc ) ( wcoss2 | hera | jet | orion | hercules | s4 | gaea )' + echo 'Syntax: link_fv3gfs.sh ( nco | emc ) ( wcoss2 | hera | jet | orion | hercules | s4 | gaeac5 | gaeac6 )' exit 1 fi @@ -54,8 +54,10 @@ elif [ $machine = "wcoss2" ]; then FIX_DIR="/lfs/h2/emc/global/noscrub/emc.global/FIX/fix" elif [ $machine = "s4" ]; then FIX_DIR="/data/prod/glopara/fix" -elif [ $machine = "gaea" ]; then +elif [ $machine = "gaeac5" ]; then FIX_DIR="/gpfs/f5/ufs-ard/world-shared/global/glopara/data/fix" +elif [ $machine = "gaeac6" ]; then + FIX_DIR="/gpfs/f6/bil-fire8/world-shared/global/glopara/data/fix" fi am_ver=${am_ver:-20220805} diff --git a/modulefiles/build.container.intel.lua b/modulefiles/build.container.intel.lua new file mode 100644 index 000000000..5d4beb308 --- /dev/null +++ b/modulefiles/build.container.intel.lua @@ -0,0 +1,55 @@ +help([[ +Load environment to compile UFS_UTILS in a container using Intel +]]) + +prepend_path("MODULEPATH", "/opt/spack-stack/spack-stack-1.8.0/envs/unified-env/install/modulefiles/Core") + +stack_intel_ver=os.getenv("stack_intel_ver") or "2021.10.0" +load(pathJoin("stack-intel", stack_intel_ver)) + +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.12.1" +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.27.9" +load(pathJoin("cmake", cmake_ver)) + +bacio_ver=os.getenv("bacio_ver") or "2.4.1" +load(pathJoin("bacio", bacio_ver)) + +g2_ver=os.getenv("g2_ver") or "3.5.1" +load(pathJoin("g2", g2_ver)) + +ip_ver=os.getenv("ip_ver") or "5.0.0" +load(pathJoin("ip", ip_ver)) + +nemsio_ver=os.getenv("nemsio_ver") or "2.5.4" +load(pathJoin("nemsio", nemsio_ver)) + +sp_ver=os.getenv("sp_ver") or "2.5.0" +load(pathJoin("sp", sp_ver)) + +w3emc_ver=os.getenv("w3emc_ver") or "2.10.0" +load(pathJoin("w3emc", w3emc_ver)) + +sigio_ver=os.getenv("sigio_ver") or "2.3.2" +load(pathJoin("sigio", sigio_ver)) + +png_ver=os.getenv("png_ver") or "1.6.37" +load(pathJoin("libpng", png_ver)) + +netcdf_c_ver=os.getenv("netcdf_c_ver") or "4.9.2" +load(pathJoin("netcdf-c", netcdf_c_ver)) + +netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.1" +load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) + +nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1" +load(pathJoin("nccmp", nccmp_ver)) + +esmf_ver=os.getenv("esmf_ver") or "8.6.1" +load(pathJoin("esmf", esmf_ver)) + +nco_ver=os.getenv("nco_ver") or "5.1.6" +load(pathJoin("nco", nco_ver)) + +whatis("Description: UFS_UTILS build environment") diff --git a/modulefiles/build.gaea.intel.lua b/modulefiles/build.gaeac5.intel.lua similarity index 96% rename from modulefiles/build.gaea.intel.lua rename to modulefiles/build.gaeac5.intel.lua index 2898c3a29..e9dd614b3 100644 --- a/modulefiles/build.gaea.intel.lua +++ b/modulefiles/build.gaeac5.intel.lua @@ -7,10 +7,10 @@ load("hsi") prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core") -stack_intel_ver=os.getenv("stack_intel_ver") or "2023.1.0" +stack_intel_ver=os.getenv("stack_intel_ver") or "2023.2.0" load(pathJoin("stack-intel", stack_intel_ver)) -stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "8.1.25" +stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "8.1.28" load(pathJoin("stack-cray-mpich", stack_cray_mpich_ver)) cmake_ver=os.getenv("cmake_ver") or "3.23.1" diff --git a/modulefiles/build.gaeaC6.intel.lua b/modulefiles/build.gaeac6.intel.lua similarity index 67% rename from modulefiles/build.gaeaC6.intel.lua rename to modulefiles/build.gaeac6.intel.lua index de35f3959..e1f1cbfec 100644 --- a/modulefiles/build.gaeaC6.intel.lua +++ b/modulefiles/build.gaeac6.intel.lua @@ -1,17 +1,17 @@ help([[ -Load environment to compile UFS_UTILS on GAEA C6 using Intel +Load environment to compile UFS_UTILS on Gaea C6 using Intel ]]) -prepend_path("MODULEPATH", "/autofs/ncrc-svm1_proj/epic/spack-stack/spack-stack-1.6.0/envs/unified-env-c6/install/modulefiles/Core") +prepend_path("MODULEPATH", "/sw/rdtn/modulefiles") +load("hsi") + +prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/c6/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core") stack_intel_ver=os.getenv("stack_intel_ver") or "2023.2.0" load(pathJoin("stack-intel", stack_intel_ver)) -stack_mpich_ver=os.getenv("stack_mpich_ver") or "8.1.29" -load(pathJoin("stack-cray-mpich", stack_mpich_ver)) - -craype_ver=os.getenv("craype_ver") or "2.7.30" -load(pathJoin("craype", craype_ver)) +stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "8.1.29" +load(pathJoin("stack-cray-mpich", stack_cray_mpich_ver)) cmake_ver=os.getenv("cmake_ver") or "3.23.1" load(pathJoin("cmake", cmake_ver)) @@ -34,17 +34,18 @@ load(pathJoin("sp", sp_ver)) w3emc_ver=os.getenv("w3emc_ver") or "2.10.0" load(pathJoin("w3emc", w3emc_ver)) +-- Uncomment when CHGRES_ALL is ON +--sfcio_ver=os.getenv("sfcio_ver") or "1.4.1" +--load(pathJoin("sfcio", sfcio_ver)) + sigio_ver=os.getenv("sigio_ver") or "2.3.2" load(pathJoin("sigio", sigio_ver)) -sfcio_ver=os.getenv("sfcio_ver") or "1.4.1" -load(pathJoin("sfcio", sfcio_ver)) - zlib_ver=os.getenv("zlib_ver") or "1.2.13" load(pathJoin("zlib", zlib_ver)) -libpng_ver=os.getenv("libpng_ver") or "1.6.37" -load(pathJoin("libpng", libpng_ver)) +png_ver=os.getenv("png_ver") or "1.6.37" +load(pathJoin("libpng", png_ver)) netcdf_c_ver=os.getenv("netcdf_c_ver") or "4.9.2" load(pathJoin("netcdf-c", netcdf_c_ver)) @@ -55,10 +56,11 @@ load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1" load(pathJoin("nccmp", nccmp_ver)) -esmf_ver=os.getenv("esmf_ver") or "8.5.0" +esmf_ver=os.getenv("esmf_ver") or "8.6.0" load(pathJoin("esmf", esmf_ver)) nco_ver=os.getenv("nco_ver") or "5.0.6" load(pathJoin("nco", nco_ver)) whatis("Description: UFS_UTILS build environment") + diff --git a/sorc/machine-setup.sh b/sorc/machine-setup.sh index 944c5e48c..2ee8e1565 100644 --- a/sorc/machine-setup.sh +++ b/sorc/machine-setup.sh @@ -30,6 +30,14 @@ if [[ -d /lfs5 ]] ; then elif [[ -d /lfs/h1 ]] ; then target=wcoss2 module reset +elif [[ -d /opt/spack-stack ]] ; then + # We are using a container + if ( ! eval module help > /dev/null 2>&1 ) ; then + echo load the module command 1>&2 + source /apps/lmod/lmod/init/$__ms_shell + fi + target=container + module purge elif [[ -d /scratch1 ]] ; then # We are on NOAA Hera if ( ! eval module help > /dev/null 2>&1 ) ; then @@ -39,7 +47,7 @@ elif [[ -d /scratch1 ]] ; then target=hera module purge elif [[ "$(hostname)" == "gaea5"* && -d /gpfs/f5 ]] ; then - # We are on GAEA. + # We are on GAEAC5. if ( ! eval module help > /dev/null 2>&1 ) ; then # We cannot simply load the module command. The GAEA # /etc/profile modifies a number of module-related variables @@ -49,9 +57,9 @@ elif [[ "$(hostname)" == "gaea5"* && -d /gpfs/f5 ]] ; then source /etc/profile fi module reset - target=gaea + target=gaeac5 elif [[ "$(hostname)" == "gaea6"* && -d /gpfs/f6 ]] ; then - target=gaeaC6 + target=gaeac6 source /opt/cray/pe/lmod/8.7.31/init/$__ms_shell elif [[ "$(hostname)" =~ "Orion" || "$(hostname)" =~ "orion" ]]; then target="orion"