-
Notifications
You must be signed in to change notification settings - Fork 94
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
Cylc Install, nested source directory #4453
Comments
That's actually a convenient source tree structure for sub-workflows. If workflow1 has a task in it that runs workflow2, it makes sense to install the workflow2 definition into the workflow1 run directory, just like any other source files required by workflow1. Then at runtime,the sub-workflow-runner task would install and run a new copy of workflow2 each time (each cycle point), from the "source" version installed into the workflow1 run directory. But we don't currently allow that:
Would there be any dire consequences to dropping this restriction? ( |
Note a sub-workflow should not be installed from |
(My comments above might be slightly off-piste, if you're only worried about |
Off-piste but
Kinda but it won't work because Cylc doesn't allow nested run dirs, the sub-flow structure should be:
|
Yes, but what we need (for sub-workflows) is a nested source dir tree in the main workflow run directory. For a sub-workflow that (e.g.) gets spawned in every main workflow cycle point, we need to create a new sub-workflow run directory for each sub-workflow instance. And the source for those instances should be stored (like other main workflow source files) in the main workflow run directory.
That's not ideal. The sub-workflow source needs to get installed to the main-workflow run dir when we do |
FYI: I was outlining the "run dir" in my previous post. A structure like this would make sense: # ~/cylc-run/
my-workflow/
controller/
flow.cylc
sub-suite/ # this is an installed src copy - it can't/shouldn't be run directly and will not appear in scan results
flow.cylc
sub-suite/
2000/
flow.cylc
2001/
flow.cylc The resulting workflow IDs work nicely with the UID: $ cylc stop 'my-workflow/*'
$ cylc stop 'my-workflow/controller' --kill
$ cylc stop my-workflow/sub-suite/*'
$ cylc stop my-workflow/sub-suite/2000' The sub-suites would be launched like so:
Problems:
Will come back to this post 8.0.0, thoughts for now:
|
Well, I was only talking about what's currently possible. Sub-suites can still be useful now, even though we expect to have better ways of managing the same problems in the future. (Spawn-on-demand has made the "multi-dimensional cycling" case a lot more efficient than it was though, with a parameterized sub-cycle, so less of a need for sub-suites there I guess). |
We need workable sub-suites for 8.0, because some users rely on them at Cylc 7. I'll post a simple tweak to allow that. For the original topic of this Issue:
|
@datamel and @oliver-sanders - if you agree, we should close this issue and post another one for planning better ways of handling sub-workflows (which may include 8.x improvements on the current model as well the more distant Cylc 9 plans). |
My bad (or good 😁 ) - I quite like sub-suites as an alternative to parameterized sub-cycling. Much more efficient, under Cylc 7 spawn-on-submit scheduling. I think someone on the forum may have gone that way recently too. So long as the disadvantages are explained (namely, housekeeping, and monitoring and management of multiple workflows). |
Currently, you can perform cylc install workflow1 on a source directory with the following structure...
Cylc install does check for nested run directories (by looking for
.service
directory) but this current scenario will install without error.Cylc scan, will not currently pick up
workflow2
(workflow1
does appear on scan).Some thought needed into whether we wish to check and forbid a scenario like this (although may be undesirable for performance to nested scan), or perhaps clear documentation on best practice for sub-workflows and/or a tutorial would be an acceptable solution.
The text was updated successfully, but these errors were encountered: