Skip to content

Commit f083ad3

Browse files
committed
Adding examples
1 parent 4667bc2 commit f083ad3

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

docs/userguide/configuration/examples.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,30 @@ running on a login node and uses the `parsl.providers.SlurmProvider` to interfac
250250

251251
.. literalinclude:: ../../../parsl/configs/frontera.py
252252

253+
Globus Compute (Multisite)
254+
--------------------------
255+
256+
Globus Compute is a distributed Function as a Service (FaaS) platform that enables secure
257+
execution of functions on heterogeneous remote computers, from laptops to campus clusters, clouds, and supercomputers.
258+
Functions are executed on `Globus Compute Endpoints <https://globus-compute.readthedocs.io/en/latest/endpoints/endpoints.html>`_
259+
that can be `configured <https://globus-compute.readthedocs.io/en/latest/endpoints/endpoint_examples.html>`_
260+
for most clusters/HPC systems. The example configuration below allows task submission
261+
to Globus Compute's hosted tutorial endpoint.
262+
263+
.. literalinclude:: ../../../parsl/configs/gc_tutorial.py
264+
265+
.. note:: The Globus Compute tutorial endpoint runs Python 3.11. We recommend
266+
using the same Python environment to avoid potential serialization errors
267+
caused by environment mismatches. Globus Compute will raise a warning if any
268+
environment version mismatches are detected although minor version differences
269+
may not cause faults (eg, Python3.11.7 vs Python3.11.8)
270+
271+
The configuration below specifies two remote endpoints, one at `SDSC's Expanse Supercomputer <https://www.sdsc.edu/services/hpc/expanse/>`_
272+
and the other at `NERSC's Perlmutter Supercomputer <https://docs.nersc.gov/systems/perlmutter/architecture/>`_.
273+
274+
.. literalinclude:: ../../../parsl/configs/gc_multisite.py
275+
276+
253277

254278
Kubernetes Clusters
255279
-------------------

parsl/configs/gc_multisite.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from globus_compute_sdk import Executor
2+
3+
from parsl.config import Config
4+
from parsl.executors import GlobusComputeExecutor
5+
from parsl.usage_tracking.levels import LEVEL_1
6+
7+
# Please start your own endpoint on perlmutter following instructions below to use this config:
8+
# https://globus-compute.readthedocs.io/en/stable/endpoints/endpoint_examples.html#perlmutter-nersc
9+
perlmutter_endpoint = 'YOUR_PERLMUTTER_ENDPOINT_UUID'
10+
11+
# Please start your own endpoint on expanse following instructions below to use this config:
12+
# https://globus-compute.readthedocs.io/en/stable/endpoints/endpoint_examples.html#expanse-sdsc
13+
expanse_endpoint = 'YOUR_EXPANSE_ENDPOINT_UUID'
14+
15+
config = Config(
16+
executors=[
17+
GlobusComputeExecutor(
18+
executor=Executor(endpoint_id=perlmutter_endpoint),
19+
label="Perlmutter",
20+
),
21+
GlobusComputeExecutor(
22+
executor=Executor(endpoint_id=expanse_endpoint),
23+
label="Expanse",
24+
),
25+
],
26+
usage_tracking=LEVEL_1,
27+
)

parsl/configs/gc_tutorial.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from globus_compute_sdk import Executor
2+
3+
from parsl.config import Config
4+
from parsl.executors import GlobusComputeExecutor
5+
from parsl.usage_tracking.levels import LEVEL_1
6+
7+
# Public tutorial endpoint
8+
tutorial_endpoint = '4b116d3c-1703-4f8f-9f6f-39921e5864df'
9+
10+
config = Config(
11+
executors=[
12+
GlobusComputeExecutor(
13+
executor=Executor(endpoint_id=tutorial_endpoint),
14+
label="Tutorial_Endpoint_py3.11",
15+
)
16+
],
17+
usage_tracking=LEVEL_1,
18+
)

0 commit comments

Comments
 (0)