Skip to content

Logs and Signal handling

Tobias Meisel requested to merge TobiasMeisel/ogs:logs into master
  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
  3. Any new feature or behaviour change was documented?
  • This MR is related to an MR in OGSTools
  • It changes some log outputs to
    • allow real-time monitoring of the progress of OGS with the OGSTools Logparser
  • Therefore it needs:
    • additional log outputs for the current context that is sometimes missing, are outputted too late (e.g. the number of current non-linear solver iteration was logged when the iteration finished, NOW it is logged in the beginning and in the end
      • context: e.g. time step, non-linear solver iteration, process, ...
    • Minimal structure
      • all context is opened ("started") and closed
      • special case (e.g. time step 0) is normalized (behaves like any other time step)
    • Producer consumer pattern
      • Finalization token (that signal to the producer / consumer that the simulation has ended (either successfully or with error)
      • Signal - handling
        • Ctrl+C (Interrupt)
        • Ctrl+\ (Quit)
        • pkill -SIGTERM <process_id> (Terminate)
      • It will not (and can never) work for SIGKILL
  • Introduces a new command line option to ogs: log-parallel
    • e.g. ogs my.prj --log-parallel
    • with MPI, without new flag: only rank 0 prints to log
    • with MPI, with new flag: legacy behaviour: all ranks print into same log file
    • without MPI: legacy behaviour /flag has no effect
Edited by Tobias Meisel

Merge request reports

Loading