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

Execution and dispatching #55

Closed
11 tasks
eirrgang opened this issue Jul 21, 2020 · 1 comment
Closed
11 tasks

Execution and dispatching #55

eirrgang opened this issue Jul 21, 2020 · 1 comment
Assignees

Comments

@eirrgang
Copy link
Contributor

eirrgang commented Jul 21, 2020

This issue covers the infrastructure and protocol for updating the workflow during an scoped period of execution. Abstractly, a dispatching framework allows work to be executed locally or remotely in order to advance the state of the workflow in a given program scope.

Resolution of this issue may look like the NodeBuilder protocol described for gmxapi.
Some diagrams and discussion can be retrieved from past work to further document this issue.

Current works in progress can use this issue for tracking:

  • Track current context and dispatch hierarchy
  • Define dispatch protocol. e.g.
    1. make resources,
    2. apply resources to get callable / awaitable,
    3. finalize task,
    4. get and convey return object to parents or subscribers

Work on this issue has included introduction of scalems.execution and scalems.dispatching modules. Much of the execution module code for scalems.local and scalems.radical has been updated to just compose specific functions into core roles. Some details still need some clean up w.r.t. backend module configuration and specialized runtime implementation.

scalems.radical.runtime

  • Combine Runtime and Configuration.
  • Let Runtime exist without a Session.
  • Introduce proxy object RuntimeState. Runtime resources are not accessible
    directly, but must be accessed through a RuntimeState, acquired through the
    context manager protocol or open() and close() protocol. RuntimeState
    inherits the Runtime interface for nesting.
  • Runtime and RuntimeState must behave appropriately when errored or terminated
    unexpectedly in the context of a nested RuntimeState.
  • Use Runtime instances in the pytest fixtures for more normative interaction.
  • Allow RuntimeState to be provided to RuntimeManager or the WorkflowManager.dispatch() call that launches it.
  • RuntimeState exposes weakref.WeakProxy handles to rp components to minimize
    chances of unexpected extension of reference lifetimes, and the RuntimeState
    object itself raises ScopeError if accessed after close() (such as by leaving the
    context manager).
  • Add some locking for state changes until we are clearer about multithread use
    cases and safe state maintenance.
  • Express and check for workflow software dependencies
  • Uniquely name (and track) rp.Master task(s).
  • Capture and process output from rp.Master task (whether failed or successful).

See also

Relates to #15

@eirrgang eirrgang self-assigned this Jul 21, 2020
eirrgang added a commit that referenced this issue Aug 8, 2020
* Track current context and dispatch hierarchy
* Define dispatch protocol. e.g.
  1. make resources,
  2. apply resources to get callable / awaitable,
  3. finalize task, get and convey return object

Refs #55
eirrgang added a commit to eirrgang/scale-ms that referenced this issue Sep 1, 2020
@eirrgang eirrgang mentioned this issue Sep 11, 2020
42 tasks
eirrgang added a commit that referenced this issue Oct 13, 2020
Refine the scoping of workflow management.

Establish an architecture that separates
* a relatively static high-level WorkflowManager
* an (asynchronous) Executor
* a Dispatcher to mediate between the two.

Implement new scheme for the local execution path.

Continue to refine the internal representation
of "Tasks" or "workflow items".

Refs #55
eirrgang added a commit that referenced this issue Oct 13, 2020
Note: there is still almost no functionality on this
execution path.

Refs #55
@eirrgang eirrgang added this to the RP integrated prototype milestone Apr 23, 2021
eirrgang added a commit that referenced this issue Aug 27, 2021
To the extent that the removed class may become necessary,
it will be provided in a different submodule under work
associated with issue #55.
eirrgang added a commit that referenced this issue Jun 26, 2023
Use a check_hpc_host task to validate a configuration before launching
the runtime.

Refs #150, #55
@eirrgang
Copy link
Contributor Author

This issue is superseded in various facets by more recent issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Status: 📋 Backlog
Status: Done
Development

No branches or pull requests

1 participant