Skip to content

Commit

Permalink
Adding examples
Browse files Browse the repository at this point in the history
  • Loading branch information
yadudoc committed Jan 16, 2025
1 parent 4667bc2 commit f083ad3
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/userguide/configuration/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,30 @@ running on a login node and uses the `parsl.providers.SlurmProvider` to interfac

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

Globus Compute (Multisite)
--------------------------

Globus Compute is a distributed Function as a Service (FaaS) platform that enables secure
execution of functions on heterogeneous remote computers, from laptops to campus clusters, clouds, and supercomputers.
Functions are executed on `Globus Compute Endpoints <https://globus-compute.readthedocs.io/en/latest/endpoints/endpoints.html>`_
that can be `configured <https://globus-compute.readthedocs.io/en/latest/endpoints/endpoint_examples.html>`_
for most clusters/HPC systems. The example configuration below allows task submission
to Globus Compute's hosted tutorial endpoint.

.. literalinclude:: ../../../parsl/configs/gc_tutorial.py

.. note:: The Globus Compute tutorial endpoint runs Python 3.11. We recommend
using the same Python environment to avoid potential serialization errors
caused by environment mismatches. Globus Compute will raise a warning if any
environment version mismatches are detected although minor version differences
may not cause faults (eg, Python3.11.7 vs Python3.11.8)

The configuration below specifies two remote endpoints, one at `SDSC's Expanse Supercomputer <https://www.sdsc.edu/services/hpc/expanse/>`_
and the other at `NERSC's Perlmutter Supercomputer <https://docs.nersc.gov/systems/perlmutter/architecture/>`_.

.. literalinclude:: ../../../parsl/configs/gc_multisite.py



Kubernetes Clusters
-------------------
Expand Down
27 changes: 27 additions & 0 deletions parsl/configs/gc_multisite.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from globus_compute_sdk import Executor

from parsl.config import Config
from parsl.executors import GlobusComputeExecutor
from parsl.usage_tracking.levels import LEVEL_1

# Please start your own endpoint on perlmutter following instructions below to use this config:
# https://globus-compute.readthedocs.io/en/stable/endpoints/endpoint_examples.html#perlmutter-nersc
perlmutter_endpoint = 'YOUR_PERLMUTTER_ENDPOINT_UUID'

# Please start your own endpoint on expanse following instructions below to use this config:
# https://globus-compute.readthedocs.io/en/stable/endpoints/endpoint_examples.html#expanse-sdsc
expanse_endpoint = 'YOUR_EXPANSE_ENDPOINT_UUID'

config = Config(
executors=[
GlobusComputeExecutor(
executor=Executor(endpoint_id=perlmutter_endpoint),
label="Perlmutter",
),
GlobusComputeExecutor(
executor=Executor(endpoint_id=expanse_endpoint),
label="Expanse",
),
],
usage_tracking=LEVEL_1,
)
18 changes: 18 additions & 0 deletions parsl/configs/gc_tutorial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from globus_compute_sdk import Executor

from parsl.config import Config
from parsl.executors import GlobusComputeExecutor
from parsl.usage_tracking.levels import LEVEL_1

# Public tutorial endpoint
tutorial_endpoint = '4b116d3c-1703-4f8f-9f6f-39921e5864df'

config = Config(
executors=[
GlobusComputeExecutor(
executor=Executor(endpoint_id=tutorial_endpoint),
label="Tutorial_Endpoint_py3.11",
)
],
usage_tracking=LEVEL_1,
)

0 comments on commit f083ad3

Please sign in to comment.