diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 1f6fa3afcd..eef57cecb8 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -9,9 +9,9 @@ defaults: env: cache_key: gcc - CC: gcc-10 - FC: gfortran-10 - CXX: g++-10 + CC: gcc-13 + FC: gfortran-13 + CXX: g++-13 # The jobs are split into: # 1. a dependency build step (setup), and @@ -34,7 +34,7 @@ jobs: # Cache spack, compiler and dependencies - name: cache-env id: cache-env - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | spack @@ -43,19 +43,18 @@ jobs: # Install dependencies using Spack - name: install-dependencies-with-spack - if: steps.cache-env.outputs.cache-hit != 'true' + # if: steps.cache-env.outputs.cache-hit != 'true' run: | sudo apt-get install cmake + rm -rf spack git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git source spack/share/spack/setup-env.sh - spack env create gsi-env gsi/ci/spack.yaml + spack env create gsi-env gsi/ci/spack_gcc.yaml spack env activate gsi-env spack compiler find - sudo apt install cmake spack external find - spack add mpich@3.4.2 spack concretize - spack install -v --fail-fast --dirty + spack install --fail-fast --dirty spack clean -a gsi: @@ -70,7 +69,7 @@ jobs: - name: cache-env id: cache-env - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | spack diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index d21420687a..9d2dc4c294 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -34,7 +34,9 @@ jobs: sudo swapoff -a sudo rm -f /swapfile sudo apt clean - docker rmi $(docker image ls -aq) + DOCKER_IMGS=$(docker image ls -aq) + if [[ ! -z "${DOCKER_IMGS}" ]]; then docker rmi ${DOCKER_IMGS}; fi + df -h # Checkout the GSI to get the ci/spack.yaml file - name: checkout @@ -52,9 +54,10 @@ jobs: spack ~/.spack /opt/intel - key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi/ci/spack.yaml') }} + key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi/ci/spack.yaml') }}-1 - 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 @@ -70,16 +73,15 @@ jobs: run: | sudo mv /usr/local/ /usr_local_mv sudo apt-get install cmake + rm -rf spack git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git source spack/share/spack/setup-env.sh - spack env create gsi-env gsi/ci/spack.yaml + spack env create gsi-env gsi/ci/spack_intel.yaml spack env activate gsi-env spack compiler find - sudo apt install cmake spack external find - spack add intel-oneapi-mpi spack concretize - spack install -v --fail-fast --dirty + spack install --fail-fast --dirty spack clean -a gsi: @@ -108,6 +110,8 @@ jobs: - name: build run: | + sudo mv /usr/local/ /usr_local_mv + sudo apt-get install cmake libblas-dev liblapack-dev source spack/share/spack/setup-env.sh spack env activate gsi-env cd gsi diff --git a/ci/spack_gcc.yaml b/ci/spack_gcc.yaml new file mode 100644 index 0000000000..ad8965add6 --- /dev/null +++ b/ci/spack_gcc.yaml @@ -0,0 +1,30 @@ +# Spack environment file to build GSI dependencies +spack: + packages: + all: + providers: + blas: [openblas] + lapack: [openblas] + mpi: [mpich] + compiler: + - gcc@13 + specs: + - netcdf-c@4.9.2 + - netcdf-fortran@4.6.1 + - bufr@11.7.0 + - bacio@2.4.1 + - w3emc@2.10.0 + - sp@2.5.0 + - ip@4.3.0 + - sigio@2.3.2 + - sfcio@1.4.1 + - nemsio@2.5.4 + - wrf-io@1.2.0 + - ncio@1.1.2 + - crtm@2.4.0.1 + - gsi-ncdiag@1.1.2 + - mpich@3.4.2 + - openblas@0.3.28 + view: true + concretizer: + unify: true diff --git a/ci/spack.yaml b/ci/spack_intel.yaml similarity index 75% rename from ci/spack.yaml rename to ci/spack_intel.yaml index 647904108e..c3c74e407c 100644 --- a/ci/spack.yaml +++ b/ci/spack_intel.yaml @@ -2,11 +2,12 @@ spack: packages: all: + providers: + mpi: [intel-oneapi-mpi] compiler: - intel - - gcc@10:10 specs: - - netcdf-c@4.9.2 + - netcdf-c@4.9.2 ~blosc build_system=cmake - netcdf-fortran@4.6.1 - bufr@11.7.0 - bacio@2.4.1 @@ -20,6 +21,7 @@ spack: - ncio@1.1.2 - crtm@2.4.0.1 - gsi-ncdiag@1.1.2 + - intel-oneapi-mpi@2021.10.0 view: true concretizer: unify: true