From 0302beee448ba89e445f885ad65793b111618dc9 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Mon, 25 Nov 2024 15:32:07 +0000 Subject: [PATCH] Address comments --- ci/driver.sh | 1 + ci/gw_driver.sh | 1 + ci/run_ci.sh | 2 +- ci/run_gw_ci.sh | 2 +- test/atm/global-workflow/CMakeLists.txt | 116 ++++++------------ .../C96C48_ufs_hybatmDA_fv3inc.ref | 0 .../C96C48_ufs_hybatmDA_lgetkf.ref | 0 7 files changed, 39 insertions(+), 83 deletions(-) delete mode 100644 test/testreference/C96C48_ufs_hybatmDA_fv3inc.ref delete mode 100644 test/testreference/C96C48_ufs_hybatmDA_lgetkf.ref diff --git a/ci/driver.sh b/ci/driver.sh index 933b9223b..afd1e1974 100755 --- a/ci/driver.sh +++ b/ci/driver.sh @@ -42,6 +42,7 @@ case ${TARGET} in module use $GDAS_MODULE_USE module load GDAS/$TARGET module list + export NTASKS_TESTS=12 ;; *) echo "Unsupported platform. Exiting with error." diff --git a/ci/gw_driver.sh b/ci/gw_driver.sh index c40ff4026..41c6915f6 100755 --- a/ci/gw_driver.sh +++ b/ci/gw_driver.sh @@ -42,6 +42,7 @@ case ${TARGET} in module use $GDAS_MODULE_USE module load GDAS/$TARGET module list + export NTASKS_TESTS=12 ;; *) echo "Unsupported platform. Exiting with error." diff --git a/ci/run_ci.sh b/ci/run_ci.sh index f6c21642b..64c8ec1be 100755 --- a/ci/run_ci.sh +++ b/ci/run_ci.sh @@ -61,7 +61,7 @@ module use $GDAS_MODULE_USE module load GDAS/$TARGET echo "---------------------------------------------------" >> $outfile rm -rf log.ctest -ctest -j12 -R gdasapp --output-on-failure &>> log.ctest +ctest -j${$NTASKS_TESTS} -R gdasapp --output-on-failure &>> log.ctest ctest_status=$? npassed=$(cat log.ctest | grep "tests passed") if [ $ctest_status -eq 0 ]; then diff --git a/ci/run_gw_ci.sh b/ci/run_gw_ci.sh index dde762782..606a1c6b7 100755 --- a/ci/run_gw_ci.sh +++ b/ci/run_gw_ci.sh @@ -62,7 +62,7 @@ module use $repodir/sorc/gdas.cd/modulefiles module load GDAS/$TARGET echo "---------------------------------------------------" >> $outfile rm -rf log.ctest -ctest -j12 -R gdasapp --output-on-failure &>> log.ctest +ctest -j${$NTASKS_TESTS} -R gdasapp --output-on-failure &>> log.ctest ctest_status=$? npassed=$(cat log.ctest | grep "tests passed") if [ $ctest_status -eq 0 ]; then diff --git a/test/atm/global-workflow/CMakeLists.txt b/test/atm/global-workflow/CMakeLists.txt index daa5b8edf..0138a3002 100644 --- a/test/atm/global-workflow/CMakeLists.txt +++ b/test/atm/global-workflow/CMakeLists.txt @@ -1,86 +1,40 @@ +set(COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/setup_workflow_exp.sh) +set(ARGS "${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}") +set(WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun) + +function(add_jjob_test TARGET TEST_DEPENDS) + message(STATUS "preparing ${TARGET} for atm_jjob ctests") + ecbuild_add_test(TARGET ${TARGET} + TYPE SCRIPT + COMMAND ${COMMAND} + ARGS ${ARGS} + WORKING_DIRECTORY ${WORKING_DIRECTORY} + TEST_DEPENDS ${TEST_DEPENDS}) +endfunction() + # test for creating an experiment directory within the global-workflow file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun) +# Setup jjob tests ecbuild_add_test(TARGET test_gdasapp_setup_atm_cycled_exp TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/setup_workflow_exp.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_var_init - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_var_init.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_setup_atm_cycled_exp) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_var_run - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_var_run.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_atm_jjob_var_init) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_var_inc - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_var_inc.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_atm_jjob_var_run) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_var_final - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_var_final.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_atm_jjob_var_inc) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_ens_init - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_ens_init.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_setup_atm_cycled_exp) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_ens_letkf - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_ens_letkf.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_atm_jjob_ens_init) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_ens_init_split - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_ens_init_split.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_atm_jjob_ens_letkf) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_ens_obs - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_ens_obs.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_atm_jjob_ens_init_split) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_ens_sol - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_ens_sol.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_atm_jjob_ens_obs) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_ens_inc - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_ens_inc.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_atm_jjob_ens_sol) - -ecbuild_add_test(TARGET test_gdasapp_atm_jjob_ens_final - TYPE SCRIPT - COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_ens_final.sh - ARGS ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun - TEST_DEPENDS test_gdasapp_atm_jjob_ens_inc) - + COMMAND ${COMMAND} + ARGS ${ARGS} + WORKING_DIRECTORY ${WORKING_DIRECTORY}) + +# Variational jjobs +add_jjob_test(test_gdasapp_atm_jjob_var_init test_gdasapp_setup_atm_cycled_exp) +add_jjob_test(test_gdasapp_atm_jjob_var_run test_gdasapp_atm_jjob_var_init) +add_jjob_test(test_gdasapp_atm_jjob_var_inc test_gdasapp_atm_jjob_var_run) +add_jjob_test(test_gdasapp_atm_jjob_var_final test_gdasapp_atm_jjob_var_inc) + +# Ensemble jjobs with no split observer-solver +add_jjob_test(test_gdasapp_atm_jjob_ens_init test_gdasapp_setup_atm_cycled_exp) +add_jjob_test(test_gdasapp_atm_jjob_ens_letkf test_gdasapp_atm_jjob_ens_init) + +# Ensemble jjobs with split observer-solver +add_jjob_test(test_gdasapp_atm_jjob_ens_init_split test_gdasapp_setup_atm_cycled_exp) +add_jjob_test(test_gdasapp_atm_jjob_ens_obs test_gdasapp_atm_jjob_ens_init_split) +add_jjob_test(test_gdasapp_atm_jjob_ens_sol test_gdasapp_atm_jjob_ens_obs) +add_jjob_test(test_gdasapp_atm_jjob_ens_inc test_gdasapp_atm_jjob_ens_sol) +add_jjob_test(test_gdasapp_atm_jjob_ens_final test_gdasapp_atm_jjob_ens_inc) diff --git a/test/testreference/C96C48_ufs_hybatmDA_fv3inc.ref b/test/testreference/C96C48_ufs_hybatmDA_fv3inc.ref deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/testreference/C96C48_ufs_hybatmDA_lgetkf.ref b/test/testreference/C96C48_ufs_hybatmDA_lgetkf.ref deleted file mode 100644 index e69de29bb..000000000