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

Automatic validation #1396

Merged
merged 15 commits into from
Dec 17, 2024
Merged

Automatic validation #1396

merged 15 commits into from
Dec 17, 2024

Conversation

blaisb
Copy link
Contributor

@blaisb blaisb commented Dec 11, 2024

Description

Although Lethe is covered by extensive testing through application_tests, sometimes these tests are not enough to measure changes in the models that do not break the code but yield poorer results. This PR introduces an additional way to validate Lethe. The idea is to leverage the examples of Lethe for which there are solutions to compare to and to use them to validate the sotware on complicated cases. The validation loop is meant to be ran manually and generates artifacts, logs and a PDF report that can be looked at. We aim at launching these validation cases manually every week or so and to increase the number of validation test to provide, asymptotically, additional validation and comparison to measure and track the performance of the code.

The structure is relatively simple. Examples that are used for the validation now have a validate.sh script within their folder. Furthermore, there is a list of cases i contrib/validation/validation_cases.txt

For every case, the path of the case is specified and the number of core to run it. Right now, running all of the 5 cases takes about 8 hours on my machine, but these test cases are extensive and provide a lot of good information. Once we acquire our own node, we can launch many more test cases and things are going to be much more robust. Adding a new case is very cheap and the fun part is that they also use the python script to post-process the results from the regular simulations and as such, they keep the examples in a very mature state.

Testing

I have tested it on my machine extensively while developing it. This is not an intrusive change, it does not alter the code.

Documentation

I had to use the argparse module pretty much everywhere in the python script to enable the dump of the data files. This has forced me to modify slightly some python scripts and improve them. I changed the documentation accordingly.

Code related list:

  • All in-code documentation related to this PR is up to date (Doxygen format)
  • Copyright headers are present and up to date
  • Lethe documentation is up to date
  • New feature has unit test(s) (preferred) or application test(s), and restart files are in the generator folder
  • The branch is rebased onto master
  • Changelog (CHANGELOG.md) is up to date
  • Code is indented with indent-all and .prm files (examples and tests) with prm-indent

Pull request related list:

  • Labels are applied
  • There are at least 2 reviewers (or 1 if small feature) excluding the responsible for the merge
  • If this PR closes an issue or is related to a project, it is linked in the "Projects" or "Development" section
  • If the fix is temporary, an issue is opened
  • The PR description is cleaned and ready for merge

Copy link
Collaborator

@OresteMarquis OresteMarquis left a comment

Choose a reason for hiding this comment

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

Nice :) I really like this, it will be of so much help!

contrib/validation/validate_lethe.sh Outdated Show resolved Hide resolved
contrib/validation/validate_lethe.sh Show resolved Hide resolved
contrib/validation/validate_lethe.sh Outdated Show resolved Hide resolved
contrib/validation/validate_lethe.sh Show resolved Hide resolved
examples/dem/3d-rectangular-hopper/hopper_structured.msh Outdated Show resolved Hide resolved
examples/multiphysics/rising-bubble/rising-bubble.py Outdated Show resolved Hide resolved
@OresteMarquis OresteMarquis self-requested a review December 13, 2024 15:04
Copy link
Collaborator

@OresteMarquis OresteMarquis left a comment

Choose a reason for hiding this comment

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

I finally managed to install magick with all the dependencies on my computer. Everything seems to work, but it is still running.

contrib/validation/validate_lethe.sh Show resolved Hide resolved
@OresteMarquis
Copy link
Collaborator

Everything worked on my computer! It is ready to merge in my opinion.

@blaisb blaisb force-pushed the automatic_validation branch from 5ff987a to 43582e3 Compare December 16, 2024 20:25
@blaisb blaisb merged commit 95a7f6d into master Dec 17, 2024
11 checks passed
@blaisb blaisb deleted the automatic_validation branch December 17, 2024 13:54
@blaisb blaisb restored the automatic_validation branch December 17, 2024 13:54
@blaisb blaisb deleted the automatic_validation branch December 17, 2024 13:54
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.

2 participants