From 7fe37f190c66763478b65df28342d63017a1fc18 Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Fri, 6 Sep 2024 12:06:06 +0100 Subject: [PATCH 01/18] Update intel KGOs to v004. --- .github/workflows/containerized-ci.yml | 10 +++++----- .gitignore | 1 - .../UKMO/cosp2_output.um_global.ifort.kgo.v004.nc.md5 | 1 + .../UKMO/cosp2_output.um_global.ifx.kgo.v004.nc.md5 | 1 + .../outputs/UKMO/cosp2_output_um.ifort.kgo.v004.nc.md5 | 1 + .../outputs/UKMO/cosp2_output_um.ifx.kgo.v004.nc.md5 | 1 + 6 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.nc.md5 create mode 100644 driver/data/outputs/UKMO/cosp2_output.um_global.ifx.kgo.v004.nc.md5 create mode 100644 driver/data/outputs/UKMO/cosp2_output_um.ifort.kgo.v004.nc.md5 create mode 100644 driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.nc.md5 diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 761ef7a663..946b0d914d 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -12,20 +12,20 @@ jobs: # Flags and KGOs for Intel Fortran Compiler Classic - compiler: ifort fcflags: -m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08 - gdkgo1: https://docs.google.com/uc?export=download&id=1eyRCT9e7j7SKsKhbfJBuwBoN5DlsrW7L - gdkgo2: https://docs.google.com/uc?export=download&id=1uTffyCdWLPvRHDkVtZZiBfc3spbk4_Tf + gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K + gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC # Flags and KGOs for Intel Fortran Compiler - compiler: ifx fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 - gdkgo1: https://docs.google.com/uc?export=download&id=1VrPkQmDpt6otch-tsaka-62tiMDuJNz_ - gdkgo2: https://docs.google.com/uc?export=download&id=1m6JdHlSAMmK8zT-X3pfxSORPJURiITkQ + gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b + gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj # Set container images - compiler: ifort image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi - compiler: ifx image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi # Common variables - - kgo_version: v003 + - kgo_version: v004 container: image: ${{ matrix.image }} env: diff --git a/.gitignore b/.gitignore index ca34cd2457..73fa3ca8df 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,4 @@ driver/data/inputs/UKMO/*_global.nc driver/data/outputs/UKMO/*kgo.v*.nc driver/data/outputs/UKMO/*.nc !driver/data/outputs/cosp2_output_um.gfortran.kgo.nc -driver/data/outputs/UKMO/*md5 driver/data/outputs/UKMO/*.out diff --git a/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.nc.md5 b/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.nc.md5 new file mode 100644 index 0000000000..b3094e6125 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.nc.md5 @@ -0,0 +1 @@ +d22e708b28bab19dae4c769fe7d33e40 cosp2_output.um_global.ifort.kgo.v004.nc diff --git a/driver/data/outputs/UKMO/cosp2_output.um_global.ifx.kgo.v004.nc.md5 b/driver/data/outputs/UKMO/cosp2_output.um_global.ifx.kgo.v004.nc.md5 new file mode 100644 index 0000000000..3184ef2bef --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output.um_global.ifx.kgo.v004.nc.md5 @@ -0,0 +1 @@ +aa0b47fa93e5d96d2a225a2f50348d30 cosp2_output.um_global.ifx.kgo.v004.nc diff --git a/driver/data/outputs/UKMO/cosp2_output_um.ifort.kgo.v004.nc.md5 b/driver/data/outputs/UKMO/cosp2_output_um.ifort.kgo.v004.nc.md5 new file mode 100644 index 0000000000..c186c0ff95 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output_um.ifort.kgo.v004.nc.md5 @@ -0,0 +1 @@ +0e75e4adac759d797d1264d76490fa9d cosp2_output_um.ifort.kgo.v004.nc diff --git a/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.nc.md5 b/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.nc.md5 new file mode 100644 index 0000000000..1c020992f6 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.nc.md5 @@ -0,0 +1 @@ +d88395d3962b9c25a15d94b13f6db42d cosp2_output_um.ifx.kgo.v004.nc From 00baab90b3d0cb1718665cc6a486acd23847be81 Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Mon, 9 Sep 2024 14:07:39 +0100 Subject: [PATCH 02/18] Back to v003 to force failure. Fix production of plots. --- .github/workflows/containerized-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 946b0d914d..b4a4a205ec 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -14,18 +14,22 @@ jobs: fcflags: -m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08 gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC + gdkgo1: https://docs.google.com/uc?export=download&id=1eyRCT9e7j7SKsKhbfJBuwBoN5DlsrW7L + gdkgo2: https://docs.google.com/uc?export=download&id=1uTffyCdWLPvRHDkVtZZiBfc3spbk4_Tf # Flags and KGOs for Intel Fortran Compiler - compiler: ifx fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj + gdkgo1: https://docs.google.com/uc?export=download&id=1VrPkQmDpt6otch-tsaka-62tiMDuJNz_ + gdkgo2: https://docs.google.com/uc?export=download&id=1m6JdHlSAMmK8zT-X3pfxSORPJURiITkQ # Set container images - compiler: ifort image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi - compiler: ifx image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi # Common variables - - kgo_version: v004 + - kgo_version: v003 container: image: ${{ matrix.image }} env: @@ -114,20 +118,16 @@ jobs: # and create a tarball with outputs. ############################################################################### - name: Produce plots and create tarball + shell: bash if: failure() run: | - TST_MLEV=data/outputs/UKMO/cosp2_output.um_global_model_levels.nc cd driver if [[ -e data/outputs/UKMO/cosp2_output.um_global.nc ]]; then python plot_test_outputs.py fi - if [[ -e data/outputs/UKMO/cosp2_output.um_global_model_levels.nc ]]; then - python plot_test_outputs.py --tst_file=$TST_MLEV - fi cd data/outputs/UKMO tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \ - cosp2_output_um.nc cosp2_output.um_global_model_levels.nc *.png \ - cosp2_output.um_global.out + cosp2_output_um.nc *.png cosp2_output.um_global.out ls -lh ############################################################################### # Make output files available if any test fails From e35ce492e597574f235616ddb4fa98e76aae332b Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Mon, 9 Sep 2024 14:19:04 +0100 Subject: [PATCH 03/18] Delete shell. --- .github/workflows/containerized-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index b4a4a205ec..b167a6b77b 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -118,7 +118,6 @@ jobs: # and create a tarball with outputs. ############################################################################### - name: Produce plots and create tarball - shell: bash if: failure() run: | cd driver From 35738238069b15272c6665c2fd85b12510bf34b4 Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Mon, 9 Sep 2024 16:46:47 +0100 Subject: [PATCH 04/18] Comment new links to v004. --- .github/workflows/containerized-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index b167a6b77b..fe1a090e4d 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -12,15 +12,15 @@ jobs: # Flags and KGOs for Intel Fortran Compiler Classic - compiler: ifort fcflags: -m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08 - gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K - gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC + # gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K + # gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC gdkgo1: https://docs.google.com/uc?export=download&id=1eyRCT9e7j7SKsKhbfJBuwBoN5DlsrW7L gdkgo2: https://docs.google.com/uc?export=download&id=1uTffyCdWLPvRHDkVtZZiBfc3spbk4_Tf # Flags and KGOs for Intel Fortran Compiler - compiler: ifx fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 - gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b - gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj + # gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b + # gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj gdkgo1: https://docs.google.com/uc?export=download&id=1VrPkQmDpt6otch-tsaka-62tiMDuJNz_ gdkgo2: https://docs.google.com/uc?export=download&id=1m6JdHlSAMmK8zT-X3pfxSORPJURiITkQ # Set container images From 710580c343ed22ba6c5da688391a2558bd349e5a Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Mon, 9 Sep 2024 16:57:38 +0100 Subject: [PATCH 05/18] Bash shell for plots. --- .github/workflows/containerized-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index fe1a090e4d..83d6aa66ee 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -118,6 +118,7 @@ jobs: # and create a tarball with outputs. ############################################################################### - name: Produce plots and create tarball + shell: bash if: failure() run: | cd driver From 1ad81a638f64ddac76a4e0aae0ced034cf4afa0b Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Mon, 9 Sep 2024 17:14:14 +0100 Subject: [PATCH 06/18] Build environment with python. --- .github/workflows/containerized-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 83d6aa66ee..15a24ea621 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -8,6 +8,7 @@ jobs: fail-fast: false matrix: compiler: [ifort, ifx] + python-version: [3.11] include: # Flags and KGOs for Intel Fortran Compiler Classic - compiler: ifort @@ -49,6 +50,15 @@ jobs: # Checks-out repository under $GITHUB_WORKSPACE # - uses: actions/checkout@v4 + # Set up conda environment + - name: Setup conda environment + uses: conda-incubator/setup-miniconda@v3.0.4 + with: + auto-update-conda: true + activate-environment: ci-env + environment-file: build/environment.yml + python-version: ${{ matrix.python-version }} + auto-activate-base: false ############################################################################### # Build COSP and retrieve input and test files From 92bfeaff4a4f9bed9fca603aff5bbd1f839cbf3c Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Mon, 9 Sep 2024 17:23:11 +0100 Subject: [PATCH 07/18] Activate environment. --- .github/workflows/containerized-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 15a24ea621..60b319284c 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -131,6 +131,7 @@ jobs: shell: bash if: failure() run: | + conda activate ci-env cd driver if [[ -e data/outputs/UKMO/cosp2_output.um_global.nc ]]; then python plot_test_outputs.py From 724978f1e66afd114d781e33e79155904f71814d Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Tue, 10 Sep 2024 09:09:42 +0100 Subject: [PATCH 08/18] Activate environment. --- .github/workflows/containerized-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 60b319284c..7d29ca15bf 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -131,6 +131,7 @@ jobs: shell: bash if: failure() run: | + conda init conda activate ci-env cd driver if [[ -e data/outputs/UKMO/cosp2_output.um_global.nc ]]; then From 6262ea13e791205fe590a314c939e8f16667864e Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Tue, 10 Sep 2024 09:36:38 +0100 Subject: [PATCH 09/18] Activate environment. --- .github/workflows/containerized-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 7d29ca15bf..b51ecc84c7 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -31,6 +31,9 @@ jobs: image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi # Common variables - kgo_version: v003 + defaults: + run: + shell: bash -el {0} container: image: ${{ matrix.image }} env: @@ -128,11 +131,8 @@ jobs: # and create a tarball with outputs. ############################################################################### - name: Produce plots and create tarball - shell: bash if: failure() run: | - conda init - conda activate ci-env cd driver if [[ -e data/outputs/UKMO/cosp2_output.um_global.nc ]]; then python plot_test_outputs.py From e860ebf61c32848832fe3f969d04606f0d3b8186 Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Tue, 10 Sep 2024 11:25:18 +0100 Subject: [PATCH 10/18] Tar .out file. --- .github/workflows/containerized-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index b51ecc84c7..664587eeb5 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -139,7 +139,7 @@ jobs: fi cd data/outputs/UKMO tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \ - cosp2_output_um.nc *.png cosp2_output.um_global.out + cosp2_output_um.nc *.png cosp2_output.um_global.${{ matrix.compiler }}.kgo.out ls -lh ############################################################################### # Make output files available if any test fails From 6abe28d906ec8a2b07c7ac81c3d49c3bfd1f8df3 Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Tue, 10 Sep 2024 15:58:52 +0100 Subject: [PATCH 11/18] Write stats to file. --- .github/workflows/containerized-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 664587eeb5..9f06d2cf6b 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -125,7 +125,8 @@ jobs: cd driver KGO=data/outputs/UKMO/cosp2_output.um_global.${F90}.kgo.$KGO_VERSION.nc TST=data/outputs/UKMO/cosp2_output.um_global.nc - python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} + STATS=data/outputs/UKMO/cosp2_output.um_global.${{ matrix.compiler }}.out + python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} --stats_file=${STATS} ############################################################################### # Produce plots when it fails during global snapshot tests, # and create a tarball with outputs. @@ -139,7 +140,7 @@ jobs: fi cd data/outputs/UKMO tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \ - cosp2_output_um.nc *.png cosp2_output.um_global.${{ matrix.compiler }}.kgo.out + cosp2_output_um.nc *.png cosp2_output.um_global.${{ matrix.compiler }}.out ls -lh ############################################################################### # Make output files available if any test fails From 49a99c80d5427bb7081ff9cb5b5ba6620bf3412f Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Tue, 10 Sep 2024 16:16:54 +0100 Subject: [PATCH 12/18] Test: print stats file. --- .github/workflows/containerized-ci.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 9f06d2cf6b..2ddbc9dc6a 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -1,5 +1,5 @@ name: Continuous integration in containers -on: [push, pull_request, workflow_dispatch] +on: [push, workflow_dispatch] jobs: Containerized-CI: @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - compiler: [ifort, ifx] + compiler: [ifort] python-version: [3.11] include: # Flags and KGOs for Intel Fortran Compiler Classic @@ -139,15 +139,16 @@ jobs: python plot_test_outputs.py fi cd data/outputs/UKMO - tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \ - cosp2_output_um.nc *.png cosp2_output.um_global.${{ matrix.compiler }}.out + # tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \ + # cosp2_output_um.nc *.png cosp2_output.um_global.${{ matrix.compiler }}.out ls -lh + more cosp2_output.um_global.${{ matrix.compiler }}.out ############################################################################### # Make output files available if any test fails ############################################################################### - - name: Upload output file if test fails - if: failure() - uses: actions/upload-artifact@v4.3.3 - with: - name: outputs.${{ matrix.compiler }}.UKMO.tgz - path: driver/data/outputs/UKMO/outputs.${{ matrix.compiler }}.UKMO.tgz + # - name: Upload output file if test fails + # if: failure() + # uses: actions/upload-artifact@v4.3.3 + # with: + # name: outputs.${{ matrix.compiler }}.UKMO.tgz + # path: driver/data/outputs/UKMO/outputs.${{ matrix.compiler }}.UKMO.tgz From 85f33bc5a44b1bb1a915de629d321181f71adbca Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Tue, 10 Sep 2024 16:39:57 +0100 Subject: [PATCH 13/18] Test: gather v004 stats. --- .github/workflows/containerized-ci.yml | 19 +++++++++---------- driver/compare_to_kgo.py | 1 + 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 2ddbc9dc6a..3048fffdf0 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - compiler: [ifort] + compiler: [ifort, ifx] python-version: [3.11] include: # Flags and KGOs for Intel Fortran Compiler Classic @@ -139,16 +139,15 @@ jobs: python plot_test_outputs.py fi cd data/outputs/UKMO - # tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \ - # cosp2_output_um.nc *.png cosp2_output.um_global.${{ matrix.compiler }}.out + tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \ + cosp2_output_um.nc *.png cosp2_output.um_global.${{ matrix.compiler }}.out ls -lh - more cosp2_output.um_global.${{ matrix.compiler }}.out ############################################################################### # Make output files available if any test fails ############################################################################### - # - name: Upload output file if test fails - # if: failure() - # uses: actions/upload-artifact@v4.3.3 - # with: - # name: outputs.${{ matrix.compiler }}.UKMO.tgz - # path: driver/data/outputs/UKMO/outputs.${{ matrix.compiler }}.UKMO.tgz + - name: Upload output file if test fails + if: failure() + uses: actions/upload-artifact@v4.3.3 + with: + name: outputs.${{ matrix.compiler }}.UKMO.tgz + path: driver/data/outputs/UKMO/outputs.${{ matrix.compiler }}.UKMO.tgz diff --git a/driver/compare_to_kgo.py b/driver/compare_to_kgo.py index 77b56e5548..7adfe19a73 100644 --- a/driver/compare_to_kgo.py +++ b/driver/compare_to_kgo.py @@ -189,6 +189,7 @@ def print_stats_table(summary_stats, print_all=False, stats_file=None): if errored: print(red_colour + "===== ERROR: some of the differences are larger " "than the tolerances." + std_colour) + print_stats_table(summary_stats, print_all=args.allvar) print_stats_table(summary_stats, print_all=args.allvar, stats_file=args.stats_file) From 8d6bd24e02b5216d017bf3f572ea752b21d75d3b Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Fri, 13 Sep 2024 10:32:30 +0100 Subject: [PATCH 14/18] KGOs to v004 --- .github/workflows/containerized-ci.yml | 23 ++++++++++------------- .gitignore | 1 + 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 3048fffdf0..b7727b9c5b 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -1,5 +1,5 @@ name: Continuous integration in containers -on: [push, workflow_dispatch] +on: [push, pull_request, workflow_dispatch] jobs: Containerized-CI: @@ -13,24 +13,20 @@ jobs: # Flags and KGOs for Intel Fortran Compiler Classic - compiler: ifort fcflags: -m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08 - # gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K - # gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC - gdkgo1: https://docs.google.com/uc?export=download&id=1eyRCT9e7j7SKsKhbfJBuwBoN5DlsrW7L - gdkgo2: https://docs.google.com/uc?export=download&id=1uTffyCdWLPvRHDkVtZZiBfc3spbk4_Tf + gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K + gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC # Flags and KGOs for Intel Fortran Compiler - compiler: ifx fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 - # gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b - # gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj - gdkgo1: https://docs.google.com/uc?export=download&id=1VrPkQmDpt6otch-tsaka-62tiMDuJNz_ - gdkgo2: https://docs.google.com/uc?export=download&id=1m6JdHlSAMmK8zT-X3pfxSORPJURiITkQ + gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b + gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj # Set container images - compiler: ifort image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi - compiler: ifx image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi # Common variables - - kgo_version: v003 + - kgo_version: v004 defaults: run: shell: bash -el {0} @@ -116,14 +112,15 @@ jobs: - name: Basic against known good output (KGO) run: | cd driver - KGO=data/outputs/UKMO/cosp2_output_um.${F90}.kgo.$KGO_VERSION.nc + KGO=data/outputs/UKMO/cosp2_output_um.${{ matrix.compiler }}.kgo.$KGO_VERSION.nc TST=data/outputs/UKMO/cosp2_output_um.nc - python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} + STATS=data/outputs/UKMO/cosp2_output_um.${{ matrix.compiler }}.out + python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} --stats_file=${STATS} # 2. UM global snapshot. - name: UM global against known good output (KGO) run: | cd driver - KGO=data/outputs/UKMO/cosp2_output.um_global.${F90}.kgo.$KGO_VERSION.nc + KGO=data/outputs/UKMO/cosp2_output.um_global.${{ matrix.compiler }}.kgo.$KGO_VERSION.nc TST=data/outputs/UKMO/cosp2_output.um_global.nc STATS=data/outputs/UKMO/cosp2_output.um_global.${{ matrix.compiler }}.out python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} --stats_file=${STATS} diff --git a/.gitignore b/.gitignore index 73fa3ca8df..e93326b7b5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ driver/run/cosp2_test driver/data/inputs/UKMO/*_global.nc driver/data/outputs/UKMO/*kgo.v*.nc driver/data/outputs/UKMO/*.nc +driver/data/outputs/UKMO/*.png !driver/data/outputs/cosp2_output_um.gfortran.kgo.nc driver/data/outputs/UKMO/*.out From fc2c424732dd4334b880b892c25b10cfbe2c6b48 Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Fri, 13 Sep 2024 11:27:21 +0100 Subject: [PATCH 15/18] Update containerized-ci.yml --- .github/workflows/containerized-ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index b7727b9c5b..0518b993bd 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -1,5 +1,5 @@ name: Continuous integration in containers -on: [push, pull_request, workflow_dispatch] +on: [workflow_dispatch] jobs: Containerized-CI: @@ -13,20 +13,24 @@ jobs: # Flags and KGOs for Intel Fortran Compiler Classic - compiler: ifort fcflags: -m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08 - gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K - gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC + #gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K + #gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC + gdkgo1: https://docs.google.com/uc?export=download&id=1eyRCT9e7j7SKsKhbfJBuwBoN5DlsrW7L + gdkgo2: https://docs.google.com/uc?export=download&id=1uTffyCdWLPvRHDkVtZZiBfc3spbk4_Tf # Flags and KGOs for Intel Fortran Compiler - compiler: ifx fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 - gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b - gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj + #gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b + #gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj + gdkgo1: https://docs.google.com/uc?export=download&id=1VrPkQmDpt6otch-tsaka-62tiMDuJNz_ + gdkgo2: https://docs.google.com/uc?export=download&id=1m6JdHlSAMmK8zT-X3pfxSORPJURiITkQ # Set container images - compiler: ifort image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi - compiler: ifx image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi # Common variables - - kgo_version: v004 + - kgo_version: v003 defaults: run: shell: bash -el {0} From 38471bf7f66c5a22202d3a150acad689a19e6a9d Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Fri, 13 Sep 2024 11:33:53 +0100 Subject: [PATCH 16/18] Update containerized-ci.yml --- .github/workflows/containerized-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 0518b993bd..faaaab0af0 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -1,5 +1,5 @@ name: Continuous integration in containers -on: [workflow_dispatch] +on: [pull_request, workflow_dispatch] jobs: Containerized-CI: From e10fba0af5f110b31424d3bdbab46212badfd110 Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Fri, 13 Sep 2024 19:11:19 +0100 Subject: [PATCH 17/18] Update containerized-ci.yml --- .github/workflows/containerized-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index faaaab0af0..ef501cd616 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -141,7 +141,7 @@ jobs: fi cd data/outputs/UKMO tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \ - cosp2_output_um.nc *.png cosp2_output.um_global.${{ matrix.compiler }}.out + cosp2_output_um.nc *.png cosp2_output*.${{ matrix.compiler }}.out ls -lh ############################################################################### # Make output files available if any test fails From f08ad7a35696c50e29c689670b0169c1f51fd1e2 Mon Sep 17 00:00:00 2001 From: alejandrobodas Date: Fri, 13 Sep 2024 22:31:28 +0100 Subject: [PATCH 18/18] Add v004.out files --- .github/workflows/containerized-ci.yml | 17 ++++++----------- .gitignore | 2 +- .../cosp2_output.um_global.ifort.kgo.v004.out | 4 ++++ .../UKMO/cosp2_output_um.ifx.kgo.v004.out | 4 ++++ 4 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.out create mode 100644 driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.out diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index ef501cd616..bac527054c 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -1,5 +1,5 @@ name: Continuous integration in containers -on: [pull_request, workflow_dispatch] +on: [push, pull_request, workflow_dispatch] jobs: Containerized-CI: @@ -8,29 +8,24 @@ jobs: fail-fast: false matrix: compiler: [ifort, ifx] - python-version: [3.11] include: # Flags and KGOs for Intel Fortran Compiler Classic - compiler: ifort fcflags: -m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08 - #gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K - #gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC - gdkgo1: https://docs.google.com/uc?export=download&id=1eyRCT9e7j7SKsKhbfJBuwBoN5DlsrW7L - gdkgo2: https://docs.google.com/uc?export=download&id=1uTffyCdWLPvRHDkVtZZiBfc3spbk4_Tf + gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K + gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC # Flags and KGOs for Intel Fortran Compiler - compiler: ifx fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 - #gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b - #gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj - gdkgo1: https://docs.google.com/uc?export=download&id=1VrPkQmDpt6otch-tsaka-62tiMDuJNz_ - gdkgo2: https://docs.google.com/uc?export=download&id=1m6JdHlSAMmK8zT-X3pfxSORPJURiITkQ + gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b + gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj # Set container images - compiler: ifort image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi - compiler: ifx image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi # Common variables - - kgo_version: v003 + - kgo_version: v004 defaults: run: shell: bash -el {0} diff --git a/.gitignore b/.gitignore index e93326b7b5..51e4b5ac01 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ driver/data/outputs/UKMO/*kgo.v*.nc driver/data/outputs/UKMO/*.nc driver/data/outputs/UKMO/*.png !driver/data/outputs/cosp2_output_um.gfortran.kgo.nc -driver/data/outputs/UKMO/*.out +!driver/data/outputs/UKMO/*.out diff --git a/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.out b/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.out new file mode 100644 index 0000000000..804b313635 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.out @@ -0,0 +1,4 @@ +========================================== Summary statistics ========================================== + Variable N AvgDiff MinDiff MaxDiff StDev + dbze94 6 9.3337e-08 7.0183e-08 1.1649e-07 2.3154e-08 +========================================================================================================== diff --git a/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.out b/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.out new file mode 100644 index 0000000000..c26c93c02c --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.out @@ -0,0 +1,4 @@ +========================================== Summary statistics ========================================== + Variable N AvgDiff MinDiff MaxDiff StDev + dbze94 9526 -8.6491e-08 -7.3010e-04 1.9553e-04 1.1886e-05 +==========================================================================================================