Where code_aster stands today
CodeAsterAdapter implements the run lifecycle and nothing else. Measured on
main with the _provides introspection the capability work added:
| Domain |
Method or declaration |
code_saturne |
code_aster |
| Status |
read_progress |
yes |
— |
| Residuals |
find_residuals_files, parse_live_residuals |
yes |
— |
| Probes |
list_probe_files, list_profile_files, locate_probe_files |
yes |
— |
| Performance |
find_performance_log, parse_performance, performance_columns |
yes |
— |
| Live control |
apply_control, control_actions |
yes |
— |
| Restart |
build_restart_args, read_restart_origin |
yes |
— |
| GUI |
gui_argv |
yes |
— |
| Slurm |
build_slurm_script, mpi_env |
yes |
— |
| Files |
locate_case_file, find_run_config |
yes |
— |
| Doctor |
doctor_checks |
yes |
— |
| Declarations |
anomaly_file_names |
4 entries |
2 (base default) |
| Declarations |
cleanup_log_names |
6 entries |
2 (base default) |
| Declarations |
template_input_names |
2 entries |
empty |
Derived capabilities, which is what the dashboard now shows:
- code_saturne:
compare, control, gui, performance, probes, residuals, restart
- code_aster:
compare
So a code_aster user gets four panels (Status, Compare, Log Tail, Recent
Errors) and three buttons (Run, Kill, Clean).
Parity is not "implement all eighteen"
Some of these are meaningless for code_aster and should stay unimplemented on
purpose. A linear static analysis has no residual curve to plot, and the
capability mechanism already handles that correctly: an unimplemented method
means the panel simply does not appear.
The first task of this issue is therefore a triage, not code. For each row
above, decide: meaningful for code_aster, meaningless, or meaningful but out of
scope for now. That triage needs someone who knows code_aster; the rest is
mechanical once it is settled.
Blocker: DIAGNOSTIC JOB is never found in the shipped example
Independent of parity, and worth fixing first because it makes the shipped
example misreport every run.
_ensure_mess_entry injects F mess RESU/LOGS/run_solver.log R 6 into the
.export only when the file declares no F mess line at all
(code_aster.py:76). The shipped examples/codeaster-cube/TEMPLATE/study.export
declares one on line 18:
So the injection is skipped, code_aster writes its message file to
output.mess, and detect_outcome looks at
RESU/LOGS/run_solver.log (code_aster.py:168), which never exists. It returns
None for ever, and the case is finalised by the PID-death fallback as
FAILED — even after a perfect run.
The integration test does not catch it: tests/integration/test_code_aster_adapter.py
builds an .export with no F mess line, so it exercises the branch where
the injection happens. It is also gated behind CSAUTO_CODE_ASTER_DOCKER_TESTS=1
and never runs in CI.
Two candidate fixes, both needing a code_aster opinion: rewrite the existing
F mess line rather than leaving it, or have detect_outcome read the path the
.export actually declares instead of a hardcoded one. The second is cleaner
and also handles hand-written templates.
Three more design questions in the current adapter
Each needs a decision from someone who knows the solver:
-
shared_dir_names = ("MESH", "RESU") while results_dirname = "RESU".
The two meanings collide: shared dirs are template-level directories
symlinked into the runs dir and bind-mounted read-write into every
container, while results_dirname is per-case. As written, if a RESU
directory sits beside the template, every case would write its results into
the same shared directory. csauto prepare already warns
source directory missing for copy RESU: RESU on the shipped example.
-
run_argv returns [] and build_run_command is overridden wholesale,
so code_aster bypasses the generic runtime wrapping in execution.py that
code_saturne and the stub use. That may be unavoidable given run_aster's
shape, but it means container mounts, labels and cleanup are reimplemented
rather than shared, and the two implementations can drift.
-
Shell quoting in build_run_command. The docker and singularity commands
are assembled as a bash -c string mixing quoted fragments (bind_links,
solver_cmd) and unquoted ones (container_case, the --label value). A
runs directory containing a space breaks the command.
Suggested order
- The
F mess blocker, plus an integration test that uses an .export with an
existing F mess line, so the shipped example's shape is covered.
- The triage above, recorded in this issue as a checklist.
anomaly_file_names and cleanup_log_names, which today miss
RESU/LOGS/run_solver.log. Cheap, and they immediately improve the Recent
Errors and Clean panels.
read_progress, so the status table shows advancement instead of an empty
column.
- Whatever the triage keeps, in descending user value.
performance_columns
and apply_control are likely the next two.
- The three design questions, each as its own PR.
Definition of done
- Every capability code_aster can meaningfully feed is implemented, and every
one it cannot is documented in this issue as a deliberate omission.
csauto doctor on a code_aster campaign reports the panels and capabilities
that triage decided on.
examples/codeaster-cube runs to completion and is reported DONE, verified
with the docker image rather than by reading the code.
- The integration test covers the shipped example's
.export shape and runs in
CI, or the reason it cannot is written down.
Where code_aster stands today
CodeAsterAdapterimplements the run lifecycle and nothing else. Measured onmainwith the_providesintrospection the capability work added:read_progressfind_residuals_files,parse_live_residualslist_probe_files,list_profile_files,locate_probe_filesfind_performance_log,parse_performance,performance_columnsapply_control,control_actionsbuild_restart_args,read_restart_origingui_argvbuild_slurm_script,mpi_envlocate_case_file,find_run_configdoctor_checksanomaly_file_namescleanup_log_namestemplate_input_namesDerived capabilities, which is what the dashboard now shows:
compare,control,gui,performance,probes,residuals,restartcompareSo a code_aster user gets four panels (Status, Compare, Log Tail, Recent
Errors) and three buttons (Run, Kill, Clean).
Parity is not "implement all eighteen"
Some of these are meaningless for code_aster and should stay unimplemented on
purpose. A linear static analysis has no residual curve to plot, and the
capability mechanism already handles that correctly: an unimplemented method
means the panel simply does not appear.
The first task of this issue is therefore a triage, not code. For each row
above, decide: meaningful for code_aster, meaningless, or meaningful but out of
scope for now. That triage needs someone who knows code_aster; the rest is
mechanical once it is settled.
Blocker:
DIAGNOSTIC JOBis never found in the shipped exampleIndependent of parity, and worth fixing first because it makes the shipped
example misreport every run.
_ensure_mess_entryinjectsF mess RESU/LOGS/run_solver.log R 6into the.exportonly when the file declares noF messline at all(
code_aster.py:76). The shippedexamples/codeaster-cube/TEMPLATE/study.exportdeclares one on line 18:
So the injection is skipped, code_aster writes its message file to
output.mess, anddetect_outcomelooks atRESU/LOGS/run_solver.log(code_aster.py:168), which never exists. It returnsNonefor ever, and the case is finalised by the PID-death fallback asFAILED— even after a perfect run.The integration test does not catch it:
tests/integration/test_code_aster_adapter.pybuilds an
.exportwith noF messline, so it exercises the branch wherethe injection happens. It is also gated behind
CSAUTO_CODE_ASTER_DOCKER_TESTS=1and never runs in CI.
Two candidate fixes, both needing a code_aster opinion: rewrite the existing
F messline rather than leaving it, or havedetect_outcomeread the path the.exportactually declares instead of a hardcoded one. The second is cleanerand also handles hand-written templates.
Three more design questions in the current adapter
Each needs a decision from someone who knows the solver:
shared_dir_names = ("MESH", "RESU")whileresults_dirname = "RESU".The two meanings collide: shared dirs are template-level directories
symlinked into the runs dir and bind-mounted read-write into every
container, while
results_dirnameis per-case. As written, if aRESUdirectory sits beside the template, every case would write its results into
the same shared directory.
csauto preparealready warnssource directory missing for copy RESU: RESUon the shipped example.run_argvreturns[]andbuild_run_commandis overridden wholesale,so code_aster bypasses the generic runtime wrapping in
execution.pythatcode_saturne and the stub use. That may be unavoidable given
run_aster'sshape, but it means container mounts, labels and cleanup are reimplemented
rather than shared, and the two implementations can drift.
Shell quoting in
build_run_command. The docker and singularity commandsare assembled as a
bash -cstring mixing quoted fragments (bind_links,solver_cmd) and unquoted ones (container_case, the--labelvalue). Aruns directory containing a space breaks the command.
Suggested order
F messblocker, plus an integration test that uses an.exportwith anexisting
F messline, so the shipped example's shape is covered.anomaly_file_namesandcleanup_log_names, which today missRESU/LOGS/run_solver.log. Cheap, and they immediately improve the RecentErrors and Clean panels.
read_progress, so the status table shows advancement instead of an emptycolumn.
performance_columnsand
apply_controlare likely the next two.Definition of done
one it cannot is documented in this issue as a deliberate omission.
csauto doctoron a code_aster campaign reports the panels and capabilitiesthat triage decided on.
examples/codeaster-cuberuns to completion and is reportedDONE, verifiedwith the docker image rather than by reading the code.
.exportshape and runs inCI, or the reason it cannot is written down.