Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel CI bugfix #1064

Merged
merged 17 commits into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
31 changes: 16 additions & 15 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ 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
I_MPI_CC: icc
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

# 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
Expand All @@ -51,26 +51,27 @@ 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
if: steps.cache-env.outputs.cache-hit != 'true'
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'
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion model/ci/spack_gnu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ spack:
- [email protected]
- [email protected]
- [email protected]
- [email protected]~pio~pnetcdf~xerces
- [email protected]+fortran~pnetcdf
- [email protected]~debug~xerces+external-parallelio
view: true
concretizer:
unify: when_possible
11 changes: 6 additions & 5 deletions model/ci/spack_intel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ spack:
providers:
mpi: [intel-oneapi-mpi]
specs:
- [email protected]~dap
- [email protected]
- [email protected]
- [email protected]
- [email protected]~shared
- [email protected]~shared
- [email protected]+mpi+metis~shared
- [email protected]~dap
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]~pio~pnetcdf~xerces
- [email protected]+fortran~pnetcdf
- [email protected]~debug~xerces+external-parallelio
- intel-oneapi-mpi %intel
view: true
concretizer:
Expand Down