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 weekly tests and remove run directories that are no longer needed by other tests #1004

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion tests/rt_weekly.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v16_nsstNoahmpUGWPv1 -D32B
RUN | control_c768 | - wcoss_cray | fv3 |

# CPLD Benchmark 35d tests
# The length of forecast is one day for the weekly tests.
# The length of forecast is 5 days for the weekly tests.
COMPILE | -DAPP=S2SW -DCCPP_SUITES=FV3_GFS_v16_coupled_nsstNoahmpUGWPv1 | + hera.intel | fv3 | |
RUN | cpld_bmark_p7_35d | | fv3 | | 2012010100
RUN | cpld_bmark_p7_35d | | fv3 | | 2012040100
Expand Down
25 changes: 25 additions & 0 deletions tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,30 @@ fi

echo " $( date +%s )" >> ${LOG_DIR}/job_${JOB_NR}_timestamp.txt

################################################################################
# Remove RUN_DIRs if they are no longer needed by other tests
################################################################################
keep_run_dir=false
if [[ ${TEST_NAME} == 'cpld_control_c96_p7' || ${TEST_NAME} == 'cpld_control_c192_p7' ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since those tests may be changed to a different name, we will have to change this script often. I'd suggest to use a more general way to decide which tests should be kept.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not like all these special cases. Very difficult to maintain. run_test.sh should not have any code that depends on the test name. Variable $TEST_NAME is only used for log files. We should be able to rename all test to something else and everything should work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@junwang-noaa If the run directory from a test needs to be kept, can we just add a suffix to the test name? For example, cpld_control_c96_p7 becomes cpld_control_c96_p7.dep.

In run_test.sh, we only need the following:
if [[ ${TEST_NAME} == *.dep ]]; then
keep_run_dir=true
fi

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@binli2337 I think this will add restriction on test name, and we don't know if there will be dependent test added later on. On the other hand, we already have the dependency information. The tests in the last column in rt.conf are the tests that other tests depends on and can only be deleted at the end of RT.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@junwang-noaa The run_test.sh file is updated to use the information in the last column of rt.conf.

keep_run_dir=true
fi
if [[ ${TEST_NAME} == 'cpld_control_c384_p7' || ${TEST_NAME} == 'control' ]]; then
keep_run_dir=true
fi
if [[ ${TEST_NAME} == 'control_stochy' || ${TEST_NAME} == 'control_p7' ]]; then
keep_run_dir=true
fi
if [[ ${TEST_NAME} == 'regional_control' || ${TEST_NAME} == 'rap_control' ]]; then
keep_run_dir=true
fi
if [[ ${TEST_NAME} == 'rap_sfcdiff' || ${TEST_NAME} == 'datm_cdeps_control_cfsr' ]]; then
keep_run_dir=true
fi

if [[ ${keep_run_dir} == false ]]; then
cd ${RUNDIR_ROOT}
rm -rf ${RUNDIR}
binli2337 marked this conversation as resolved.
Show resolved Hide resolved
fi

elapsed=$SECONDS
echo "Elapsed time $elapsed seconds. Test ${TEST_NAME}"
8 changes: 7 additions & 1 deletion tests/tests/cpld_bmark_p7_35d
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@ export SHOUR=00
export SECS=`expr $SHOUR \* 3600`
export BMIC=.true.

# length of run is 35 days
#export DAYS=35
#export FHMAX=840
export RESTART_N=`expr ${FHMAX} - ${FHROT}`
#export WLCLK=480

# length of run is 5 days for weekly tests
export DAYS=5
export FHMAX=120
export WLCLK=90
export RESTART_N=`expr ${FHMAX} - ${FHROT}`

export TASKS=1700
export TPN=$TPN_cpl_thrd
export INPES=12
Expand Down