Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNew-NOAA committed Nov 25, 2024
1 parent cb672bf commit 0302bee
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 83 deletions.
1 change: 1 addition & 0 deletions ci/driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
1 change: 1 addition & 0 deletions ci/gw_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion ci/run_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/run_gw_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
116 changes: 35 additions & 81 deletions test/atm/global-workflow/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Empty file.
Empty file.

0 comments on commit 0302bee

Please sign in to comment.