From 6aedceae59fdeca1ba871e60c77567200066208e Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 29 May 2024 13:50:35 +0000 Subject: [PATCH 1/5] Update GCC CI to match the GSI. --- .github/workflows/gcc.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 71e318d9..231afcfe 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -48,6 +48,7 @@ jobs: df -h - name: checkout # This is for getting spack.yaml + if: steps.cache-env.outputs.cache-hit != 'true' uses: actions/checkout@v3 with: path: gsi-utils @@ -66,17 +67,20 @@ jobs: - name: install-dependencies-with-spack if: steps.cache-env.outputs.cache-hit != 'true' run: | + sudo apt-get install cmake 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 activate gsiutils-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 clean --all - gsi-monitor: + gsi-utils: needs: setup runs-on: ubuntu-latest @@ -99,10 +103,11 @@ jobs: run: | source spack/share/spack/setup-env.sh spack env activate gsiutils-env - export CC=mpicc - export FC=mpif90 cd gsi-utils mkdir -p build && cd build cmake -DCMAKE_INSTALL_PREFIX=../install -DBUILD_UTIL_ALL=ON .. make -j2 VERBOSE=1 make install + env: + CC: mpicc + FC: mpif90 From 96be033d2cda845707ee895930bbfeb3f1014ca3 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 29 May 2024 14:01:09 +0000 Subject: [PATCH 2/5] Update cmake version. Update Intel CI to match GSI. --- .github/workflows/gcc.yml | 4 ++-- .github/workflows/intel.yml | 16 ++++++++++------ ci/spack.yaml | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 231afcfe..4877a854 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -49,7 +49,7 @@ jobs: - name: checkout # This is for getting spack.yaml if: steps.cache-env.outputs.cache-hit != 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: gsi-utils @@ -86,7 +86,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: gsi-utils diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 6f32d723..dce5553e 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -33,7 +33,7 @@ env: jobs: setup: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: # Free up disk space @@ -51,7 +51,8 @@ jobs: df -h - name: checkout # This is for getting spack.yaml - uses: actions/checkout@v3 + if: steps.cache-env.outputs.cache-hit != 'true' + uses: actions/checkout@v4 with: path: gsi-utils @@ -73,6 +74,7 @@ jobs: 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-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1 + sudo apt-get clean echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile # Install dependencies using Spack @@ -84,6 +86,7 @@ jobs: spack env create gsiutils-env gsi-utils/ci/spack.yaml spack env activate gsiutils-env spack compiler find + sudo apt install cmake spack external find spack add intel-oneapi-mpi spack concretize @@ -92,7 +95,7 @@ jobs: gsi-utils: needs: setup - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: install-intel @@ -100,7 +103,7 @@ jobs: echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile - name: checkout-gsiutils - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: gsi-utils @@ -118,10 +121,11 @@ jobs: run: | source spack/share/spack/setup-env.sh spack env activate gsiutils-env - export CC=mpiicc - export FC=mpiifort cd gsi-utils mkdir -p build && cd build cmake -DCMAKE_INSTALL_PREFIX=../install -DBUILD_UTIL_ALL=ON .. make -j2 VERBOSE=1 make install + env: + CC: mpiicc + FC: mpiifort diff --git a/ci/spack.yaml b/ci/spack.yaml index 2b28fec7..808fcc4a 100644 --- a/ci/spack.yaml +++ b/ci/spack.yaml @@ -21,7 +21,7 @@ spack: - crtm@2.4.0.1 - ncio@1.1.2 - gsi-ncdiag@1.1.2 - - cmake@3.20.1 + - cmake@3.23.1 view: true concretizer: unify: when_possible From ef07a44d1f61cebb1635d868b3fea20981435788 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 29 May 2024 14:09:31 +0000 Subject: [PATCH 3/5] Let the OS install cmake instead of spack --- ci/spack.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/spack.yaml b/ci/spack.yaml index 808fcc4a..0c8d4f79 100644 --- a/ci/spack.yaml +++ b/ci/spack.yaml @@ -21,7 +21,6 @@ spack: - crtm@2.4.0.1 - ncio@1.1.2 - gsi-ncdiag@1.1.2 - - cmake@3.23.1 view: true concretizer: unify: when_possible From 1d3947e99fe24fe89173b9fe918693322a959415 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 29 May 2024 14:42:36 +0000 Subject: [PATCH 4/5] Update Intel MPI compiler names --- .github/workflows/intel.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index dce5553e..d87c289c 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -13,8 +13,8 @@ env: CC: icc FC: ifort CXX: icpc - I_MPI_CC: icc - I_MPI_F90: ifort + I_MPI_CC: mpiicc + I_MPI_F90: mpiifort # A note on flushing Action cache and relevance to "cache_key" above. # There is no way to flush the Action cache, and hence a number (#) is appended @@ -41,7 +41,7 @@ jobs: run: | df -h sudo swapoff -a - sudo rm -f /swapfile + sudo rm -rf /swapfile sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf "/usr/local/share/boost" From ec4e62e9adad60c89079c8d6d60fc13dd2c2b14a Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 29 May 2024 15:31:29 +0000 Subject: [PATCH 5/5] Force clean dependency installs --- .github/workflows/gcc.yml | 1 - .github/workflows/intel.yml | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index 4877a854..cf35f4c5 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -67,7 +67,6 @@ jobs: - name: install-dependencies-with-spack if: steps.cache-env.outputs.cache-hit != 'true' run: | - sudo apt-get install cmake 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 diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index d87c289c..3f1ca198 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -13,8 +13,8 @@ env: CC: icc FC: ifort CXX: icpc - I_MPI_CC: mpiicc - I_MPI_F90: mpiifort + I_MPI_CC: icc + I_MPI_F90: ifort # A note on flushing Action cache and relevance to "cache_key" above. # There is no way to flush the Action cache, and hence a number (#) is appended @@ -42,6 +42,7 @@ jobs: df -h sudo swapoff -a sudo rm -rf /swapfile + sudo rm -rf /usr_local_mv sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf "/usr/local/share/boost" @@ -81,6 +82,8 @@ jobs: - name: install-dependencies-with-spack if: steps.cache-env.outputs.cache-hit != 'true' run: | + sudo mv /usr/local/ /usr_local_mv + sudo apt-get install cmake 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