Skip to content

Commit

Permalink
Merge pull request ufs-community#21 from MinsukJi-NOAA/feature/alt_co…
Browse files Browse the repository at this point in the history
…mpsetrun
  • Loading branch information
DeniseWorthen authored Apr 22, 2020
2 parents 55533a0 + a14a758 commit b81e049
Show file tree
Hide file tree
Showing 21 changed files with 5,528 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/log_*/
2,806 changes: 2,806 additions & 0 deletions tests/Compile_hera.intel.log

Large diffs are not rendered by default.

158 changes: 158 additions & 0 deletions tests/RegressionTests_hera.intel.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
Tue Apr 21 19:21:53 UTC 2020
Start Regression test


baseline dir = /scratch1/NCEPDEV/stmp4/Minsuk.Ji/S2S_RT/REGRESSION_TEST/RT-Baselines_cold
mediator baseline dir = /scratch1/NCEPDEV/stmp4/Minsuk.Ji/S2S_RT/REGRESSION_TEST/MEDIATOR
working dir = /scratch1/NCEPDEV/stmp2/Minsuk.Ji/S2S_RT/rt_246089/cpld_fv3_mom6_cice_cold_atm_flux
Checking test 001 cpld_fv3_mom6_cice_cold_atm_flux results ....
Comparing phyf001.tile1.nc .........OK
Comparing phyf001.tile2.nc .........OK
Comparing phyf001.tile3.nc .........OK
Comparing phyf001.tile4.nc .........OK
Comparing phyf001.tile5.nc .........OK
Comparing phyf001.tile6.nc .........OK
Comparing dynf001.tile1.nc .........OK
Comparing dynf001.tile2.nc .........OK
Comparing dynf001.tile3.nc .........OK
Comparing dynf001.tile4.nc .........OK
Comparing dynf001.tile5.nc .........OK
Comparing dynf001.tile6.nc .........OK
Comparing RESTART/coupler.res .........OK
Comparing RESTART/fv_core.res.nc .........OK
Comparing RESTART/fv_core.res.tile1.nc .........OK
Comparing RESTART/fv_core.res.tile2.nc .........OK
Comparing RESTART/fv_core.res.tile3.nc .........OK
Comparing RESTART/fv_core.res.tile4.nc .........OK
Comparing RESTART/fv_core.res.tile5.nc .........OK
Comparing RESTART/fv_core.res.tile6.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile1.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile2.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile3.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile4.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile5.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile6.nc .........OK
Comparing RESTART/fv_tracer.res.tile1.nc .........OK
Comparing RESTART/fv_tracer.res.tile2.nc .........OK
Comparing RESTART/fv_tracer.res.tile3.nc .........OK
Comparing RESTART/fv_tracer.res.tile4.nc .........OK
Comparing RESTART/fv_tracer.res.tile5.nc .........OK
Comparing RESTART/fv_tracer.res.tile6.nc .........OK
Comparing RESTART/phy_data.tile1.nc .........OK
Comparing RESTART/phy_data.tile2.nc .........OK
Comparing RESTART/phy_data.tile3.nc .........OK
Comparing RESTART/phy_data.tile4.nc .........OK
Comparing RESTART/phy_data.tile5.nc .........OK
Comparing RESTART/phy_data.tile6.nc .........OK
Comparing RESTART/sfc_data.tile1.nc .........OK
Comparing RESTART/sfc_data.tile2.nc .........OK
Comparing RESTART/sfc_data.tile3.nc .........OK
Comparing RESTART/sfc_data.tile4.nc .........OK
Comparing RESTART/sfc_data.tile5.nc .........OK
Comparing RESTART/sfc_data.tile6.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile1.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile2.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile3.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile4.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile5.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile6.nc .........OK
Comparing mediator_FBaccumOcn_restart.nc .........OK
Comparing mediator_FBaccumIce_restart.nc .........OK
Comparing mediator_FBaccumLnd_restart.nc .........OK
Comparing mediator_FBaccumHyd_restart.nc .........OK
Comparing mediator_FBaccumAtmOcn_restart.nc .........OK
Comparing mediator_FBAtm_a_restart.tile1.nc .........OK
Comparing mediator_FBAtm_a_restart.tile2.nc .........OK
Comparing mediator_FBAtm_a_restart.tile3.nc .........OK
Comparing mediator_FBAtm_a_restart.tile4.nc .........OK
Comparing mediator_FBAtm_a_restart.tile5.nc .........OK
Comparing mediator_FBAtm_a_restart.tile6.nc .........OK
Comparing mediator_FBIce_i_restart.nc .........OK
Comparing mediator_FBOcn_o_restart.nc .........OK
Comparing mediator_FBLnd_l_restart.nc .........OK
Comparing mediator_FBHyd_h_restart.nc .........OK
Comparing mediator_FBAtmOcn_o_restart.nc .........OK
Test 001 cpld_fv3_mom6_cice_cold_atm_flux PASS


