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 ctests to include more obs types for more realistic testing #184

Merged

Conversation

SamuelDegelia-NOAA
Copy link
Contributor

@SamuelDegelia-NOAA SamuelDegelia-NOAA commented Oct 2, 2024

This PR addresses #178 by updating the mpas-jedi ctests in RDASApp to now use a larger set of observations for more realistic testing. The yaml files for these new ctests are generated from the individual yamls added by other developers into rrfs-test/validated_yamls/templates/obtype_config. A script is run during build called gen_yaml_ctest.sh that concatenates these yamls, merges them with one of the ctest yamls in rrfs-test/validated_yamls/templates/basic_config, and then moves those new files into rrfs-test/testinput for use in the ctests.

Currently included in the ctests are mesonet, aircraft, aircar, and ATMS obs.

Other notes

  • New observations are staged for these tests in RDAS_DATA/fix/expr_data/mpas_2024052700/obs_ctest. Thanks to @delippi for providing these new obs.
  • The standalone LETKF and GETKF ctests are removed given that these take a very long time to run. LETKF is also very slow even in split mode (>1 hour) so the only ctest for EnKF that remains is GETKF in split-mode. This test is still slow compared to EnVar (~20 min vs 5 min), but is still much faster than LETKF. The GETKF efficiency should be further investigated as we continue development.
  • Old yamls used for experiments are moved into rrfs-test/testinput_expr and linked into the expr directory so as to not interupt any ongoing testing by other developers

Ctest output for a fresh clone and build on Hera:

(eva) [Samuel.Degelia@hfe05 ush]$ ./run_rrfs_tests.sh wrfruc
+ cd /scratch1/BMC/zrtrr/Samuel.Degelia/RDASApp_dev/RDASApp/ush/../build/rrfs-test
+ pwd
/scratch1/BMC/zrtrr/Samuel.Degelia/RDASApp_dev/RDASApp/build/rrfs-test
+ ctest -j6
Test project /scratch1/BMC/zrtrr/Samuel.Degelia/RDASApp_dev/RDASApp/build/rrfs-test
    Start 4: rrfs_mpasjedi_2024052700_getkf_observer
    Start 1: rrfs_fv3jedi_hyb_2022052619
    Start 2: rrfs_fv3jedi_letkf_2022052619
    Start 3: rrfs_mpasjedi_2024052700_Ens3Dvar
    Start 6: rrfs_mpasjedi_2024052700_bumploc
1/6 Test #2: rrfs_fv3jedi_letkf_2022052619 .............   Passed  548.44 sec
2/6 Test #1: rrfs_fv3jedi_hyb_2022052619 ...............   Passed  662.11 sec
3/6 Test #6: rrfs_mpasjedi_2024052700_bumploc ..........   Passed  954.16 sec
4/6 Test #3: rrfs_mpasjedi_2024052700_Ens3Dvar .........   Passed  1126.73 sec
5/6 Test #4: rrfs_mpasjedi_2024052700_getkf_observer ...   Passed  1322.96 sec
    Start 5: rrfs_mpasjedi_2024052700_getkf_solver
6/6 Test #5: rrfs_mpasjedi_2024052700_getkf_solver .....   Passed  1331.22 sec

100% tests passed, 0 tests failed out of 6

Label Time Summary:
mpi            = 5945.62 sec*proc (6 tests)
rdas-bundle    = 5945.62 sec*proc (6 tests)
script         = 5945.62 sec*proc (6 tests)

Total Test time (real) = 2655.35 sec
+ exit 0

Once we have some initial reviews, one of the code managers can add the tags for CI tests on each machine. Also, if this PR is approved, I will update the Wiki to show how to further extend these ctests by adding additional observation types in rrfs-test/validated_yamls/templates/obtype_config. It should be pretty easy now - all that needs to be done is to add the yaml into obtype_config, update the gen_yaml_ctest.sh script, and then update the test reference data.

@guoqing-noaa
Copy link
Collaborator

