Skip to content

Commit

Permalink
GCE now accepts user_endpoint_config via resource specification
Browse files Browse the repository at this point in the history
  • Loading branch information
yadudoc committed Oct 24, 2024
1 parent 4e96c1d commit 3b26095
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions parsl/executors/globus_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def __init__(
user_endpoint_config:
User endpoint configuration values as described
and allowed by endpoint administrators. Must be a JSON-serializable dict
or None.
or None. Refer docs from `globus-compute
<https://globus-compute.readthedocs.io/en/latest/endpoints/endpoints.html#templating-endpoint-configuration>`_
for more info.
label:
a label to name the executor; mainly utilized for
Expand Down Expand Up @@ -119,11 +121,16 @@ def submit(self, func: Callable, resource_specification: Dict[str, Any], *args:
func: Callable
Python function to execute remotely
resource_specification: Dict[str, Any]
Resource specification used to run MPI applications on Endpoints configured
to use globus compute's MPIEngine
Resource specification can be used specify MPI resources required by MPI applications on
Endpoints configured to use globus compute's MPIEngine. GCE also accepts `user_endpoint_config`
to configure endpoints when the endpoint is a `Multi-User Endpoint
<https://globus-compute.readthedocs.io/en/latest/endpoints/endpoints.html#templating-endpoint-configuration>`_
args:
Args to pass to the function
kwargs:
kwargs to pass to the function
Expand All @@ -133,6 +140,8 @@ def submit(self, func: Callable, resource_specification: Dict[str, Any], *args:
Future
"""
self._executor.resource_specification = resource_specification or self.resource_specification
# Pop user_endpoint_config since it is illegal in resource_spec for globus_compute
self._executor.user_endpoint_config = resource_specification.pop('user_endpoint_config', self.user_endpoint_config)
return self._executor.submit(func, *args, **kwargs)

def shutdown(self, wait=True, *, cancel_futures=False):
Expand Down

0 comments on commit 3b26095

Please sign in to comment.