From e3962f97c91aa727fbad5c2904ea9fbe6697aa55 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 26 Dec 2023 08:17:39 -0700 Subject: [PATCH 1/5] added extra oneapi install --- .github/workflows/intel.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 700553cea..a8bda8ee5 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -1,3 +1,8 @@ +# This is a GitHub actions workflow for WW3. +# +# This workflow builds with the Intel compilers. +# +# Matt Masarik, Alex Richert, Ed Hartnett name: Intel Linux Build on: [push, pull_request, workflow_dispatch] @@ -8,7 +13,7 @@ concurrency: # Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran env: - cache_key: intel10 + cache_key: intel10-1 CC: icc FC: ifort CXX: icpc @@ -42,7 +47,7 @@ jobs: ~/.spack work_oasis3-mct /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }} + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }}-1 - name: install-intel-compilers if: steps.cache-env.outputs.cache-hit != 'true' @@ -51,7 +56,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-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-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1 intel-oneapi-openmp # Build WW3 spack environment - name: install-dependencies-with-spack @@ -109,7 +114,7 @@ jobs: ~/.spack work_oasis3-mct /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }} + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }}-1 - name: build-ww3 run: | From 338d59e9a99ed449dcf3bb228eb7771e81b3438d Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 26 Dec 2023 09:01:06 -0700 Subject: [PATCH 2/5] switched to ubuntu-latest --- .github/workflows/intel.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index a8bda8ee5..d781d2816 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -13,7 +13,7 @@ concurrency: # Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran env: - cache_key: intel10-1 + cache_key: intel10-2 CC: icc FC: ifort CXX: icpc @@ -26,7 +26,7 @@ env: jobs: setup: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: @@ -47,7 +47,7 @@ jobs: ~/.spack work_oasis3-mct /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }}-1 + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }}-2 - name: install-intel-compilers if: steps.cache-env.outputs.cache-hit != 'true' @@ -97,7 +97,7 @@ 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-latest steps: - name: checkout-ww3 @@ -114,7 +114,7 @@ jobs: ~/.spack work_oasis3-mct /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }}-1 + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }}-2 - name: build-ww3 run: | From 535376d885ae0719139e730a160362850fed7264 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 26 Dec 2023 09:10:42 -0700 Subject: [PATCH 3/5] switched to ubuntu-20.04 --- .github/workflows/intel.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index d781d2816..54a388c55 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -13,7 +13,7 @@ concurrency: # Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran env: - cache_key: intel10-2 + cache_key: intel10-3 CC: icc FC: ifort CXX: icpc @@ -26,7 +26,7 @@ env: jobs: setup: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: @@ -47,7 +47,7 @@ jobs: ~/.spack work_oasis3-mct /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }}-2 + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }} - name: install-intel-compilers if: steps.cache-env.outputs.cache-hit != 'true' @@ -97,7 +97,7 @@ jobs: strategy: matrix: switch: [Ifremer1, NCEP_st2, NCEP_st4, ite_pdlib, NCEP_st4sbs, NCEP_glwu, OASACM, UKMO, MULTI_ESMF] - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: checkout-ww3 @@ -114,7 +114,7 @@ jobs: ~/.spack work_oasis3-mct /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }}-2 + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }} - name: build-ww3 run: | From a4f6ae179fdc5d5d5a4a95beb9dadf8ab5788b17 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 26 Dec 2023 10:05:11 -0700 Subject: [PATCH 4/5] adding intel2 --- .github/workflows/intel2.yml | 134 +++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 .github/workflows/intel2.yml diff --git a/.github/workflows/intel2.yml b/.github/workflows/intel2.yml new file mode 100644 index 000000000..09db5e88e --- /dev/null +++ b/.github/workflows/intel2.yml @@ -0,0 +1,134 @@ +# This is a GitHub actions workflow for WW3. +# +# This workflow builds with the Intel compilers. +# +# Matt Masarik, Alex Richert, Ed Hartnett +name: Intel Linux Build +on: [push, pull_request, workflow_dispatch] + +# Cancel in-progress workflows when pushing to a branch +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +# Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran +env: + cache_key: intel10-4 + CC: icx + FC: ifx + CXX: icpc + I_MPI_CC: icx + I_MPI_F90: ifx + +# Split into a dependency build step, and a WW3 build step which +# 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 + + steps: + + - name: checkout-ww3 + if: steps.cache-env.outputs.cache-hit != 'true' + 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@v3 + with: + path: | + spack + ~/.spack + work_oasis3-mct + /opt/intel + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.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-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1 intel-oneapi-openmp + + # Build WW3 spack environment + - name: install-dependencies-with-spack + if: steps.cache-env.outputs.cache-hit != 'true' + run: | + # Install NetCDF, ESMF, g2, etc using Spack + . /opt/intel/oneapi/setvars.sh + 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 + 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' + run: | + . /opt/intel/oneapi/setvars.sh + source spack/share/spack/setup-env.sh + spack env activate ww3-intel + export WWATCH3_DIR=${GITHUB_WORKSPACE}/ww3/model + export OASIS_INPUT_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/oasis3-mct + export OASIS_WORK_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct + cd ww3/regtests/ww3_tp2.14/input/oasis3-mct/util/make_dir + cmake . + make + cp -r ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct ${GITHUB_WORKSPACE} + + build: + needs: setup + strategy: + matrix: + switch: [Ifremer1, NCEP_st2, NCEP_st4, ite_pdlib, NCEP_st4sbs, NCEP_glwu, OASACM, UKMO, MULTI_ESMF] + runs-on: ubuntu-20.04 + + steps: + - name: checkout-ww3 + uses: actions/checkout@v3 + with: + path: ww3 + + - name: cache-env + id: cache-env + uses: actions/cache@v3 + with: + path: | + spack + ~/.spack + work_oasis3-mct + /opt/intel + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }} + + - name: build-ww3 + run: | + . /opt/intel/oneapi/setvars.sh + source spack/share/spack/setup-env.sh + spack env activate ww3-intel + cd ww3 + export CC=mpiicc + export FC=mpiifort + export OASISDIR=${GITHUB_WORKSPACE}/work_oasis3-mct + mkdir build && cd build + if [[ ${{ matrix.switch }} == "MULTI_ESMF" ]]; then + cmake .. -DMULTI_ESMF=ON -DSWITCH=multi_esmf + else + cmake .. -DSWITCH=${{ matrix.switch }} + fi + make -j2 VERBOSE=1 From f1b71b2f1a2d9ad1e86de00ea676c2e36eb4bfa6 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 26 Dec 2023 10:46:01 -0700 Subject: [PATCH 5/5] removing intel2 --- .github/workflows/intel2.yml | 134 ----------------------------------- 1 file changed, 134 deletions(-) delete mode 100644 .github/workflows/intel2.yml diff --git a/.github/workflows/intel2.yml b/.github/workflows/intel2.yml deleted file mode 100644 index 09db5e88e..000000000 --- a/.github/workflows/intel2.yml +++ /dev/null @@ -1,134 +0,0 @@ -# This is a GitHub actions workflow for WW3. -# -# This workflow builds with the Intel compilers. -# -# Matt Masarik, Alex Richert, Ed Hartnett -name: Intel Linux Build -on: [push, pull_request, workflow_dispatch] - -# Cancel in-progress workflows when pushing to a branch -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -# Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran -env: - cache_key: intel10-4 - CC: icx - FC: ifx - CXX: icpc - I_MPI_CC: icx - I_MPI_F90: ifx - -# Split into a dependency build step, and a WW3 build step which -# 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 - - steps: - - - name: checkout-ww3 - if: steps.cache-env.outputs.cache-hit != 'true' - 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@v3 - with: - path: | - spack - ~/.spack - work_oasis3-mct - /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.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-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1 intel-oneapi-openmp - - # Build WW3 spack environment - - name: install-dependencies-with-spack - if: steps.cache-env.outputs.cache-hit != 'true' - run: | - # Install NetCDF, ESMF, g2, etc using Spack - . /opt/intel/oneapi/setvars.sh - 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 - 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' - run: | - . /opt/intel/oneapi/setvars.sh - source spack/share/spack/setup-env.sh - spack env activate ww3-intel - export WWATCH3_DIR=${GITHUB_WORKSPACE}/ww3/model - export OASIS_INPUT_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/oasis3-mct - export OASIS_WORK_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct - cd ww3/regtests/ww3_tp2.14/input/oasis3-mct/util/make_dir - cmake . - make - cp -r ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct ${GITHUB_WORKSPACE} - - build: - needs: setup - strategy: - matrix: - switch: [Ifremer1, NCEP_st2, NCEP_st4, ite_pdlib, NCEP_st4sbs, NCEP_glwu, OASACM, UKMO, MULTI_ESMF] - runs-on: ubuntu-20.04 - - steps: - - name: checkout-ww3 - uses: actions/checkout@v3 - with: - path: ww3 - - - name: cache-env - id: cache-env - uses: actions/cache@v3 - with: - path: | - spack - ~/.spack - work_oasis3-mct - /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_intel.yaml') }} - - - name: build-ww3 - run: | - . /opt/intel/oneapi/setvars.sh - source spack/share/spack/setup-env.sh - spack env activate ww3-intel - cd ww3 - export CC=mpiicc - export FC=mpiifort - export OASISDIR=${GITHUB_WORKSPACE}/work_oasis3-mct - mkdir build && cd build - if [[ ${{ matrix.switch }} == "MULTI_ESMF" ]]; then - cmake .. -DMULTI_ESMF=ON -DSWITCH=multi_esmf - else - cmake .. -DSWITCH=${{ matrix.switch }} - fi - make -j2 VERBOSE=1