File: index.rst

package info (click to toggle)
python-parsl 2026.01.26%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,144 kB
  • sloc: python: 24,400; makefile: 352; sh: 252; ansic: 45
file content (37 lines) | stat: -rw-r--r-- 912 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Running Workflows
=================

Parsl workflows are a Python "main" program that defines Apps,
how the Apps are invoked,
and how results are passed between different Apps.

The core concept of workflows is that Parsl Apps produce **Futures**
with all features from those in Python's :mod:`concurrent.futures` module and more.

The Parsl programs typically contain a ``parsl.load`` statement to start
the services which manage scheduling computations.

.. code-block:: python

    from parsl.configs.htex_local import config  # See the "Configuration" documentation
    from parsl import python_app  # See the "Apps" documentation
    import parsl

    @python_app
    def f(x):
        return x + 1

    with parsl.load(config):
        future = f(1)
        print(f'1 + 1 = {future.result()}')


.. toctree::
   :maxdepth: 2

   futures
   workflow
   exceptions
   lifted_ops
   checkpoints
   concurrent