@ShunLiu-NOAA we better do CI tests after the new changes. I don't think there will be any issues but it is still good to retest after new changes. I will add "test_*" tags now and it should be completed in an hour.

@rrfsbot
Copy link
Collaborator

rrfsbot commented Oct 11, 2024

PASSED on jet

started build_and_test on jet at UTC time: Fri Oct 11 17:06:53 UTC 2024
finished at UTC time: Fri Oct 11 18:05:07 UTC 2024

Test project /lfs5/BMC/wrfruc/rrfsbot/PRs_RDASApp/184/build/rrfs-test
    Start 4: rrfs_mpasjedi_2024052700_getkf_observer
    Start 1: rrfs_fv3jedi_hyb_2022052619
    Start 2: rrfs_fv3jedi_letkf_2022052619
    Start 3: rrfs_mpasjedi_2024052700_Ens3Dvar
    Start 6: rrfs_mpasjedi_2024052700_bumploc
1/6 Test #2: rrfs_fv3jedi_letkf_2022052619 .............   Passed  201.46 sec
2/6 Test #1: rrfs_fv3jedi_hyb_2022052619 ...............   Passed  254.84 sec
3/6 Test #4: rrfs_mpasjedi_2024052700_getkf_observer ...   Passed  446.56 sec
    Start 5: rrfs_mpasjedi_2024052700_getkf_solver
4/6 Test #3: rrfs_mpasjedi_2024052700_Ens3Dvar .........   Passed  471.96 sec
5/6 Test #6: rrfs_mpasjedi_2024052700_bumploc ..........   Passed  547.68 sec
6/6 Test #5: rrfs_mpasjedi_2024052700_getkf_solver .....   Passed  1520.16 sec

100% tests passed, 0 tests failed out of 6

Label Time Summary:
mpi            = 3442.66 sec*proc (6 tests)
rdas-bundle    = 3442.66 sec*proc (6 tests)
script         = 3442.66 sec*proc (6 tests)

Total Test time (real) = 1966.75 sec

workdir: /lfs5/BMC/wrfruc/rrfsbot/PRs_RDASApp/184

@rrfsbot
Copy link
Collaborator

rrfsbot commented Oct 11, 2024

PASSED on hera

started build_and_test on hera at UTC time: Fri Oct 11 17:09:05 UTC 2024
finished at UTC time: Fri Oct 11 18:09:35 UTC 2024

Test project /scratch1/NCEPDEV/fv3-cam/rrfsbot/PRs_RDASApp/184/build/rrfs-test
    Start 4: rrfs_mpasjedi_2024052700_getkf_observer
    Start 1: rrfs_fv3jedi_hyb_2022052619
    Start 2: rrfs_fv3jedi_letkf_2022052619
    Start 3: rrfs_mpasjedi_2024052700_Ens3Dvar
    Start 6: rrfs_mpasjedi_2024052700_bumploc
1/6 Test #2: rrfs_fv3jedi_letkf_2022052619 .............   Passed   52.00 sec
2/6 Test #1: rrfs_fv3jedi_hyb_2022052619 ...............   Passed  105.43 sec
3/6 Test #6: rrfs_mpasjedi_2024052700_bumploc ..........   Passed  401.71 sec
4/6 Test #3: rrfs_mpasjedi_2024052700_Ens3Dvar .........   Passed  421.83 sec
5/6 Test #4: rrfs_mpasjedi_2024052700_getkf_observer ...   Passed  586.90 sec
    Start 5: rrfs_mpasjedi_2024052700_getkf_solver
6/6 Test #5: rrfs_mpasjedi_2024052700_getkf_solver .....   Passed  1145.44 sec

100% tests passed, 0 tests failed out of 6

Label Time Summary:
mpi            = 2713.30 sec*proc (6 tests)
rdas-bundle    = 2713.30 sec*proc (6 tests)
script         = 2713.30 sec*proc (6 tests)

Total Test time (real) = 1732.89 sec

