From 3b26095b789b587fa30b5ddced3f68bf64226f2a Mon Sep 17 00:00:00 2001 From: Yadu Babuji Date: Thu, 24 Oct 2024 11:48:19 -0500 Subject: [PATCH] GCE now accepts user_endpoint_config via resource specification --- parsl/executors/globus_compute.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/parsl/executors/globus_compute.py b/parsl/executors/globus_compute.py index 1003fe979a..4c98406f49 100644 --- a/parsl/executors/globus_compute.py +++ b/parsl/executors/globus_compute.py @@ -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 + `_ + for more info. label: a label to name the executor; mainly utilized for @@ -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 + `_ + args: Args to pass to the function + kwargs: kwargs to pass to the function @@ -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):