-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix_1525_hanging_ssh
- Loading branch information
Showing
4 changed files
with
259 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...urce/topics/workflows/include/snippets/workchains/run_workchain_submit_parallel_nested.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
from aiida.engine import WorkChain | ||
|
||
|
||
class SomeWorkChain(WorkChain): | ||
|
||
@classmethod | ||
def define(cls, spec): | ||
super().define(spec) | ||
spec.outline( | ||
cls.submit_workchains, | ||
cls.inspect_workchains, | ||
) | ||
|
||
def submit_workchains(self): | ||
for i in range(3): | ||
future = self.submit(SomeWorkChain) | ||
key = f'workchain.sub{i}' | ||
self.to_context(**{key: future}) | ||
|
||
def inspect_workchains(self): | ||
for i in range(3): | ||
assert self.ctx.workchain[f'sub{i}'].is_finished_ok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters