diff --git a/.github/workflows/gnu.yml b/.github/workflows/gnu.yml index d1aa0e967..d28d1bb5b 100644 --- a/.github/workflows/gnu.yml +++ b/.github/workflows/gnu.yml @@ -7,7 +7,7 @@ concurrency: cancel-in-progress: true env: - cache_key: gnu8 + cache_key: gnu11 CC: gcc-10 FC: gfortran-10 CXX: g++-10 @@ -24,14 +24,14 @@ jobs: steps: - name: checkout-ww3 if: steps.cache-env.outputs.cache-hit != 'true' - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: ww3 # Cache spack, OASIS, and compiler # No way to flush Action cache, so key may have # appended - name: cache-env id: cache-env - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | spack @@ -45,7 +45,7 @@ jobs: run: | # Install NetCDF, ESMF, g2, etc using Spack sudo apt install cmake - git clone -c feature.manyFiles=true https://github.com/spack/spack.git + git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git source spack/share/spack/setup-env.sh spack env create ww3-gnu ww3/model/ci/spack_gnu.yaml spack env activate ww3-gnu @@ -77,13 +77,13 @@ jobs: steps: - name: checkout-ww3 - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: ww3 - name: cache-env id: cache-env - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | spack diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index c40f3265e..700553cea 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -8,7 +8,7 @@ concurrency: # Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran env: - cache_key: intel7 + cache_key: intel10 CC: icc FC: ifort CXX: icpc @@ -16,18 +16,18 @@ env: I_MPI_F90: ifort # Split into a dependency build step, and a WW3 build step which -# builds multiple switches in a matrix. The setup is run once and +# builds multiple switches in a matrix. The setup is run once and # the environment is cached so each build of WW3 can share the dependencies. jobs: setup: - runs-on: ubuntu-20.04 + runs-on: ubuntu-20.04 steps: - name: checkout-ww3 if: steps.cache-env.outputs.cache-hit != 'true' - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: ww3 @@ -35,7 +35,7 @@ jobs: # No way to flush Action cache, so key may have # appended - name: cache-env id: cache-env - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | spack @@ -51,7 +51,7 @@ jobs: 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-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 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic # Build WW3 spack environment - name: install-dependencies-with-spack @@ -59,18 +59,19 @@ jobs: run: | # Install NetCDF, ESMF, g2, etc using Spack . /opt/intel/oneapi/setvars.sh - sudo mv /usr/local /usrlocal_renamed - sudo apt install cmake - git clone -c feature.manyFiles=true https://github.com/spack/spack.git + git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git source spack/share/spack/setup-env.sh ln -s $(realpath $(which gcc)) spack/lib/spack/env/intel/gcc # spack/make bug in ESMF spack env create ww3-intel ww3/model/ci/spack_intel.yaml spack env activate ww3-intel spack compiler find - spack external find cmake + sudo apt install cmake + spack external find spack add intel-oneapi-mpi + spack config add "packages:all:require:['%intel']" spack concretize spack install --dirty -v --fail-fast + spack clean --all - name: build-oasis if: steps.cache-env.outputs.cache-hit != 'true' @@ -91,17 +92,17 @@ jobs: strategy: matrix: switch: [Ifremer1, NCEP_st2, NCEP_st4, ite_pdlib, NCEP_st4sbs, NCEP_glwu, OASACM, UKMO, MULTI_ESMF] - runs-on: ubuntu-20.04 + runs-on: ubuntu-20.04 steps: - name: checkout-ww3 - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: ww3 - name: cache-env id: cache-env - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | spack @@ -116,8 +117,8 @@ jobs: source spack/share/spack/setup-env.sh spack env activate ww3-intel cd ww3 - export CC=mpicc - export FC=mpif90 + export CC=mpiicc + export FC=mpiifort export OASISDIR=${GITHUB_WORKSPACE}/work_oasis3-mct mkdir build && cd build if [[ ${{ matrix.switch }} == "MULTI_ESMF" ]]; then diff --git a/model/ci/spack_gnu.yaml b/model/ci/spack_gnu.yaml index 5f1ca3a47..d2c16711a 100644 --- a/model/ci/spack_gnu.yaml +++ b/model/ci/spack_gnu.yaml @@ -13,7 +13,8 @@ spack: - g2@3.4.5 - bacio@2.4.1 - w3emc@2.9.2 - - esmf@8.1.1~pio~pnetcdf~xerces + - parallelio@2.5.9+fortran~pnetcdf + - esmf@8.4.2~debug~xerces+external-parallelio view: true concretizer: unify: when_possible diff --git a/model/ci/spack_intel.yaml b/model/ci/spack_intel.yaml index ee09d8827..c571da825 100644 --- a/model/ci/spack_intel.yaml +++ b/model/ci/spack_intel.yaml @@ -5,16 +5,17 @@ spack: providers: mpi: [intel-oneapi-mpi] specs: + - netcdf-c@4.7.4~dap + - netcdf-fortran@4.5.3 + - bacio@2.4.1 + - g2@3.4.5 - metis@5.1.0~shared - parmetis@4.0.3~shared - scotch@7.0.1+mpi+metis~shared - - netcdf-c@4.7.4~dap - - netcdf-fortran@4.5.3 - jasper@2.0.32 - - g2@3.4.5 - - bacio@2.4.1 - w3emc@2.9.2 - - esmf@8.1.1~pio~pnetcdf~xerces + - parallelio@2.5.9+fortran~pnetcdf + - esmf@8.4.2~debug~xerces+external-parallelio - intel-oneapi-mpi %intel view: true concretizer: