You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This functionality was introduced in #3260 and we should be encouraging
people to use it in order to clean up nicely, after PR #3165 took away
atexit handler cleanup.
Copy file name to clipboardExpand all lines: README.rst
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,6 @@ Parsl lets you chain functions together and will launch each function as inputs
15
15
import parsl
16
16
from parsl import python_app
17
17
18
-
# Start Parsl on a single computer
19
-
parsl.load()
20
18
21
19
# Make functions parallel by decorating them
22
20
@python_app
@@ -27,12 +25,14 @@ Parsl lets you chain functions together and will launch each function as inputs
27
25
defg(x):
28
26
return x *2
29
27
30
-
# These functions now return Futures, and can be chained
31
-
future = f(1)
32
-
assert future.result() ==2
28
+
# Start Parsl on a single computer
29
+
with parsl.load():
30
+
# These functions now return Futures, and can be chained
31
+
future = f(1)
32
+
assert future.result() ==2
33
33
34
-
future = g(f(1))
35
-
assert future.result() ==4
34
+
future = g(f(1))
35
+
assert future.result() ==4
36
36
37
37
38
38
Start with the `configuration quickstart <https://parsl.readthedocs.io/en/stable/quickstart.html#getting-started>`_ to learn how to tell Parsl how to use your computing resource,
0 commit comments