Parsl extends parallelism in Python beyond a single computer.
You can use Parsl just like Python's parallel executors but across multiple cores and nodes. However, the real power of Parsl is in expressing multi-step workflows of functions. Parsl lets you chain functions together and will launch each function as inputs and computing resources are available.
import parsl
from parsl import python_app
# Make functions parallel by decorating them
@python_app
def f(x):
return x + 1
@python_app
def g(x, y):
return x + y
# Start Parsl on a single computer
with parsl.load():
# These functions now return Futures
future = f(1)
assert future.result() == 2
# Functions run concurrently, can be chained
f_a, f_b = f(2), f(3)
future = g(f_a, f_b)
assert future.result() == 7
Start with the configuration quickstart to learn how to tell Parsl how to use your computing resource, then explore the parallel computing patterns to determine how to use parallelism best in your application.
Install Parsl using pip:
$ pip3 install parsl
To run the Parsl tutorial notebooks you will need to install Jupyter:
$ pip3 install jupyter
Detailed information about setting up Jupyter with Python is available here
Note: Parsl uses an opt-in model to collect usage statistics for reporting and improvement purposes. To understand what stats are collected and enable collection please refer to the usage tracking guide
The complete parsl documentation is hosted here.
The Parsl tutorial is hosted on live Jupyter notebooks here
Download Parsl:
$ git clone https://github.com/Parsl/parsl
Build and Test:
$ cd parsl # navigate to the root directory of the project $ make # show all available makefile targets $ make virtualenv # create a virtual environment $ source .venv/bin/activate # activate the virtual environment $ make deps # install python dependencies from test-requirements.txt $ make test # make (all) tests. Run "make config_local_test" for a faster, smaller test set. $ make clean # remove virtualenv and all test and build artifacts
Install:
$ cd parsl # only if you didn't enter the top-level directory in step 2 above $ python3 setup.py install
Use Parsl!
Parsl is supported in Python 3.9+. Requirements can be found here. Requirements for running tests can be found here.
Parsl seeks to foster an open and welcoming environment - Please see the Parsl Code of Conduct for more details.
We welcome contributions from the community. Please see our contributing guide.