precice / tutorials

Various tutorial cases for the coupling library preCICE with real solvers. These files are meant to be rendered on precice.org, so don't look at the README files here.
https://www.precice.org/
GNU Lesser General Public License v3.0
107 stars 110 forks source link

Restrict preCICE time for selected tests #402

Open MakisH opened 12 months ago

MakisH commented 12 months ago

Some tests are expected to be taking too long to run. For such cases, it would be nice to have an option to overwrite the max-time in the precice-config.xml, both for running the test and for the reference results. Something like this in the tests.yaml:

  openfoam_adapter_pr:
    tutorials:
      - path: flow-over-heated-plate
        case_combination:
          - fluid-openfoam
          - solid-openfoam
        reference_result: ./flow-over-heated-plate/reference-data/fluid-openfoam_solid-openfoam.tar.gz
        max_time: 0.5

which would then perform the following change:

- <max-time value="1" />
+ <max-time value="0.5" />

Motivation: Some tutorials are long either to showcase a nice effect to the user, or because a benchmark defines the length. However, the system tests need to be running in reasonable time frame in order to be useful for developers.

valentin-seitz commented 11 months ago

I see the use case, also considering filesize of the generated artifacts. My proposal would look somewhat similar:

openfoam_adapter_pr:
    tutorials:
      - path: flow-over-heated-plate
        case_combination:
          - fluid-openfoam
          - solid-openfoam
        reference_result: ./flow-over-heated-plate/reference-data/fluid-openfoam_solid-openfoam.tar.gz
        precice_config_override:
          coupling-scheme:
            max-time: value="1"

I think this would provide a bit more semantical support in terms of what max-time means in that context (namely overriding the precice_config.xml). Another benefit would be the added flexibility (Maybe we want to change the max-iterations too?)

MakisH commented 11 months ago

The precice_config_override sounds even better! But probably harder to implement, and difficult to argue why some options are available and others not.

If you know how to do this, then it sounds to me like the way to go. :+1: