Skip to content

Commit

Permalink
Update containerized-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrobodas authored Mar 15, 2024
1 parent 8a16cd2 commit 68a8b6b
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions .github/workflows/containerized-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
# Set flags 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=1TpXY-vXkwAnym9nNjzUxt1q_8c8T7X8T
gdkgo2: https://docs.google.com/uc?export=download&id=1ic-2B3dIx1kIoi-Nd1ndLbLAe_LIWDGP
gdkgo3: https://docs.google.com/uc?export=download&id=1kY1lRgzd0UhDiQef2u-VgTQql_iut3U2
# # Set flags for Intel Fortran Compiler
# - compiler: ifx
# fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08
Expand All @@ -28,10 +31,13 @@ jobs:
F90FLAGS: ${{ matrix.fcflags }}
# Make variables:
NFHOME: /opt/netcdf-fortran
# KGO tests variables
ATOL: 0.0
RTOL: 0.0
KGO_VERSION: v002

GDKGO1: ${{ matrix.gdkgo1 }}
GDKGO2: ${{ matrix.gdkgo2 }}
GDKGO3: ${{ matrix.gdkgo3 }}
steps:
#
# Checks-out repository under $GITHUB_WORKSPACE
Expand Down Expand Up @@ -59,33 +65,27 @@ jobs:
gunzip ${OUTPATH}
cd driver/data/inputs/UKMO
md5sum -c cosp_input.um_global.nc.md5
- name: Retrieve KGOs
- name: Retrieve KGOs for basic test
run: |
if [[ "${F90}" = 'gfortran' ]]; then
GDFILE1='https://docs.google.com/uc?export=download&id=1s5Ha6Hqnv_hWbRUs8KQpJ4Lxy8uvJDar'
GDFILE2='https://docs.google.com/uc?export=download&id=11dKcIL3EQr7s6jbo4f9GsoW0SufesGbq'
GDFILE3='https://docs.google.com/uc?export=download&id=1kY1lRgzd0UhDiQef2u-VgTQql_iut3U2'
fi
if [[ "${F90}" = 'ifort' ]]; then
GDFILE1='https://docs.google.com/uc?export=download&id=1TpXY-vXkwAnym9nNjzUxt1q_8c8T7X8T'
GDFILE2='https://docs.google.com/uc?export=download&id=1ic-2B3dIx1kIoi-Nd1ndLbLAe_LIWDGP'
GDFILE3='https://docs.google.com/uc?export=download&id=1kY1lRgzd0UhDiQef2u-VgTQql_iut3U2'
fi
cd ${GITHUB_WORKSPACE}
OUTPATH=driver/data/outputs/UKMO/cosp2_output.um_global.${F90}.kgo.$KGO_VERSION.nc.gz
curl -sSfL -o $OUTPATH $GDFILE1
curl -sSfL -o $OUTPATH $GDKGO1
gunzip ${OUTPATH}
cd driver/data/outputs/UKMO
md5sum -c cosp2_output.um_global.${F90}.kgo.$KGO_VERSION.nc.md5
- name: Retrieve KGOs for global test
run: |
cd ${GITHUB_WORKSPACE}
OUTPATH=driver/data/outputs/UKMO/cosp2_output_um.$F90.kgo.$KGO_VERSION.nc.gz
curl -sSfL -o $OUTPATH $GDFILE2
curl -sSfL -o $OUTPATH $GDKGO2
gunzip ${OUTPATH}
cd driver/data/outputs/UKMO
md5sum -c cosp2_output_um.${F90}.kgo.$KGO_VERSION.nc.md5
- name: Retrieve KGOs for model levels outputs test
run: |
cd ${GITHUB_WORKSPACE}
OUTPATH=driver/data/outputs/UKMO/cosp2_output.um_global_model_levels.$F90.kgo.$KGO_VERSION.nc.gz
curl -sSfL -o $OUTPATH $GDFILE3
curl -sSfL -o $OUTPATH $GDKGO3
gunzip ${OUTPATH}
cd driver/data/outputs/UKMO
md5sum -c cosp2_output.um_global_model_levels.${F90}.kgo.$KGO_VERSION.nc.md5
Expand Down Expand Up @@ -118,13 +118,14 @@ 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
ATOL=1.0e-20
RTOL=0.0006
OUTTST=data/outputs/UKMO/cosp2_output.um_global.out
OUTKGO=data/outputs/UKMO/cosp2_output.um_global.${F90}.kgo.${KGO_VERSION}.out
python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} \
--noerror=True --stats_file=${OUTTST}
diff ${OUTKGO} ${OUTTST}
python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL}
# ATOL=1.0e-20
# RTOL=0.0006
# OUTTST=data/outputs/UKMO/cosp2_output.um_global.out
# OUTKGO=data/outputs/UKMO/cosp2_output.um_global.${F90}.kgo.${KGO_VERSION}.out
# python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} \
# --noerror=True --stats_file=${OUTTST}
# diff ${OUTKGO} ${OUTTST}
###############################################################################
# Produce plots when it fails during global snapshot tests,
# and create a tarball with outputs.
Expand Down

0 comments on commit 68a8b6b

Please sign in to comment.