baseline dir = /scratch1/NCEPDEV/stmp4/Minsuk.Ji/S2S_RT/REGRESSION_TEST/RT-Baselines_2d_warm
mediator baseline dir = /scratch1/NCEPDEV/stmp4/Minsuk.Ji/S2S_RT/REGRESSION_TEST/RT-Baselines_2d_warm/RESTART
working dir = /scratch1/NCEPDEV/stmp2/Minsuk.Ji/S2S_RT/rt_246089/cpld_fv3_mom6_cice_2d_atm_flux
Checking test 002 cpld_fv3_mom6_cice_2d_atm_flux results ....
Comparing phyf048.tile1.nc .........OK
Comparing phyf048.tile2.nc .........OK
Comparing phyf048.tile3.nc .........OK
Comparing phyf048.tile4.nc .........OK
Comparing phyf048.tile5.nc .........OK
Comparing phyf048.tile6.nc .........OK
Comparing dynf048.tile1.nc .........OK
Comparing dynf048.tile2.nc .........OK
Comparing dynf048.tile3.nc .........OK
Comparing dynf048.tile4.nc .........OK
Comparing dynf048.tile5.nc .........OK
Comparing dynf048.tile6.nc .........OK
Comparing RESTART/coupler.res .........OK
Comparing RESTART/fv_core.res.nc .........OK
Comparing RESTART/fv_core.res.tile1.nc .........OK
Comparing RESTART/fv_core.res.tile2.nc .........OK
Comparing RESTART/fv_core.res.tile3.nc .........OK
Comparing RESTART/fv_core.res.tile4.nc .........OK
Comparing RESTART/fv_core.res.tile5.nc .........OK
Comparing RESTART/fv_core.res.tile6.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile1.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile2.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile3.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile4.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile5.nc .........OK
Comparing RESTART/fv_srf_wnd.res.tile6.nc .........OK
Comparing RESTART/fv_tracer.res.tile1.nc .........OK
Comparing RESTART/fv_tracer.res.tile2.nc .........OK
Comparing RESTART/fv_tracer.res.tile3.nc .........OK
Comparing RESTART/fv_tracer.res.tile4.nc .........OK
Comparing RESTART/fv_tracer.res.tile5.nc .........OK
Comparing RESTART/fv_tracer.res.tile6.nc .........OK
Comparing RESTART/phy_data.tile1.nc .........OK
Comparing RESTART/phy_data.tile2.nc .........OK
Comparing RESTART/phy_data.tile3.nc .........OK
Comparing RESTART/phy_data.tile4.nc .........OK
Comparing RESTART/phy_data.tile5.nc .........OK
Comparing RESTART/phy_data.tile6.nc .........OK
Comparing RESTART/sfc_data.tile1.nc .........OK
Comparing RESTART/sfc_data.tile2.nc .........OK
Comparing RESTART/sfc_data.tile3.nc .........OK
Comparing RESTART/sfc_data.tile4.nc .........OK
Comparing RESTART/sfc_data.tile5.nc .........OK
Comparing RESTART/sfc_data.tile6.nc .........OK
Comparing MOM6_RESTART/MOM.res.nc .........OK
Comparing MOM6_RESTART/MOM.res_1.nc .........OK
Comparing MOM6_RESTART/MOM.res_2.nc .........OK
Comparing MOM6_RESTART/MOM.res_3.nc .........OK
Comparing restart/iced.2016-10-05-00000.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile1.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile2.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile3.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile4.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile5.nc .........OK
Comparing mediator_FBaccumAtm_restart.tile6.nc .........OK
Comparing mediator_FBaccumOcn_restart.nc .........OK
Comparing mediator_FBaccumIce_restart.nc .........OK
Comparing mediator_FBaccumLnd_restart.nc .........OK
Comparing mediator_FBaccumHyd_restart.nc .........OK
Comparing mediator_FBaccumAtmOcn_restart.nc .........OK
Comparing mediator_FBAtm_a_restart.tile1.nc .........OK
Comparing mediator_FBAtm_a_restart.tile2.nc .........OK
Comparing mediator_FBAtm_a_restart.tile3.nc .........OK
Comparing mediator_FBAtm_a_restart.tile4.nc .........OK
Comparing mediator_FBAtm_a_restart.tile5.nc .........OK
Comparing mediator_FBAtm_a_restart.tile6.nc .........OK
Comparing mediator_FBIce_i_restart.nc .........OK
Comparing mediator_FBOcn_o_restart.nc .........OK
Comparing mediator_FBLnd_l_restart.nc .........OK
Comparing mediator_FBHyd_h_restart.nc .........OK
Comparing mediator_FBAtmOcn_o_restart.nc .........OK
Test 002 cpld_fv3_mom6_cice_2d_atm_flux PASS


