|
TRUST 1.9.8
HPC thermohydraulic platform
|
This page describes how to run a TRUST (or Baltik) Jupyter validation report through the Run_fiche script. Authoring a new report is covered in How to write a validation report.
Scope. Only the Jupyter-notebook formalism is documented here. The historical PRM format is still accepted by Run_fiche but is being phased out; if you must touch a PRM report, convert it first (see PRM conversion).
Heads up. The Run_fiche script has a handful of quirks documented under Gotchas. The script is slated for a rewrite; these workarounds are temporary.
Run_fiche is always invoked from the form root — the directory that contains the <FormName>.ipynb file and its src/ subdirectory.
Opens the notebook in JupyterLab in your browser. This is the right mode while writing the form: re-execute cells one by one, inspect intermediate values, iterate on plots.
Executes the notebook end-to-end and writes build/rapport.pdf. Cases run concurrently through the Sserver local queue (see The Sserver). This is the right mode for a full run.
Note that -parallel_sjob already produces the PDF. Do not add -export_pdf; the combination has a quirk (see Gotchas).
The non-Sserver alternative is Run_fiche -parallel_run [N], which runs cases in parallel inside the notebook's Python process using a simple internal scheduler. Prefer -parallel_sjob for non-trivial validation runs: the Sserver is more robust under recursive case launches (e.g. cases spawned from pre_run hooks).
Executes the notebook end-to-end, sequentially, and writes build/rapport.pdf. Useful for small reports or for debugging an issue you suspect comes from concurrency.
Re-executes the notebook but skips trust invocations, Python pre_run / post_run hooks, and bash prepare / pre_run / post_run scripts. The notebook reuses whatever is already in build/. The right mode while iterating on plotting, postprocessing, or narrative text after a full run has populated build/.
Same as -export_pdf but stops at build/rapport.tex. Useful when you want to tweak the LaTeX manually before running xelatex, or to edit the report title (see the metadata trick at the bottom of SampleFormJupyter).
Creates a minimal <FormName>.ipynb next to src/, pre-populated with one run.addCase per .data found in src/. Useful when starting a new form from a set of pre-existing datasets.
Copies Validation/Rapports_automatiques/Verification/SampleFormJupyter to $TRUST_TMP/ and opens it. Quickest way to see every trustutils feature in action.
The Sserver is a small local job queue shipped with TRUST ($TRUST_ROOT/bin/Sjob/). It throttles concurrent trust runs so that a validation report does not saturate your workstation, and it handles recursive case launches (cases spawned from pre_run hooks) cleanly.
Start it. Either let Run_fiche -parallel_sjob start it for you (it will, if TRUST_WITHOUT_HOST=1 and no Sserver is already running), or start it explicitly:
Re-running Sserver <N> against an existing server just adjusts the proc count.
Inspect and manage.
Stop it. The Sserver is not stopped automatically at the end of Run_fiche. Clean up explicitly when you are done with a validation session:
Behaviour change with reports. Whenever an Sserver is alive on the machine, trustutils.run detects it automatically (regardless of flags) and routes every case through it in parallel mode. A stale Sserver from a previous session therefore changes how a subsequent Run_fiche run behaves — kill it between sessions to avoid surprises.
See $TRUST_ROOT/bin/Sjob/README for the full reference (Salloc options, advanced client commands).
These can be combined with the PDF-producing recipes above.
Packages the build directory into a preserve.tgz that contains everything needed to rebuild the report later with a future version of TRUST (the .data files after substitution, mesh files, probes, the used_files manifest, etc.).
-archive is not part of the day-to-day authoring loop, but every validation form must support it. Before opening a PR that adds or modifies a validation report, run:
The second invocation reuses build/; if it fails, the form is not PR-ready (typically: a file used during the run was not declared through the trustutils.run API and is missing from build/used_files).
Until Run_fiche is rewritten, these quirks are worth knowing.
Run_fiche -parallel_run -export_pdf runs sequentially. The -export_pdf branch of the script does not forward -parallel_* flags to the notebook's runtime.
Run_fiche -parallel_sjob -export_pdf appears to work, but only incidentally: parsing -parallel_sjob autostarts the Sserver as a side effect, and trustutils.run then auto-detects the running Sserver and switches to parallel mode on its own. Fragile.
Recommendation. Don't combine -export_pdf with anything -parallel_*. For a parallel PDF report, use -parallel_sjob alone (which produces the PDF on its own).
trustutils.run auto-detects a running Sserver and uses it whether or not you asked for one. A leftover Sserver from a previous run, possibly with the wrong proc count, will silently affect subsequent reports. Always stop the Sserver (Sserver -1 or Sserver -2) at the end of a session.
-post_run is a PRM-only flag. For Jupyter forms, drive post-execution work through Python post_run hooks on each case (see How to write a validation report).
The historical PRM format is being discontinued. If you inherit a PRM report and need to touch it, convert it to a Jupyter notebook first:
This runs on a PRM report directory (the one containing src/*.prm) and emits a Jupyter notebook alongside the original. Everything else in this page then applies.