-
Notifications
You must be signed in to change notification settings - Fork 93
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
scheduler, task_pool, task_proxy refactor #2157
scheduler, task_pool, task_proxy refactor #2157
Conversation
04f7a49
to
6df5d60
Compare
6df5d60
to
ff92dd1
Compare
b62e471
to
38559cb
Compare
e573c0b
to
1e06098
Compare
Although I have got some more ideas, I think I have done enough here already. I am running the profile battery at the moment. The 1st set of results based on the complex suite is showing promises.
(where HEAD is HEAD of this branch.) |
Some other ideas that should be in new issues. (I'd quite like to have a rethink of our usage of the multi-processing pool. Currently, we start a pool of N child processes before the suite starts, which are kept in memory. This should not be necessary if we can just manage a simple pool of sub-processes - given that all our usages are to run external commands. Not keeping child processes in memory should, in theory, reduces the memory footprint during quiet times while a suite is waiting for events.) (I'd also like to have a rethink of the poll timer logic. Instead of a poll timer per task, it is probably more efficient to have a poll timer per (host, batch system) combo. If we are polling a task on a given (host, batch system), we might as well poll the other tasks on the same combo as well. On job submission, a task will subscribe its job to the relevant poll timer, which will then manage the poll timing to suit all the subscribed jobs. E.g. if several jobs need to be polled within a small interval of time, they will actually be done together once.) |
All numbers going the right direction for this branch. |
db0b2c6
to
7259704
Compare
(This branch will conflict with #2220, so I'll suggest that we don't merge this until after #2220. I am happy to deal with the conflicts.) @hjoliver @oliver-sanders please have an initial look of this change. |
Task event handlers no longer hang onto their originating task proxy objects.
Run time database management moved from scheduler and task_pool to own module.
Decouple logging and database update between task_proxy and task_state.
Move task message processing logic from `cylc.task_proxy` to `cylc.task_events_mgr`.
Move task poll timer logic from `cylc.task_proxy` to `cylc.task_job_mgr`.
Task events setup logic moved from `cylc.task_proxy` to `cylc.task_events_mgr`.
Remove database logic from `cylc.task_proxy`.
Move task logging logic to `cylc.suite_logging`.
Unify task state reset logic. Refactor task output logic, and allow resetting completion status of outputs by trigger string or message string.
Remove broadcast server dependency from task_proxy. Simplify (re)try timers logic.
Improve docs.
`cylc submit` can now submit multiple tasks and families.
Move logic after merging cylc#2213.
Test `cylc reset --output=OUTPUT ...`. Test `cylc submit FAM.CYCLE` - multi-level family.
Fixes following merge with cylc#2220.
Minor tweaks to cylc.scheduler related to review comments.
Improve execution time limit timer logic.
Fix rebase/merge issue.
More comments in new modules.
Remove redundant line.
Fixes following merge with cylc#2276.
b6ed774
to
362901e
Compare
Fix test broken by cylc#2271.
4b83524
to
f4dd554
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined to approve and not spend several more days staring at the code
Agreed.
This all looks in order to me.
The main drives of this change are:
Some headlines:
cylc.task_proxy
and related objects.cylc.scheduler
,cylc.task_pool
andcylc.task_proxy
.get_task_proxy
.SuiteConfig.get_taskdef
and constructor ofTaskProxy
.cylc.task_job_mgr
: job management logic fromcylc.task_pool
andcylc.task_proxy
.cylc.suite_events
: suite events logic fromcylc.scheduler
.cylc.task_events_mgr
:cylc.scheulder
andcylc.task_proxy
.cylc.suite_db_mgr
:cylc.scheduler
,cylc.task_pool
andcylc.task_proxy
.reset_state
andset_state
methods. Apart fromhold
andrelease
, all state change will now callreset_state
.cylc.task_outputs
to allow manual reset of individual outputs to complete/incomplete. (Outputs can be referenced by either the trigger names or by the message strings.)cylc submit
can now submit multiple families and tasks in a single command.[HJO: Close #2228.]