From 575059798d9e0fc08aead55625bc188ca89c9516 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Tue, 14 Jul 2026 19:17:50 +0100 Subject: [PATCH 01/13] See if coverage improves with O0 --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index 9affe02..dc15b2a 100755 --- a/configure.sh +++ b/configure.sh @@ -58,7 +58,7 @@ elif [[ $FCTYPE = gnu ]]; then # but need to fix some tests first that currently trigger them :-( # We could also trap "underflow" but that seems a bit dangerous, # as it could crash simulations that would otherwise be fine? - DEFAULT_FFLAGS="-Og -g --check=all -ffpe-trap=zero,overflow -fimplicit-none $warning_flags" + DEFAULT_FFLAGS="-O0 -g -fimplicit-none $warning_flags" fi # Existing FFLAGS are appended and thus should thake precedence FFLAGS="${DEFAULT_FFLAGS} ${FFLAGS-}" From b898a91d5275e7505e3baf303c8cf3fbb2b265f9 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 00:32:11 +0100 Subject: [PATCH 02/13] Revert "See if coverage improves with O0" This reverts commit 575059798d9e0fc08aead55625bc188ca89c9516. --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index dc15b2a..9affe02 100755 --- a/configure.sh +++ b/configure.sh @@ -58,7 +58,7 @@ elif [[ $FCTYPE = gnu ]]; then # but need to fix some tests first that currently trigger them :-( # We could also trap "underflow" but that seems a bit dangerous, # as it could crash simulations that would otherwise be fine? - DEFAULT_FFLAGS="-O0 -g -fimplicit-none $warning_flags" + DEFAULT_FFLAGS="-Og -g --check=all -ffpe-trap=zero,overflow -fimplicit-none $warning_flags" fi # Existing FFLAGS are appended and thus should thake precedence FFLAGS="${DEFAULT_FFLAGS} ${FFLAGS-}" From e8b36ffbba45ea8cbc53aef17ae2f3d289543de4 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 00:32:33 +0100 Subject: [PATCH 03/13] Just O0 --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index 9affe02..e566c66 100755 --- a/configure.sh +++ b/configure.sh @@ -58,7 +58,7 @@ elif [[ $FCTYPE = gnu ]]; then # but need to fix some tests first that currently trigger them :-( # We could also trap "underflow" but that seems a bit dangerous, # as it could crash simulations that would otherwise be fine? - DEFAULT_FFLAGS="-Og -g --check=all -ffpe-trap=zero,overflow -fimplicit-none $warning_flags" + DEFAULT_FFLAGS="-O0 -g --check=all -ffpe-trap=zero,overflow -fimplicit-none $warning_flags" fi # Existing FFLAGS are appended and thus should thake precedence FFLAGS="${DEFAULT_FFLAGS} ${FFLAGS-}" From d728a41d09212e27092f047663b315f03cde52e3 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 00:49:56 +0100 Subject: [PATCH 04/13] Remove check=all --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index e566c66..3075873 100755 --- a/configure.sh +++ b/configure.sh @@ -58,7 +58,7 @@ elif [[ $FCTYPE = gnu ]]; then # but need to fix some tests first that currently trigger them :-( # We could also trap "underflow" but that seems a bit dangerous, # as it could crash simulations that would otherwise be fine? - DEFAULT_FFLAGS="-O0 -g --check=all -ffpe-trap=zero,overflow -fimplicit-none $warning_flags" + DEFAULT_FFLAGS="-Og -g -ffpe-trap=zero,overflow -fimplicit-none $warning_flags" fi # Existing FFLAGS are appended and thus should thake precedence FFLAGS="${DEFAULT_FFLAGS} ${FFLAGS-}" From 9c8caf1cf341465d777224a4a05aed786753888a Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 01:05:35 +0100 Subject: [PATCH 05/13] Revert "Remove check=all" This reverts commit d728a41d09212e27092f047663b315f03cde52e3. --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index 3075873..e566c66 100755 --- a/configure.sh +++ b/configure.sh @@ -58,7 +58,7 @@ elif [[ $FCTYPE = gnu ]]; then # but need to fix some tests first that currently trigger them :-( # We could also trap "underflow" but that seems a bit dangerous, # as it could crash simulations that would otherwise be fine? - DEFAULT_FFLAGS="-Og -g -ffpe-trap=zero,overflow -fimplicit-none $warning_flags" + DEFAULT_FFLAGS="-O0 -g --check=all -ffpe-trap=zero,overflow -fimplicit-none $warning_flags" fi # Existing FFLAGS are appended and thus should thake precedence FFLAGS="${DEFAULT_FFLAGS} ${FFLAGS-}" From 07ea9a6c88266c63dd68ddb667b6c2eb18d0493a Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 01:08:58 +0100 Subject: [PATCH 06/13] Add -fno-check in CI --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba92668..fe7827b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,6 +52,9 @@ jobs: - name: Configure run: ./configure.sh + env: + # -fcheck=all messes up code coverage. It is only enabled in debug build below + FFLAGS: -fno-check - name: Build run: make -j @@ -73,7 +76,6 @@ jobs: # Run tests with leak, address and undefined behaviour sanitizers (ASan, UBSan et al) - # Bounds checks and others are enabled as well (but those should be in default build as well) debug_build: name: Debug build (GCC-${{ matrix.gcc_v}}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} From 2054df1d15836265ce906a844942ec726396f256 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 01:10:54 +0100 Subject: [PATCH 07/13] Don't run unit tests with nvfortran --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe7827b..d395603 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,11 +54,13 @@ jobs: run: ./configure.sh env: # -fcheck=all messes up code coverage. It is only enabled in debug build below - FFLAGS: -fno-check + FFLAGS: -fcheck=no-bounds,no-array-temps - name: Build run: make -j - name: Unit tests + # nvfortran sometimes fails with "Illegal instruction (core dumped)" + if: matrix.toolchain.compiler != 'nvidia-hpc' run: make unittest - name: End-to-end tests From 1967d17c511d7547c924280e3a1a127e7b6a4753 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 01:26:37 +0100 Subject: [PATCH 08/13] Better --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d395603..43887f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: run: ./configure.sh env: # -fcheck=all messes up code coverage. It is only enabled in debug build below - FFLAGS: -fcheck=no-bounds,no-array-temps + FFLAGS: ${{ matrix.toolchain.compiler == 'gcc' && '--check=no-all' || '' }} - name: Build run: make -j @@ -74,7 +74,7 @@ jobs: name: GCC-${{ matrix.gcc_v}} (${{ matrix.os }}) slug: ispg-group/openfms token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: false + fail_ci_if_error: true # Run tests with leak, address and undefined behaviour sanitizers (ASan, UBSan et al) From d9a79eb24eaa620475a312d8b75c9c276a4eb0df Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 01:49:09 +0100 Subject: [PATCH 09/13] Update .github/workflows/build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43887f7..29ad7d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,7 +69,7 @@ jobs: - name: Codecov upload uses: codecov/codecov-action@v5 # For some reason gcov does not seem to work on MacOS - if: startsWith(matrix.os, 'ubuntu') + if: startsWith(matrix.os, 'ubuntu') && matrix.toolchain.compiler == 'gcc' with: name: GCC-${{ matrix.gcc_v}} (${{ matrix.os }}) slug: ispg-group/openfms From 2892a4907dfd926003ff66b35a51219c232645be Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 01:50:52 +0100 Subject: [PATCH 10/13] Update configure.sh --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index e566c66..9affe02 100755 --- a/configure.sh +++ b/configure.sh @@ -58,7 +58,7 @@ elif [[ $FCTYPE = gnu ]]; then # but need to fix some tests first that currently trigger them :-( # We could also trap "underflow" but that seems a bit dangerous, # as it could crash simulations that would otherwise be fine? - DEFAULT_FFLAGS="-O0 -g --check=all -ffpe-trap=zero,overflow -fimplicit-none $warning_flags" + DEFAULT_FFLAGS="-Og -g --check=all -ffpe-trap=zero,overflow -fimplicit-none $warning_flags" fi # Existing FFLAGS are appended and thus should thake precedence FFLAGS="${DEFAULT_FFLAGS} ${FFLAGS-}" From 2104a9c5c0f5508be4ac641035351c53306e0c8e Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 01:54:04 +0100 Subject: [PATCH 11/13] Update .github/workflows/build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29ad7d3..4f3b78a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: run: ./configure.sh env: # -fcheck=all messes up code coverage. It is only enabled in debug build below - FFLAGS: ${{ matrix.toolchain.compiler == 'gcc' && '--check=no-all' || '' }} + FFLAGS: ${{ matrix.toolchain.compiler == 'gcc' && '--check=no-bounds' || '' }} - name: Build run: make -j From 2aed93145641b7cf8cf72054c756bba514b372d0 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 02:17:18 +0100 Subject: [PATCH 12/13] Update .github/workflows/build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f3b78a..b6eb406 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: run: ./configure.sh env: # -fcheck=all messes up code coverage. It is only enabled in debug build below - FFLAGS: ${{ matrix.toolchain.compiler == 'gcc' && '--check=no-bounds' || '' }} + FFLAGS: ${{ matrix.toolchain.compiler == 'gcc' && '' || '' }} - name: Build run: make -j From 6f4a2013016bd222bf914ec5d269fb8fa363a070 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 15 Jul 2026 17:59:37 +0100 Subject: [PATCH 13/13] How about now? --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a1e7a7..496def6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,8 +14,11 @@ jobs: name: ${{ matrix.toolchain.compiler }}-${{ matrix.toolchain.version }} (${{ matrix.os }}) runs-on: ${{ matrix.os }} env: - # Only collect test coverage with gfortran - FFLAGS: ${{ matrix.toolchain.compiler == 'gcc' && '--coverage -fprofile-abs-path' || '' }} + # Collect test coverage with gfortran + # NOTE1: --check=all seems to interfere with code coverage so we disable it + # It is, however, enabled in the debug build job. + # NOTE2: -Og seems to be better for coverage than -O0 + FFLAGS: ${{ matrix.toolchain.compiler == 'gcc' && '--coverage -fprofile-abs-path --check=no-all -Og' || '' }} LDFLAGS: ${{ matrix.toolchain.compiler == 'gcc' && '--coverage' || '' }} strategy: fail-fast: false @@ -54,9 +57,6 @@ jobs: - name: Configure run: ./configure.sh - env: - # --check=all messes up code coverage. It is only enabled in debug build below - FFLAGS: ${{ matrix.toolchain.compiler == 'gcc' && '--check=no-all' || '' }} - name: Build run: make -j