From f371890b9fcb42312da5f6228d87b5a4829e7e3a Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Thu, 30 Nov 2023 08:50:46 -0500 Subject: [PATCH] Upgrade modules to spack-stack/1.5.1 on non-production machines. (#19) --- .github/workflows/gcc.yml | 43 ++++++++--------- .github/workflows/intel.yml | 48 +++++++++---------- ci/spack.yaml | 17 +++---- modulefiles/gsiutils_cheyenne.gnu.lua | 32 ------------- modulefiles/gsiutils_cheyenne.intel.lua | 26 ---------- modulefiles/gsiutils_common.lua | 21 ++++---- modulefiles/gsiutils_hera.gnu.lua | 23 ++++----- modulefiles/gsiutils_hera.intel.lua | 21 ++++---- modulefiles/gsiutils_jet.lua | 20 ++++---- modulefiles/gsiutils_orion.lua | 18 ++++--- modulefiles/gsiutils_s4.lua | 22 ++++----- modulefiles/gsiutils_wcoss2.lua | 30 ++++++++++-- src/netcdf_io/interp_inc.fd/CMakeLists.txt | 6 ++- .../interp_inc.fd/{driver.f90 => driver.F90} | 17 +++++-- 14 files changed, 156 insertions(+), 188 deletions(-) delete mode 100644 modulefiles/gsiutils_cheyenne.gnu.lua delete mode 100644 modulefiles/gsiutils_cheyenne.intel.lua rename src/netcdf_io/interp_inc.fd/{driver.f90 => driver.F90} (97%) diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 374c22fe..e3bb0118 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -8,7 +8,7 @@ defaults: shell: bash -leo pipefail {0} env: - cache_key: gcc4 # The number (#) following the cache_key "gcc" is to flush Action cache. + cache_key: gcc CC: gcc-10 FC: gfortran-10 CXX: g++-10 @@ -24,30 +24,29 @@ env: # The jobs are split into: # 1. a dependency build step (setup), and -# 2. a GSI-utils build step (build) +# 2. a GSI-utils build step (gsi-utils) # The setup is run once and the environment is cached, -# so each build of GSI-utils can reuse the cached dependencies to save time (and compute). +# so each subsequent build of GSI-utils can reuse the cached dependencies to save time (and compute). jobs: setup: runs-on: ubuntu-latest steps: + - name: checkout # This is for getting spack.yaml + uses: actions/checkout@v3 + with: + path: gsi-utils + # Cache spack, compiler and dependencies - name: cache-env id: cache-env - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | spack ~/.spack - key: spack-${{ runner.os }}-${{ env.cache_key }} - - - name: checkout-gsiutils # This is for getting spack.yaml - if: steps.cache-env.outputs.cache-hit != 'true' - uses: actions/checkout@v2 - with: - path: GSI-utils + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }} # Install dependencies using Spack - name: install-dependencies-with-spack @@ -55,40 +54,40 @@ jobs: run: | git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git source spack/share/spack/setup-env.sh - spack env create gsiutils-env GSI-utils/ci/spack.yaml + spack env create gsiutils-env gsi-utils/ci/spack.yaml spack env activate gsiutils-env - spack compiler find spack external find spack add mpich@3.4.2 spack concretize - spack install -v --fail-fast + spack install -v --fail-fast --dirty + spack clean --all - build: + gsi-monitor: needs: setup runs-on: ubuntu-latest steps: - - name: checkout-gsiutils - uses: actions/checkout@v2 + - name: checkout + uses: actions/checkout@v3 with: - path: GSI-utils + path: gsi-utils - name: cache-env id: cache-env - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | spack ~/.spack - key: spack-${{ runner.os }}-${{ env.cache_key }} + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }} - - name: build-gsiutils + - name: build run: | source spack/share/spack/setup-env.sh spack env activate gsiutils-env export CC=mpicc export FC=mpif90 - cd GSI-utils + cd gsi-utils mkdir -p build && cd build cmake -DCMAKE_INSTALL_PREFIX=../install -DBUILD_UTIL_ALL=ON .. make -j2 VERBOSE=1 diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 1df68389..6a607196 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -9,7 +9,7 @@ defaults: # Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran env: - cache_key: intel5 # The number (#) following the cache_key "intel" is to flush Action cache. + cache_key: intel CC: icc FC: ifort CXX: icpc @@ -27,15 +27,20 @@ env: # The jobs are split into: # 1. a dependency build step (setup), and -# 2. a GSI-utils build step (build) +# 2. a GSI-utils build step (gsi-utils) # The setup is run once and the environment is cached, -# so each build of GSI-utils can reuse the cached dependencies to save time (and compute). +# so each subsequent build of gsi-utils can reuse the cached dependencies to save time (and compute). jobs: setup: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: + - name: checkout # This is for getting spack.yaml + uses: actions/checkout@v3 + with: + path: gsi-utils + # Cache spack, compiler and dependencies - name: cache-env id: cache-env @@ -45,53 +50,46 @@ jobs: spack ~/.spack /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }} + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }} - name: install-intel-compilers - if: steps.cache-env.outputs.cache-hit != 'true' run: | wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list sudo apt-get update - sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic + sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1 echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile - - name: checkout-gsiutils # This is for getting spack.yaml - if: steps.cache-env.outputs.cache-hit != 'true' - uses: actions/checkout@v2 - with: - path: GSI-utils - # Install dependencies using Spack - name: install-dependencies-with-spack if: steps.cache-env.outputs.cache-hit != 'true' run: | git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git source spack/share/spack/setup-env.sh - spack env create gsiutils-env GSI-utils/ci/spack.yaml + spack env create gsiutils-env gsi-utils/ci/spack.yaml spack env activate gsiutils-env - sudo mv /usr/local/ /usr/local_mv spack compiler find spack external find spack add intel-oneapi-mpi spack concretize spack install --dirty --fail-fast -v + spack clean --all - build: + gsi-utils: needs: setup - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - - name: checkout-gsiutils - uses: actions/checkout@v2 - with: - path: GSI-utils - - name: install-intel run: | echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile + - name: checkout-gsiutils + uses: actions/checkout@v3 + with: + path: gsi-utils + - name: cache-env id: cache-env uses: actions/cache@v3 @@ -100,15 +98,15 @@ jobs: spack ~/.spack /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }} + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }} - - name: build-gsiutils + - name: build run: | source spack/share/spack/setup-env.sh spack env activate gsiutils-env export CC=mpiicc export FC=mpiifort - cd GSI-utils + cd gsi-utils mkdir -p build && cd build cmake -DCMAKE_INSTALL_PREFIX=../install -DBUILD_UTIL_ALL=ON .. make -j2 VERBOSE=1 diff --git a/ci/spack.yaml b/ci/spack.yaml index d12629c5..c79c3268 100644 --- a/ci/spack.yaml +++ b/ci/spack.yaml @@ -5,22 +5,23 @@ spack: packages: all: - compiler: [intel, gcc] + compiler: [intel, gcc@10:10] specs: - - netcdf-c@4.7.4 - - netcdf-fortran@4.5.3 + - netcdf-c@4.9.2 + - netcdf-fortran@4.6.0 - bufr@11.7.0 - bacio@2.4.1 - - w3emc@2.9.2 + - w3emc@2.10.0 - sp@2.3.3 - - ip@3.3.3 + - ip@4.3.0 - sigio@2.3.2 - sfcio@1.4.1 - - nemsio@2.5.2 + - nemsio@2.5.4 - wrf-io@1.2.0 - - crtm@2.3.0 + - crtm@2.4.0 - ncio@1.1.2 - - gsi-ncdiag@1.0.0 + - gsi-ncdiag@1.1.2 + - cmake@3.20.1 view: true concretizer: unify: true diff --git a/modulefiles/gsiutils_cheyenne.gnu.lua b/modulefiles/gsiutils_cheyenne.gnu.lua deleted file mode 100644 index 49628f21..00000000 --- a/modulefiles/gsiutils_cheyenne.gnu.lua +++ /dev/null @@ -1,32 +0,0 @@ -help([[ -]]) - -load("cmake/3.22.0") -load("python/3.7.9") -load("ncarenv/1.3") -load("gnu/10.1.0") -load("mpt/2.22") -load("ncarcompilers/0.5.0") -unload("netcdf") - -prepend_path("MODULEPATH", "/glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/modulefiles/stack") - -load("hpc/1.2.0") -load("hpc-gnu/10.1.0") -load("hpc-mpt/2.22") - --- Preload w3nco to work around nemsio "find_dependency(w3nco)" hpc-stack bug -load("w3nco/2.4.1") - -load("gsiutils_common") - -local prod_util_ver=os.getenv("prod_util_ver") or "1.2.2" -load(pathJoin("prod_util", prod_util_ver)) - -pushenv("MKLROOT", "/glade/u/apps/opt/intel/2022.1/mkl/latest") - -pushenv("CC", "mpicc") -pushenv("FC", "mpif90") -pushenv("CXX", "mpicxx") - -whatis("Description: GSI utilities environment on Cheyenne with GNU Compilers") diff --git a/modulefiles/gsiutils_cheyenne.intel.lua b/modulefiles/gsiutils_cheyenne.intel.lua deleted file mode 100644 index 4c5e1038..00000000 --- a/modulefiles/gsiutils_cheyenne.intel.lua +++ /dev/null @@ -1,26 +0,0 @@ -help([[ -]]) - -load("cmake/3.22.0") -load("python/3.7.9") -load("ncarenv/1.3") -load("intel/2022.1") -load("mpt/2.25") -load("ncarcompilers/0.5.0") - -prepend_path("MODULEPATH", "/glade/work/epicufsrt/GMTB/tools/intel/2022.1/hpc-stack-v1.2.0_6eb6/modulefiles/stack") - -load("hpc/1.2.0") -load("hpc-intel/2022.1") -load("hpc-mpt/2.25") -load("mkl/2022.1") - -load("gsiutils_common") - -local prod_util_ver=os.getenv("prod_util_ver") or "1.2.2" -load(pathJoin("prod_util", prod_util_ver)) - -pushenv("CFLAGS", "-xHOST") -pushenv("FFLAGS", "-xHOST") - -whatis("Description: GSI utilities environment on Cheyenne with Intel Compilers") diff --git a/modulefiles/gsiutils_common.lua b/modulefiles/gsiutils_common.lua index ecd3db73..3e8dbccb 100644 --- a/modulefiles/gsiutils_common.lua +++ b/modulefiles/gsiutils_common.lua @@ -2,22 +2,24 @@ help([[ Load common modules to build GSI utilities on all machines ]]) -local netcdf_ver=os.getenv("netcdf_ver") or "4.7.4" +local netcdf_c_ver=os.getenv("netcdf_c_ver") or "4.9.2" +local netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0" local bufr_ver=os.getenv("bufr_ver") or "11.7.0" local bacio_ver=os.getenv("bacio_ver") or "2.4.1" -local w3emc_ver=os.getenv("w3emc_ver") or "2.9.1" +local w3emc_ver=os.getenv("w3emc_ver") or "2.10.0" local sp_ver=os.getenv("sp_ver") or "2.3.3" -local ip_ver=os.getenv("ip_ver") or "3.3.3" +local ip_ver=os.getenv("ip_ver") or "4.3.0" local sigio_ver=os.getenv("sigio_ver") or "2.3.2" local sfcio_ver=os.getenv("sfcio_ver") or "1.4.1" -local nemsio_ver=os.getenv("nemsio_ver") or "2.5.2" +local nemsio_ver=os.getenv("nemsio_ver") or "2.5.4" local wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0" local ncio_ver=os.getenv("ncio_ver") or "1.1.2" -local crtm_ver=os.getenv("crtm_ver") or "2.3.0" -local ncdiag_ver=os.getenv("ncdiag_ver") or "1.0.0" +local crtm_ver=os.getenv("crtm_ver") or "2.4.0" +local ncdiag_ver=os.getenv("ncdiag_ver") or "1.1.2" -load(pathJoin("netcdf", netcdf_ver)) +load(pathJoin("netcdf-c", netcdf_c_ver)) +load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) load(pathJoin("bufr", bufr_ver)) load(pathJoin("bacio", bacio_ver)) @@ -27,8 +29,7 @@ load(pathJoin("ip", ip_ver)) load(pathJoin("sigio", sigio_ver)) load(pathJoin("sfcio", sfcio_ver)) load(pathJoin("nemsio", nemsio_ver)) -load(pathJoin("wrf_io", wrf_io_ver)) +load(pathJoin("wrf-io", wrf_io_ver)) load(pathJoin("ncio", ncio_ver)) load(pathJoin("crtm", crtm_ver)) -load(pathJoin("ncdiag", ncdiag_ver)) - +load(pathJoin("gsi-ncdiag", ncdiag_ver)) diff --git a/modulefiles/gsiutils_hera.gnu.lua b/modulefiles/gsiutils_hera.gnu.lua index 2b366697..9c9186a5 100644 --- a/modulefiles/gsiutils_hera.gnu.lua +++ b/modulefiles/gsiutils_hera.gnu.lua @@ -1,23 +1,24 @@ help([[ ]]) -prepend_path("MODULEPATH", "/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack") +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") +--Needed for openmpi build +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles") -local hpc_ver=os.getenv("hpc_ver") or "1.1.0" -local hpc_gnu_ver=os.getenv("hpc_gnu_ver") or "9.2.0" -local hpc_mpich_ver=os.getenv("hpc_mpich_ver") or "3.3.2" -local cmake_ver=os.getenv("cmake_ver") or "3.20.1" -local prod_util_ver=os.getenv("prod_util_ver") or "1.2.2" +local python_ver=os.getenv("python_ver") or "3.10.8" +local stack_intel_ver=os.getenv("stack_gcc_ver") or "9.2.0" +local stack_impi_ver=os.getenv("stack_openmpi_ver") or "4.1.5" +local cmake_ver=os.getenv("cmake_ver") or "3.23.1" +local openblas_ver=os.getenv("cmake_ver") or "0.3.19" -load(pathJoin("hpc", hpc_ver)) -load(pathJoin("hpc-gnu", hpc_gnu_ver)) -load(pathJoin("hpc-mpich", hpc_mpich_ver)) +load(pathJoin("stack-gcc", stack_gcc_ver)) +load(pathJoin("stack-openmpi", stack_openmpi_ver)) +load(pathJoin("python", python_ver)) load(pathJoin("cmake", cmake_ver)) load("gsiutils_common") load(pathJoin("prod_util", prod_util_ver)) - -pushenv("MKLROOT", "/apps/oneapi/mkl/2022.0.2") +load(pathJoin("openblas", openblas_ver)) whatis("Description: GSI utilities environment on Hera with GNU Compilers") diff --git a/modulefiles/gsiutils_hera.intel.lua b/modulefiles/gsiutils_hera.intel.lua index 68df0e24..52824554 100644 --- a/modulefiles/gsiutils_hera.intel.lua +++ b/modulefiles/gsiutils_hera.intel.lua @@ -1,24 +1,19 @@ help([[ ]]) -prepend_path("MODULEPATH", "/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack") +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") -local hpc_ver=os.getenv("hpc_ver") or "1.1.0" -local hpc_intel_ver=os.getenv("hpc_intel_ver") or "18.0.5.274" -local hpc_impi_ver=os.getenv("hpc_impi_ver") or "2018.0.4" -local cmake_ver=os.getenv("cmake_ver") or "3.20.1" -local anaconda_ver=os.getenv("anaconda_ver") or "2.3.0" +local python_ver=os.getenv("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("hpc", hpc_ver)) -load(pathJoin("hpc-intel", hpc_intel_ver)) -load(pathJoin("hpc-impi", hpc_impi_ver)) +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) +load(pathJoin("python", python_ver)) load(pathJoin("cmake", cmake_ver)) -prepend_path("MODULEPATH", "/contrib/anaconda/modulefiles") - -load(pathJoin("anaconda", anaconda_ver)) - load("gsiutils_common") load(pathJoin("prod_util", prod_util_ver)) diff --git a/modulefiles/gsiutils_jet.lua b/modulefiles/gsiutils_jet.lua index febb8e04..fe9b6ed1 100644 --- a/modulefiles/gsiutils_jet.lua +++ b/modulefiles/gsiutils_jet.lua @@ -1,21 +1,21 @@ help([[ ]]) -load("cmake/3.20.1") +prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") -prepend_path("MODULEPATH", "/contrib/anaconda/modulefiles") - -load("anaconda/5.3.1") - -prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/nwprod/hpc-stack/libs/modulefiles/stack") +local python_ver=os.getenv("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("hpc/1.1.0") -load("hpc-intel/18.0.5.274") -load("hpc-impi/2018.4.274") +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) +load(pathJoin("python", python_ver)) +load(pathJoin("cmake", cmake_ver)) load("gsiutils_common") -local prod_util_ver=os.getenv("prod_util_ver") or "1.2.2" load(pathJoin("prod_util", prod_util_ver)) pushenv("CFLAGS", "-axSSE4.2,AVX,CORE-AVX2") diff --git a/modulefiles/gsiutils_orion.lua b/modulefiles/gsiutils_orion.lua index 95426149..adc7e37f 100644 --- a/modulefiles/gsiutils_orion.lua +++ b/modulefiles/gsiutils_orion.lua @@ -1,20 +1,18 @@ help([[ ]]) -prepend_path("MODULEPATH", "/apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack") +prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") -local hpc_ver=os.getenv("hpc_ver") or "1.1.0" -local hpc_intel_ver=os.getenv("hpc_intel_ver") or "2018.4" -local hpc_impi_ver=os.getenv("hpc_impi_ver") or "2018.4" -local cmake_ver=os.getenv("cmake_ver") or "3.22.1" -local python_ver=os.getenv("python_ver") or "3.7.5" +local stack_python_ver=os.getenv("python_ver") or "3.10.8" +local stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2" +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("hpc", hpc_ver)) -load(pathJoin("hpc-intel", hpc_intel_ver)) -load(pathJoin("hpc-impi", hpc_impi_ver)) +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) +load(pathJoin("python", stack_python_ver)) load(pathJoin("cmake", cmake_ver)) -load(pathJoin("python", python_ver)) load("gsiutils_common") diff --git a/modulefiles/gsiutils_s4.lua b/modulefiles/gsiutils_s4.lua index 1316a511..937ba754 100644 --- a/modulefiles/gsiutils_s4.lua +++ b/modulefiles/gsiutils_s4.lua @@ -1,20 +1,18 @@ help([[ ]]) -local hpc_ver=os.getenv("hpc_ver") or "1.1.0" -local hpc_intel_ver=os.getenv("hpc_intel_ver") or "18.0.4" -local hpc_impi_ver=os.getenv("hpc_impi_ver") or "18.0.4" -local miniconda_ver=os.getenv("miniconda_ver") or "3.8-s4" -local prod_util_ver=os.getenv("prod_util_ver") or "1.2.2" - -prepend_path("MODULEPATH", "/data/prod/hpc-stack/modulefiles/stack") +prepend_path("MODULEPATH", "/data/prod/jedi/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") -load("license_intel/S4") -load(pathJoin("hpc", hpc_ver)) -load(pathJoin("hpc-intel", hpc_intel_ver)) -load(pathJoin("hpc-impi", hpc_impi_ver)) +local python_ver=os.getenv("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.0" +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("miniconda", miniconda_ver)) +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) +load(pathJoin("python", python_ver)) +load(pathJoin("cmake", cmake_ver)) load("gsiutils_common") diff --git a/modulefiles/gsiutils_wcoss2.lua b/modulefiles/gsiutils_wcoss2.lua index 515405fc..41a0149a 100644 --- a/modulefiles/gsiutils_wcoss2.lua +++ b/modulefiles/gsiutils_wcoss2.lua @@ -7,6 +7,19 @@ local craype_ver=os.getenv("craype_ver") or "2.7.8" local cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.7" local cmake_ver= os.getenv("cmake_ver") or "3.20.2" local python_ver=os.getenv("python_ver") or "3.8.6" + +local netcdf_ver=os.getenv("netcdf_ver") or "4.7.4" + +local bufr_ver=os.getenv("bufr_ver") or "11.7.0" +local bacio_ver=os.getenv("bacio_ver") or "2.4.1" +local w3emc_ver=os.getenv("w3emc_ver") or "2.9.1" +local sp_ver=os.getenv("sp_ver") or "2.3.3" +local ip_ver=os.getenv("ip_ver") or "3.3.3" +local sigio_ver=os.getenv("sigio_ver") or "2.3.2" +local sfcio_ver=os.getenv("sfcio_ver") or "1.4.1" +local nemsio_ver=os.getenv("nemsio_ver") or "2.5.2" +local wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0" +local crtm_ver=os.getenv("crtm_ver") or "2.3.0" local prod_util_ver=os.getenv("prod_util_ver") or "2.0.10" load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver)) @@ -16,11 +29,20 @@ load(pathJoin("cray-mpich", cray_mpich_ver)) load(pathJoin("cmake", cmake_ver)) load(pathJoin("python", python_ver)) -load(pathJoin("prod_util", prod_util_ver)) +load(pathJoin("netcdf", netcdf_ver)) -load("gsiutils_common") -unload("ncio") -unload("ncdiag") +load(pathJoin("bufr", bufr_ver)) +load(pathJoin("bacio", bacio_ver)) +load(pathJoin("w3emc", w3emc_ver)) +load(pathJoin("sp", sp_ver)) +load(pathJoin("ip", ip_ver)) +load(pathJoin("sigio", sigio_ver)) +load(pathJoin("sfcio", sfcio_ver)) +load(pathJoin("nemsio", nemsio_ver)) +load(pathJoin("wrf_io", wrf_io_ver)) +load(pathJoin("crtm", crtm_ver)) + +load(pathJoin("prod_util", prod_util_ver)) pushenv("HPC_OPT", "/apps/ops/para/libs") prepend_path("MODULEPATH", "/apps/ops/para/libs/modulefiles/compiler/intel/19.1.3.304") diff --git a/src/netcdf_io/interp_inc.fd/CMakeLists.txt b/src/netcdf_io/interp_inc.fd/CMakeLists.txt index 1c2d5af1..7a91d8d9 100644 --- a/src/netcdf_io/interp_inc.fd/CMakeLists.txt +++ b/src/netcdf_io/interp_inc.fd/CMakeLists.txt @@ -4,13 +4,17 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fconvert=big-endian -ffree-line-length-0 -ffast-math -fno-second-underscore -frecord-marker=4") endif() -add_executable(interp_inc.x driver.f90) +add_executable(interp_inc.x driver.F90) target_link_libraries(interp_inc.x PRIVATE NetCDF::NetCDF_Fortran) target_link_libraries(interp_inc.x PRIVATE MPI::MPI_Fortran) target_link_libraries(interp_inc.x PRIVATE w3emc::w3emc_d) target_link_libraries(interp_inc.x PRIVATE ip::ip_d) target_link_libraries(interp_inc.x PRIVATE sp::sp_d) +if(ip_VERSION VERSION_GREATER_EQUAL 4.0.0) + target_compile_definitions(interp_inc.x PRIVATE "IP_V4") +endif() + # Install executable targets install(TARGETS interp_inc.x RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/src/netcdf_io/interp_inc.fd/driver.f90 b/src/netcdf_io/interp_inc.fd/driver.F90 similarity index 97% rename from src/netcdf_io/interp_inc.fd/driver.f90 rename to src/netcdf_io/interp_inc.fd/driver.F90 index cb45066e..722b5dde 100644 --- a/src/netcdf_io/interp_inc.fd/driver.f90 +++ b/src/netcdf_io/interp_inc.fd/driver.F90 @@ -24,14 +24,19 @@ program interp_inc use netcdf use mpi +#ifdef IP_V4 + use ip_mod, only: ipolates, ipolatev +#endif implicit none integer, parameter :: num_recs = 9 ! Declare externals - external :: w3tagb, netcdf_err, splat, ipolatev, & - ipolates, w3tage + external :: w3tagb, netcdf_err, splat, w3tage +#ifndef IP_V4 + external :: ipolates, ipolatev +#endif character(len=128) :: outfile, infile character(len=11) :: records(num_recs) @@ -245,8 +250,12 @@ program interp_inc if (mype == npes-1) print*,'- OPEN INPUT FILE: ', trim(infile) - error = nf90_open(trim(infile), ior(nf90_nowrite, nf90_mpiio), & - comm=mpi_comm_world, info = mpi_info_null, ncid=ncid_in) + ! Opening for parallel access breaks global workflow on S4 + ! Also there is no parallel access, so there is no need to open for parallel + ! access. + !error = nf90_open(trim(infile), ior(nf90_nowrite, nf90_mpiio), & + ! comm=mpi_comm_world, info = mpi_info_null, ncid=ncid_in) + error = nf90_open(trim(infile), ior(nf90_nowrite, nf90_mpiio), ncid=ncid_in) call netcdf_err(error, 'opening file='//trim(infile) ) error = nf90_inq_dimid(ncid_in, 'lon', id_dim)