|
TRUST 1.9.8
HPC thermohydraulic platform
|
A validation form is a Jupyter notebook that documents a test case — its data file, mesh, expected results, plots and reference values. TRUST baltiks ship them under share/Validation/Rapports_automatiques/. This tutorial walks through two things you will do regularly while developing a baltik:
The example uses a fictitious upwind.data case but the workflow is identical for any test case you want to document.
Each form lives in its own directory under share/Validation/Rapports_automatiques/. Make a fresh one and drop the data file (and any companion files, such as the mesh) into a src/ subdirectory:
Generate the notebook skeleton with the trust script:
You now have an upwind.ipynb file in the directory — a stub Jupyter notebook with the cells TRUST expects (data-file extraction, run, post-processing). Edit it to add the prose, plots and validation checks that describe what this case is meant to demonstrate.
Add and commit:
Two helpers ship with the baltik environment:
The PDF will contain every field and probe post-processed by the data file, plus the prose, plots and tables you wrote into the notebook.
A validation form is a documentation artefact. To make it run as part of the baltik's nightly non-regression checks, you must register it in tests/Reference/Validation/. The check_optim target does this automatically:
You should see lines like:
A new test case upwind_jdd1 is created under tests/Reference/Validation/, pointing back at the validation form.
When make check_optim reports a crash on PAR_upwind_jdd1, copy the extracted case into the build dir, partition it manually, and re-run:
If trust -copy complains that it doesn't know the case yet, re-run ./configure from the project root so the new test case is registered, then retry the copy:
Now partition the case and run it on two processes to reproduce the crash:
Edit PAR_upwind_jdd1.data to fix the Scatter line. The common correction is:
When the parallel run completes, propagate the fix back into the source notebook directory so future extractions stay correct:
Re-run only the previously-failing tests:
You should see:
Two convenience targets run every registered test:
To produce a tarball that bundles the baltik (sources, validation forms, registered test cases, build metadata):
The resulting <baltik>.tar.gz is what you hand to someone else who wants to rebuild your baltik from scratch.