Skip to content

Commit

Permalink
Modify testlists for blom and hamocc (#383)
Browse files Browse the repository at this point in the history
* Modify testlists for blom and hamocc

* Update ci.yml with setting from v1.6.1
  • Loading branch information
TomasTorsvik authored Aug 21, 2024
1 parent 7ffeaaf commit 212aeef
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 114 deletions.
114 changes: 10 additions & 104 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]

env:
# This version of Meson should be available as an EasyBuild on Fram and Betzy
MESON_VERSION: '0.55.1'
MESON_VERSION: '1.1.1'
jobs:
build:
name: Build BLOM on Github provided OS
Expand Down Expand Up @@ -36,13 +36,15 @@ jobs:
if: runner.os == 'macOS'

- name: Setup Python for newer version of Meson
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Meson
run: python -m pip install meson==${{ env.MESON_VERSION }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'recursive'

Expand All @@ -54,113 +56,17 @@ jobs:
meson setup builddir -Dmpi=${{ matrix.mpi }} -Dopenmp=${{ matrix.openmp }} -Decosys=${{ matrix.ecosys }} --buildtype=debugoptimized
meson compile -C builddir
# macos-latest throws a SIGFPE exception for the test runs
- name: Test code
if: ${{ matrix.mpi == false }}
if: ${{ runner.os == 'Linux' && matrix.mpi == false }}
run: |
ulimit -s 65532
meson test -C builddir
- name: Upload test log
if: ${{ matrix.mpi == false }}
uses: actions/upload-artifact@v2
if: ${{ runner.os == 'Linux' && matrix.mpi == false }}
uses: actions/upload-artifact@v4
with:
name: testlog-${{ runner.os }}-gcc
name: testlog-${{ runner.os }}-OMP${{ matrix.openmp }}-gcc
path: builddir/meson-logs/testlog.txt

intel:
name: Build BLOM using Intel compilers
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
mpi: [true, false]
openmp: ['enabled', 'disabled']
ecosys: [true, false]
exclude:
# Run test (fuk95 executed with mpi=false) fails with ecosys
- ecosys: true
mpi: false
# Tell Meson to use Intel compilers
env:
CC: icc
FC: ifort
NFDIR: '/opt/netcdf'
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y ninja-build libnetcdf-dev
- name: Cache Intel setup
id: cache-intel
uses: actions/cache@v2
with:
path: /opt/intel/
key: intel-${{ runner.os }}-compiler

- name: Setup Intel compiler
if: steps.cache-intel.outputs.cache-hit != 'true'
run: |
wget -q https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt update
sudo apt install -y\
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic\
intel-oneapi-compiler-fortran intel-oneapi-mpi-devel
- name: Cache netCDF install
id: cache-netcdf
uses: actions/cache@v2
with:
path: ${{ env.NFDIR }}
key: netcdf-4.5.2-${{ runner.os }}-intel

- name: Checkout netCDF for compiling with Intel
if: steps.cache-netcdf.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: 'Unidata/netcdf-fortran'
ref: 'v4.5.2'

- name: Compile and install custom netCDF
if: steps.cache-netcdf.outputs.cache-hit != 'true'
run: |
source /opt/intel/oneapi/setvars.sh
./configure --prefix="$NFDIR"
make
sudo make install
- name: Setup netCDF environment
run: |
echo "${NFDIR}/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=${NFDIR}/lib/pkgconfig" >> $GITHUB_ENV
- name: Setup Python for newer version of Meson
uses: actions/setup-python@v2

- name: Install Meson
run: python -m pip install meson==${{ env.MESON_VERSION }}

- name: Checkout code
uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Build with Intel compilers
run: |
source /opt/intel/oneapi/setvars.sh
meson setup builddir -Dmpi=${{ matrix.mpi }} -Dopenmp=${{ matrix.openmp }} -Decosys=${{ matrix.ecosys }} --buildtype=debugoptimized
meson compile -C builddir
- name: Test code
if: ${{ matrix.mpi == false }}
run: |
source /opt/intel/oneapi/setvars.sh
meson test -C builddir
- name: Upload test log
uses: actions/upload-artifact@v2
if: ${{ matrix.mpi == false }}
with:
name: testlog-${{ runner.os }}-intel
path: builddir/meson-logs/testlog.txt
41 changes: 31 additions & 10 deletions cime_config/testdefs/testlist_blom.xml
Original file line number Diff line number Diff line change
@@ -1,38 +1,59 @@
<?xml version="1.0"?>
<testlist version="2.0">
<!-- aux_blom_noresm : Declarations for BLOM/iHAMOCC tests -->
<test name="SMS_D_Ld1" grid="T62_tn14" compset="NOINYOC">
<machines>
<machine name="betzy" compiler="intel" category="aux_blom_noresm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment">test debug mode with isopycnic layers, hamocc and core forcing</option>
</options>
</test>
<test name="ERS_Ld3" grid="T62_tn14" compset="NOINYOC">
<machines>
<machine name="betzy" compiler="intel" category="aux_blom_noresm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment">test restart with isopycnic layers, hamocc and core forcing</option>
</options>
</test>
<test name="ERS_Ld3" grid="T62_tn14" compset="NOINYOC" testmods="blom/hamocc1">
<machines>
<machine name="betzy" compiler="intel" category="aux_blom_noresm"/>
</machines>
</test>
<test name="ERS_Ld3" grid="T62_tn14" compset="NOINYOC" testmods="blom/hamocc2">
<test name="ERR_Ld3" grid="TL319_tn14" compset="NOIIAJRAOC">
<machines>
<machine name="betzy" compiler="intel" category="aux_blom_noresm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment">test restart/resubmit with isopycnic coordinates, hamocc and JRA forcing</option>
</options>
</test>
<test name="ERP_Ld3" grid="T62_tn14" compset="NOINY">
<machines>
<machine name="betzy" compiler="intel" category="aux_blom_noresm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment">test bfb with changing processor count and openmp on</option>
</options>
</test>
<test name="ERS_Ld3" grid="T62_tn14_wtn14nw" compset="NOINY_WW3">
<!-- Declarations for tests with different iHAMOCC settings: aux_hamocc_noresm -->
<test name="SMS_D_Ld1" grid="T62_tn14" compset="NOINYOC" testmods="hamocc/hamocc1">
<machines>
<machine name="betzy" compiler="intel" category="aux_blom_noresm"/>
<machine name="betzy" compiler="intel" category="aux_hamocc_noresm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment">test debug mode with CISO=TRUE</option>
</options>
</test>
<test name="ERS_Ld3" grid="T62_tn14_wtn14nw" compset="NOINY_WW3" testmods="blom/wavice">
<test name="SMS_D_Ld1" grid="T62_tn14" compset="NOINYOC" testmods="hamocc/hamocc2">
<machines>
<machine name="betzy" compiler="intel" category="aux_blom_noresm"/>
<machine name="betzy" compiler="intel" category="aux_hamocc_noresm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment">test debug mode with CISO=TRUE; SEDBYPASS=TRUE</option>
</options>
</test>
</testlist>

0 comments on commit 212aeef

Please sign in to comment.