workdir: /scratch1/NCEPDEV/fv3-cam/rrfsbot/PRs_RDASApp/184

@rrfsbot
Copy link
Collaborator

rrfsbot commented Oct 11, 2024

PASSED on hercules

started build_and_test on hercules at UTC time: Fri Oct 11 17:06:06 UTC 2024
finished at UTC time: Fri Oct 11 18:10:16 UTC 2024

Test project /work/noaa/wrfruc/rrfsbot/PRs_RDASApp/184/build/rrfs-test
    Start 4: rrfs_mpasjedi_2024052700_getkf_observer
    Start 1: rrfs_fv3jedi_hyb_2022052619
    Start 2: rrfs_fv3jedi_letkf_2022052619
    Start 3: rrfs_mpasjedi_2024052700_Ens3Dvar
    Start 6: rrfs_mpasjedi_2024052700_bumploc
1/6 Test #2: rrfs_fv3jedi_letkf_2022052619 .............   Passed  242.99 sec
2/6 Test #1: rrfs_fv3jedi_hyb_2022052619 ...............   Passed  314.20 sec
3/6 Test #6: rrfs_mpasjedi_2024052700_bumploc ..........   Passed  333.86 sec
4/6 Test #3: rrfs_mpasjedi_2024052700_Ens3Dvar .........   Passed  886.95 sec
5/6 Test #4: rrfs_mpasjedi_2024052700_getkf_observer ...   Passed  905.04 sec
    Start 5: rrfs_mpasjedi_2024052700_getkf_solver
6/6 Test #5: rrfs_mpasjedi_2024052700_getkf_solver .....   Passed  1201.03 sec

100% tests passed, 0 tests failed out of 6

Label Time Summary:
mpi            = 3884.07 sec*proc (6 tests)
rdas-bundle    = 3884.07 sec*proc (6 tests)
script         = 3884.07 sec*proc (6 tests)

Total Test time (real) = 2106.08 sec

workdir: /work/noaa/wrfruc/rrfsbot/PRs_RDASApp/184

Copy link
Collaborator

@guoqing-noaa guoqing-noaa left a comment

Choose a reason for hiding this comment

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

Thanks @SamuelDegelia-NOAA for addressing some comments.

@ShunLiu-NOAA ShunLiu-NOAA merged commit 983f1d8 into NOAA-EMC:develop Oct 11, 2024
1 check passed
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SamuelDegelia-NOAA line 54:
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir} )
and other copying lines.

These copying/linking only runs at the build time.

This is sometime inconvenient in the develop/debug process as we have to track down to find what files to copy/link and then manually do it for new changes (to avoid unnecessary long re-building process). It will be good if we have a common script which can be used by the build process and at the same time we can also run it outside of the build process to facilitate debugging/developing.

I have figured this out for my rrfs-test eror and manually copied/linked new files. So it is not a high priority at the moment but it is good to have this capability. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For my ctest developments, I normally just run build.sh but add an exit command after the cmake command. But yeah adding a short shell script similar to rrfs-test/CMakeLists.txt could be a little easier. I'll do that at some point.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That will be great! Thanks, @SamuelDegelia-NOAA!

@SamuelDegelia-NOAA SamuelDegelia-NOAA deleted the feature/ctest_validated_yamls branch October 15, 2024 14:13
hu5970 pushed a commit that referenced this pull request Oct 18, 2024
This PR adds a simple shell script based on `rrfs-test/CMakeLists.txt`
that allows developers to update the RRFS ctests in RDASApp. The goal
here is to be able to run this quick script if making any changes to the
yaml files, test reference files, or input data for the ctests.
Previously, the only way to do this was to rebuild all of RDASApp or
make temporary changes to `build.sh`

Please see
#184 (comment) for
additional motivation.

Note: this script cannot update the ctest configuration (number of
tests, test names, or MPI configuration) since those options are handled
by `ecbuild` during the cmake step.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand ctests to include additional obs for more realistic testing
8 participants