Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Sim mode at runtime #5721

Merged
merged 52 commits into from
Mar 15, 2024
Merged

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Sep 6, 2023

Recheck simulation mode settings at runtime if a broadcast might have changed them. If it has, update these settings.

A waypoint on the road to skip mode.

Based upon #5712. Drafted until that is in.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • CHANGES.md entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@wxtim wxtim marked this pull request as draft September 6, 2023 15:19
@wxtim wxtim self-assigned this Sep 6, 2023
@wxtim wxtim added this to the cylc-8.3.0 milestone Sep 6, 2023
cylc/flow/simulation.py Outdated Show resolved Hide resolved
cylc/flow/simulation.py Outdated Show resolved Hide resolved
@wxtim wxtim force-pushed the feature.sim_mode_at_runtime branch 3 times, most recently from fdc4cef to 09d4a36 Compare October 26, 2023 11:54
@wxtim wxtim requested a review from hjoliver October 26, 2023 11:56
@wxtim wxtim marked this pull request as ready for review October 26, 2023 11:57
@wxtim wxtim force-pushed the feature.sim_mode_at_runtime branch from 09d4a36 to e8ca0c2 Compare October 26, 2023 12:14
@wxtim wxtim marked this pull request as draft November 13, 2023 14:20
@wxtim wxtim marked this pull request as ready for review November 13, 2023 14:44
cylc/flow/simulation.py Outdated Show resolved Hide resolved
cylc/flow/simulation.py Outdated Show resolved Hide resolved
cylc/flow/simulation.py Outdated Show resolved Hide resolved
cylc/flow/simulation.py Outdated Show resolved Hide resolved
cylc/flow/simulation.py Outdated Show resolved Hide resolved
@wxtim wxtim marked this pull request as draft November 15, 2023 10:04
@wxtim wxtim force-pushed the feature.sim_mode_at_runtime branch 6 times, most recently from d302f2d to 8aab09b Compare November 17, 2023 15:31
@wxtim wxtim force-pushed the feature.sim_mode_at_runtime branch from 1491f42 to bcce93d Compare November 20, 2023 10:52
@MetRonnie
Copy link
Member

  • Broadcasting execution retry delays does not cause a change when running in simulation mode
  • Also, in the Edit Runtime form, submission retry delays shows as 1 for some reason even though it is not set in flow.cylc

@wxtim
Copy link
Member Author

wxtim commented Mar 8, 2024

  • Broadcasting execution retry delays does not cause a change when running in simulation mode

I cannot replicate this on the command line. Given the context of your comment I tried it from the gui and still couldn't replicate.

In fact some of the tests I've written should fail if that were the case.

Can you come up with a concrete example?

Replicated the submission retry delays thing. Pretty clueless about that though.


rtc['simulation']['simulated run length'] = sleep_sec
rtc['submission retry delays'] = [1]
Copy link
Member Author

@wxtim wxtim Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MetRonnie Here is the cause of the value in the GUI's submission retry delays box. It also happens on master.

I think that it's probably as it's meant to be: In simulation mode, simulate retries after 1 second whatever the retry delay in live mode. However, I can't see that documented anywhere.

@wxtim wxtim requested a review from MetRonnie March 8, 2024 10:04
@MetRonnie
Copy link
Member

MetRonnie commented Mar 8, 2024

  • Broadcasting execution retry delays does not cause a change when running in simulation mode

I cannot replicate this on the command line. Given the context of your comment I tried it from the gui and still couldn't replicate.

In fact some of the tests I've written should fail if that were the case.

Can you come up with a concrete example?

[scheduler]
    allow implicit tasks = True
[scheduling]
    initial cycle point = 2024
    runahead limit = P0
    [[graph]]
        P1M = foo => bar

[runtime]
    [[foo]]
        execution retry delays = 100*PT10S
        script = false
        [[[simulation]]]
            fail cycle points = all
            default run length = PT10S
            fail try 1 only = False
cylc broadcast sim-mode -n foo -s 'execution retry delays=20*PT1S'

But it still keeps saying

WARNING - [20240101T0000Z/foo waiting job:06 flows:1] retrying in PT10S

(The Edit Runtime form shows it correctly but it is not having an effect)

to allow non simulation settings to be modified and
to avoid changing the itask.tdef.rtconfig.
@wxtim
Copy link
Member Author

wxtim commented Mar 11, 2024

@MetRonnie - This is a good spot. I think that the broadcasts probably need to be applied in the TaskJobManager._simulation_submit_task_jobs method to ensure that we are broadcasting all task settings, not just those in [simulation]. I think you might also have found problems clearing broadcasts with things as they were, since I was changing the itask.tdef.rtconfig not a copy of it.

tests/integration/test_simulation.py Show resolved Hide resolved
cylc/flow/simulation.py Outdated Show resolved Hide resolved
cylc/flow/simulation.py Outdated Show resolved Hide resolved
@wxtim wxtim requested a review from MetRonnie March 11, 2024 15:00
cylc/flow/simulation.py Outdated Show resolved Hide resolved
changes.d/5721.feat.md Outdated Show resolved Hide resolved
Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflict resolution looks good

wxtim and others added 2 commits March 14, 2024 15:22
Co-authored-by: Hilary James Oliver <[email protected]>
Co-authored-by: Hilary James Oliver <[email protected]>
@wxtim
Copy link
Member Author

wxtim commented Mar 14, 2024

Conflict resolution looks good

Thank you @hjoliver

@MetRonnie
Copy link
Member

Genuine test failure presumably: tests/f/modes/05-sim-trigger.t

@hjoliver
Copy link
Member

hjoliver commented Mar 14, 2024

I'm looking at the broken test -it's just a log-grep issue after cylc set changes to log messages... I've pushed a fix to the PR branch.

@hjoliver hjoliver force-pushed the feature.sim_mode_at_runtime branch from 1e5e806 to 9186ad1 Compare March 15, 2024 00:11
@hjoliver hjoliver merged commit a9becc2 into cylc:master Mar 15, 2024
27 checks passed
@wxtim wxtim deleted the feature.sim_mode_at_runtime branch March 15, 2024 08:12
@wxtim wxtim mentioned this pull request Mar 19, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants