Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the format of rt.conf #349

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[submodule "FV3"]
path = FV3
url = https://github.com/NOAA-EMC/fv3atm
branch = develop
# url = https://github.com/NOAA-EMC/fv3atm
# branch = develop
url = https://github.com/climbfuji/fv3atm
branch = update_ccpp_submodules_20201229
[submodule "NEMS"]
path = NEMS
url = https://github.com/NOAA-EMC/NEMS
Expand Down
2 changes: 1 addition & 1 deletion FV3
Submodule FV3 updated 3 files
+8 −4 .gitmodules
+1 −1 ccpp/framework
+1 −1 ccpp/physics
441 changes: 182 additions & 259 deletions tests/rt.conf

Large diffs are not rendered by default.

108 changes: 64 additions & 44 deletions tests/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ usage() {
rt_single() {
local compile_line=''
local run_line=''
while read -r line; do
while read -r line || [ "$line" ]; do
line="${line#"${line%%[![:space:]]*}"}"
[[ ${#line} == 0 ]] && continue
[[ $line == \#* ]] && continue
Expand Down Expand Up @@ -573,78 +573,98 @@ in_metatask=false

[[ -f $TESTS_FILE ]] || die "$TESTS_FILE does not exist"

while read -r line; do
while read -r line || [ "$line" ]; do

line="${line#"${line%%[![:space:]]*}"}"
[[ ${#line} == 0 ]] && continue
[[ $line == \#* ]] && continue

if [[ $line == COMPILE* ]] ; then

MAKE_OPT=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//')
SET=$( echo $line | cut -d'|' -f3)
MACHINES=$(echo $line | cut -d'|' -f4)
CB=$( echo $line | cut -d'|' -f5)
MAKE_OPT=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//')
SET=$( echo $line | cut -d'|' -f3)
MACHINES=$(echo $line | cut -d'|' -f4 | sed -e 's/^ *//' -e 's/ *$//')
CB=$( echo $line | cut -d'|' -f5)

[[ $SET_ID != ' ' && $SET != *${SET_ID}* ]] && continue
[[ $MACHINES != ' ' && $MACHINES != *${MACHINE_ID}* ]] && continue
[[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue
[[ $SET_ID != ' ' && $SET != *${SET_ID}* ]] && continue
[[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue

(( COMPILE_NR += 1 ))
if [[ ${MACHINES} != '' ]]; then
if [[ ${MACHINES} == -* ]]; then
[[ ${MACHINES} =~ ${MACHINE_ID} ]] && continue
elif [[ ${MACHINES} == +* ]]; then
[[ ${MACHINES} =~ ${MACHINE_ID} ]] || continue
else
echo "MACHINES=|${MACHINES}|"
die "MACHINES spec must be either an empty string or start with either '+' or '-'"
fi
fi

cat << EOF > ${RUNDIR_ROOT}/compile_${COMPILE_NR}.env
export MACHINE_ID=${MACHINE_ID}
export RT_COMPILER=${RT_COMPILER}
export PATHRT=${PATHRT}
export PATHTR=${PATHTR}
export SCHEDULER=${SCHEDULER}
export ACCNR=${ACCNR}
export QUEUE=${COMPILE_QUEUE}
export PARTITION=${PARTITION}
export ROCOTO=${ROCOTO}
export ECFLOW=${ECFLOW}
export REGRESSIONTEST_LOG=${REGRESSIONTEST_LOG}
export LOG_DIR=${LOG_DIR}
(( COMPILE_NR += 1 ))

cat << EOF > ${RUNDIR_ROOT}/compile_${COMPILE_NR}.env
export MACHINE_ID=${MACHINE_ID}
export RT_COMPILER=${RT_COMPILER}
export PATHRT=${PATHRT}
export PATHTR=${PATHTR}
export SCHEDULER=${SCHEDULER}
export ACCNR=${ACCNR}
export QUEUE=${COMPILE_QUEUE}
export PARTITION=${PARTITION}
export ROCOTO=${ROCOTO}
export ECFLOW=${ECFLOW}
export REGRESSIONTEST_LOG=${REGRESSIONTEST_LOG}
export LOG_DIR=${LOG_DIR}
EOF

if [[ $ROCOTO == true ]]; then
rocoto_create_compile_task
elif [[ $ECFLOW == true ]]; then
ecflow_create_compile_task
else
./compile.sh $MACHINE_ID "${MAKE_OPT}" $COMPILE_NR > ${LOG_DIR}/compile_${COMPILE_NR}.log 2>&1
fi
if [[ $ROCOTO == true ]]; then
rocoto_create_compile_task
elif [[ $ECFLOW == true ]]; then
ecflow_create_compile_task
else
./compile.sh $MACHINE_ID "${MAKE_OPT}" $COMPILE_NR > ${LOG_DIR}/compile_${COMPILE_NR}.log 2>&1
fi

# Set RT_SUFFIX (regression test run directories and log files) and BL_SUFFIX
# (regression test baseline directories) for REPRO or PROD runs
if [[ ${MAKE_OPT^^} =~ "REPRO=Y" ]]; then
RT_SUFFIX="_repro"
BL_SUFFIX="_repro"
else
RT_SUFFIX="_prod"
BL_SUFFIX="_ccpp"
fi
# Set RT_SUFFIX (regression test run directories and log files) and BL_SUFFIX
# (regression test baseline directories) for REPRO or PROD runs
if [[ ${MAKE_OPT^^} =~ "REPRO=Y" ]]; then
RT_SUFFIX="_repro"
BL_SUFFIX="_repro"
else
RT_SUFFIX="_prod"
BL_SUFFIX="_ccpp"
fi

if [[ ${MAKE_OPT^^} =~ "WW3=Y" ]]; then
COMPILE_PREV_WW3_NR=${COMPILE_NR}
fi
if [[ ${MAKE_OPT^^} =~ "WW3=Y" ]]; then
COMPILE_PREV_WW3_NR=${COMPILE_NR}
fi

continue

elif [[ $line == RUN* ]] ; then

TEST_NAME=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//')
SET=$( echo $line | cut -d'|' -f3)
MACHINES=$( echo $line | cut -d'|' -f4)
MACHINES=$( echo $line | cut -d'|' -f4 | sed -e 's/^ *//' -e 's/ *$//')
CB=$( echo $line | cut -d'|' -f5)
DEP_RUN=$( echo $line | cut -d'|' -f6 | sed -e 's/^ *//' -e 's/ *$//')
DATE_35D=$( echo $line | cut -d'|' -f7 | sed -e 's/^ *//' -e 's/ *$//')

[[ -e "tests/$TEST_NAME" ]] || die "run test file tests/$TEST_NAME does not exist"
[[ $SET_ID != ' ' && $SET != *${SET_ID}* ]] && continue
[[ $MACHINES != ' ' && $MACHINES != *${MACHINE_ID}* ]] && continue
[[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue

if [[ ${MACHINES} != '' ]]; then
if [[ ${MACHINES} == -* ]]; then
[[ ${MACHINES} =~ ${MACHINE_ID} ]] && continue
elif [[ ${MACHINES} == +* ]]; then
[[ ${MACHINES} =~ ${MACHINE_ID} ]] || continue
else
echo "MACHINES=|${MACHINES}|"
die "MACHINES spec must be either an empty string or start with either '+' or '-'"
fi
fi

# 35 day tests
[[ $TEST_35D == true ]] && rt_35d

Expand Down
4 changes: 2 additions & 2 deletions tests/rt_35d.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
COMPILE | SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled S2S=Y | | hera.intel orion.intel | fv3 | |
COMPILE | SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled S2S=Y | | + hera.intel orion.intel | fv3 | |
RUN | cpld_bmark_35d | | | fv3 | | 2012010100
RUN | cpld_bmark_35d | | | fv3 | | 2012040100
RUN | cpld_bmark_35d | | | fv3 | | 2012070100
Expand All @@ -8,7 +8,7 @@ RUN | cpld_bmark_35d | | | fv3 | | 2013040100
RUN | cpld_bmark_35d | | | fv3 | | 2013070100
RUN | cpld_bmark_35d | | | fv3 | | 2013100100

COMPILE | SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled S2S=Y WW3=Y | | hera.intel orion.intel | fv3 | |
COMPILE | SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled S2S=Y WW3=Y | | + hera.intel orion.intel | fv3 | |
RUN | cpld_bmark_wave_35d | | | fv3 | | 2012010100
RUN | cpld_bmark_wave_35d | | | fv3 | | 2012040100
RUN | cpld_bmark_wave_35d | | | fv3 | | 2012070100
Expand Down
4 changes: 2 additions & 2 deletions tests/rt_gnu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ RUN | fv3_ccpp_esg_HAFS_v0_hwrf_thompson_debug
# S2S tests
#######################################################################################################################################################################################

COMPILE | SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled S2S=Y | standard | hera.gnu | fv3 |
COMPILE | SUITES=FV3_GFS_2017_coupled,FV3_GFS_2017_satmedmf_coupled,FV3_GFS_v15p2_coupled S2S=Y | standard | + hera.gnu | fv3 |

#######################################################################################################################################################################################
# Data Atmosphere tests
#######################################################################################################################################################################################

COMPILE | DATM=Y S2S=Y | standard | hera.gnu | fv3 |
COMPILE | DATM=Y S2S=Y | standard | + hera.gnu | fv3 |