REGRESSION TEST WAS SUCCESSFUL
Tue Apr 21 20:20:36 UTC 2020
Elapsed time: 00h:58m:45s. Have a nice day!
58 changes: 58 additions & 0 deletions tests/atparse.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#! /usr/bin/env bash
function atparse {
local __set_x
[ -o xtrace ] && __set_x='set -x' || __set_x='set +x'
set +x
# Use __ in names to avoid clashing with variables in {var} blocks.
local __text __before __after __during
for __text in "$@" ; do
if [[ $__text =~ ^([a-zA-Z][a-zA-Z0-9_]*)=(.*)$ ]] ; then
eval "local ${BASH_REMATCH[1]}"
eval "${BASH_REMATCH[1]}="'"${BASH_REMATCH[2]}"'
else
echo "ERROR: Ignoring invalid argument $__text\n" 1>&2
fi
done
while IFS= read -r __text ; do
while [[ "$__text" =~ ^([^@]*)(@\[[a-zA-Z_][a-zA-Z_0-9]*\]|@\[\'[^\']*\'\]|@\[@\]|@)(.*) ]] ; do
__before="${BASH_REMATCH[1]}"
__during="${BASH_REMATCH[2]}"
__after="${BASH_REMATCH[3]}"
# printf 'PARSE[%s|%s|%s]\n' "$__before" "$__during" "$__after"
printf %s "$__before"
if [[ "$__during" =~ ^@\[\'(.*)\'\]$ ]] ; then
printf %s "${BASH_REMATCH[1]}"
elif [[ "$__during" == '@[@]' ]] ; then
printf @
elif [[ "$__during" =~ ^@\[([a-zA-Z_][a-zA-Z_0-9]*)\] ]] ; then
eval 'printf %s "$'"${BASH_REMATCH[1]}"'"'
else
printf '%s' "$__during"
fi
if [[ "$__after" == "$__text" ]] ; then
break
fi
__text="$__after"
done
printf '%s\n' "$__text"
done
eval "$__set_x"
}

function test_atparse {
# Note that these cannot be local since they will be invisible
# to atparse:
testvar='[testvar]'
var1='[var1]'
var2='[var2]'
cat<<\EOF | atparse var3='**'
Nothing special here. = @['Nothing special here.']
[testvar] = @[testvar]
[var1] [var2] = @[var1] @[var2]
** = @[var3]
@ = @[@] = @['@']
-n
eval "export PE$c=\${PE$c:-0}" = @[' eval "export PE$c=\${PE$c:-0}"']
EOF
echo "After block, \$var3 = \"$var3\" should be empty"
}
37 changes: 37 additions & 0 deletions tests/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
set -eux

SECONDS=0

if [[ $# -lt 1 ]]; then
echo "Usage: $0 app_name [ build_nr ] [ clean_before ] [ clean_after ]"
exit 1
fi

readonly app_name=$1
readonly build_name=fv3_mom6_cice_${2:-0}
readonly clean_before=${3:-YES}
readonly clean_after=${4:-YES}

hostname

readonly compile_root_dir=$(cd "$(dirname "$0")" && pwd -P )
PATHTR=${PATHTR:-$(cd ${compile_root_dir}/.. && pwd)}
echo "PATHTR is $PATHTR"
cd ${PATHTR}/NEMS

if [[ ${clean_before} == YES ]]; then
make app=${app_name} distclean
fi

make app=${app_name} build

if [[ ${clean_after} == YES ]]; then
make app=${app_name} clean
fi

cp ${PATHTR}/NEMS/exe/NEMS.x ${PATHTR}/tests/${build_name}.exe
cp ${PATHTR}/NEMS/src/conf/modules.nems ${PATHTR}/tests/modules.${build_name}

elapsed=$SECONDS
echo "Elapsed time $elapsed seconds. Compiling ${app_name} finished"
Loading

0 comments on commit b81e049

Please sign in to comment.