Skip to content

Commit 3b26095

Browse files
committed
GCE now accepts user_endpoint_config via resource specification
1 parent 4e96c1d commit 3b26095

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

parsl/executors/globus_compute.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def __init__(
5555
user_endpoint_config:
5656
User endpoint configuration values as described
5757
and allowed by endpoint administrators. Must be a JSON-serializable dict
58-
or None.
58+
or None. Refer docs from `globus-compute
59+
<https://globus-compute.readthedocs.io/en/latest/endpoints/endpoints.html#templating-endpoint-configuration>`_
60+
for more info.
5961
6062
label:
6163
a label to name the executor; mainly utilized for
@@ -119,11 +121,16 @@ def submit(self, func: Callable, resource_specification: Dict[str, Any], *args:
119121
120122
func: Callable
121123
Python function to execute remotely
124+
122125
resource_specification: Dict[str, Any]
123-
Resource specification used to run MPI applications on Endpoints configured
124-
to use globus compute's MPIEngine
126+
Resource specification can be used specify MPI resources required by MPI applications on
127+
Endpoints configured to use globus compute's MPIEngine. GCE also accepts `user_endpoint_config`
128+
to configure endpoints when the endpoint is a `Multi-User Endpoint
129+
<https://globus-compute.readthedocs.io/en/latest/endpoints/endpoints.html#templating-endpoint-configuration>`_
130+
125131
args:
126132
Args to pass to the function
133+
127134
kwargs:
128135
kwargs to pass to the function
129136
@@ -133,6 +140,8 @@ def submit(self, func: Callable, resource_specification: Dict[str, Any], *args:
133140
Future
134141
"""
135142
self._executor.resource_specification = resource_specification or self.resource_specification
143+
# Pop user_endpoint_config since it is illegal in resource_spec for globus_compute
144+
self._executor.user_endpoint_config = resource_specification.pop('user_endpoint_config', self.user_endpoint_config)
136145
return self._executor.submit(func, *args, **kwargs)
137146

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

0 commit comments

Comments
 (0)