parsl 2024.7.15__py3-none-any.whl → 2024.7.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- parsl/executors/high_throughput/process_worker_pool.py +10 -9
- parsl/executors/status_handling.py +29 -21
- parsl/version.py +1 -1
- {parsl-2024.7.15.data → parsl-2024.7.22.data}/scripts/process_worker_pool.py +10 -9
- {parsl-2024.7.15.dist-info → parsl-2024.7.22.dist-info}/METADATA +2 -2
- {parsl-2024.7.15.dist-info → parsl-2024.7.22.dist-info}/RECORD +13 -13
- {parsl-2024.7.15.data → parsl-2024.7.22.data}/scripts/exec_parsl_function.py +0 -0
- {parsl-2024.7.15.data → parsl-2024.7.22.data}/scripts/interchange.py +0 -0
- {parsl-2024.7.15.data → parsl-2024.7.22.data}/scripts/parsl_coprocess.py +0 -0
- {parsl-2024.7.15.dist-info → parsl-2024.7.22.dist-info}/LICENSE +0 -0
- {parsl-2024.7.15.dist-info → parsl-2024.7.22.dist-info}/WHEEL +0 -0
- {parsl-2024.7.15.dist-info → parsl-2024.7.22.dist-info}/entry_points.txt +0 -0
- {parsl-2024.7.15.dist-info → parsl-2024.7.22.dist-info}/top_level.txt +0 -0
@@ -732,17 +732,18 @@ def worker(
|
|
732
732
|
os.sched_setaffinity(0, my_cores) # type: ignore[attr-defined, unused-ignore]
|
733
733
|
logger.info("Set worker CPU affinity to {}".format(my_cores))
|
734
734
|
|
735
|
-
# If CUDA devices, find total number of devices to allow for MPS
|
736
|
-
# See: https://developer.nvidia.com/system-management-interface
|
737
|
-
nvidia_smi_cmd = "nvidia-smi -L > /dev/null && nvidia-smi -L | wc -l"
|
738
|
-
nvidia_smi_ret = subprocess.run(nvidia_smi_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
739
|
-
if nvidia_smi_ret.returncode == 0:
|
740
|
-
num_cuda_devices = int(nvidia_smi_ret.stdout.split()[0])
|
741
|
-
else:
|
742
|
-
num_cuda_devices = None
|
743
|
-
|
744
735
|
# If desired, pin to accelerator
|
745
736
|
if accelerator is not None:
|
737
|
+
|
738
|
+
# If CUDA devices, find total number of devices to allow for MPS
|
739
|
+
# See: https://developer.nvidia.com/system-management-interface
|
740
|
+
nvidia_smi_cmd = "nvidia-smi -L > /dev/null && nvidia-smi -L | wc -l"
|
741
|
+
nvidia_smi_ret = subprocess.run(nvidia_smi_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
742
|
+
if nvidia_smi_ret.returncode == 0:
|
743
|
+
num_cuda_devices = int(nvidia_smi_ret.stdout.split()[0])
|
744
|
+
else:
|
745
|
+
num_cuda_devices = None
|
746
|
+
|
746
747
|
try:
|
747
748
|
if num_cuda_devices is not None:
|
748
749
|
procs_per_cuda_device = pool_size // num_cuda_devices
|
@@ -59,20 +59,28 @@ class BlockProviderExecutor(ParslExecutor):
|
|
59
59
|
else:
|
60
60
|
self.block_error_handler = block_error_handler
|
61
61
|
|
62
|
-
# errors can happen during the submit call to the provider; this is used
|
63
|
-
# to keep track of such errors so that they can be handled in one place
|
64
|
-
# together with errors reported by status()
|
65
|
-
self._simulated_status: Dict[str, JobStatus] = {}
|
66
62
|
self._executor_bad_state = threading.Event()
|
67
63
|
self._executor_exception: Optional[Exception] = None
|
68
64
|
|
69
65
|
self._block_id_counter = AtomicIDCounter()
|
70
66
|
|
71
67
|
self._tasks = {} # type: Dict[object, Future]
|
68
|
+
|
69
|
+
self._last_poll_time = 0.0
|
70
|
+
|
71
|
+
# these four structures track, in loosely coordinated fashion, the
|
72
|
+
# existence of blocks and jobs and how to map between their
|
73
|
+
# identifiers.
|
72
74
|
self.blocks_to_job_id = {} # type: Dict[str, str]
|
73
75
|
self.job_ids_to_block = {} # type: Dict[str, str]
|
74
76
|
|
75
|
-
|
77
|
+
# errors can happen during the submit call to the provider; this is used
|
78
|
+
# to keep track of such errors so that they can be handled in one place
|
79
|
+
# together with errors reported by status()
|
80
|
+
self._simulated_status: Dict[str, JobStatus] = {}
|
81
|
+
|
82
|
+
# this stores an approximation (sometimes delayed) of the latest status
|
83
|
+
# of pending, active and recently terminated blocks
|
76
84
|
self._status = {} # type: Dict[str, JobStatus]
|
77
85
|
|
78
86
|
def _make_status_dict(self, block_ids: List[str], status_list: List[JobStatus]) -> Dict[str, JobStatus]:
|
@@ -113,20 +121,6 @@ class BlockProviderExecutor(ParslExecutor):
|
|
113
121
|
raise NotImplementedError("Classes inheriting from BlockProviderExecutor must implement "
|
114
122
|
"outstanding()")
|
115
123
|
|
116
|
-
def status(self) -> Dict[str, JobStatus]:
|
117
|
-
"""Return the status of all jobs/blocks currently known to this executor.
|
118
|
-
|
119
|
-
:return: a dictionary mapping block ids (in string) to job status
|
120
|
-
"""
|
121
|
-
if self._provider:
|
122
|
-
block_ids, job_ids = self._get_block_and_job_ids()
|
123
|
-
status = self._make_status_dict(block_ids, self._provider.status(job_ids))
|
124
|
-
else:
|
125
|
-
status = {}
|
126
|
-
status.update(self._simulated_status)
|
127
|
-
|
128
|
-
return status
|
129
|
-
|
130
124
|
def set_bad_state_and_fail_all(self, exception: Exception):
|
131
125
|
"""Allows external error handlers to mark this executor as irrecoverably bad and cause
|
132
126
|
all tasks submitted to it now and in the future to fail. The executor is responsible
|
@@ -180,7 +174,7 @@ class BlockProviderExecutor(ParslExecutor):
|
|
180
174
|
# Filters first iterable by bool values in second
|
181
175
|
return list(compress(to_kill, killed))
|
182
176
|
|
183
|
-
def
|
177
|
+
def _scale_out(self, blocks: int = 1) -> List[str]:
|
184
178
|
"""Scales out the number of blocks by "blocks"
|
185
179
|
"""
|
186
180
|
if not self.provider:
|
@@ -276,6 +270,20 @@ class BlockProviderExecutor(ParslExecutor):
|
|
276
270
|
if delta_status:
|
277
271
|
self.send_monitoring_info(delta_status)
|
278
272
|
|
273
|
+
def status(self) -> Dict[str, JobStatus]:
|
274
|
+
"""Return the status of all jobs/blocks currently known to this executor.
|
275
|
+
|
276
|
+
:return: a dictionary mapping block ids (in string) to job status
|
277
|
+
"""
|
278
|
+
if self._provider:
|
279
|
+
block_ids, job_ids = self._get_block_and_job_ids()
|
280
|
+
status = self._make_status_dict(block_ids, self._provider.status(job_ids))
|
281
|
+
else:
|
282
|
+
status = {}
|
283
|
+
status.update(self._simulated_status)
|
284
|
+
|
285
|
+
return status
|
286
|
+
|
279
287
|
@property
|
280
288
|
def status_facade(self) -> Dict[str, JobStatus]:
|
281
289
|
"""Return the status of all jobs/blocks of the executor of this poller.
|
@@ -304,7 +312,7 @@ class BlockProviderExecutor(ParslExecutor):
|
|
304
312
|
return block_ids
|
305
313
|
|
306
314
|
def scale_out_facade(self, n: int) -> List[str]:
|
307
|
-
block_ids = self.
|
315
|
+
block_ids = self._scale_out(n)
|
308
316
|
if block_ids is not None:
|
309
317
|
new_status = {}
|
310
318
|
for block_id in block_ids:
|
parsl/version.py
CHANGED
@@ -732,17 +732,18 @@ def worker(
|
|
732
732
|
os.sched_setaffinity(0, my_cores) # type: ignore[attr-defined, unused-ignore]
|
733
733
|
logger.info("Set worker CPU affinity to {}".format(my_cores))
|
734
734
|
|
735
|
-
# If CUDA devices, find total number of devices to allow for MPS
|
736
|
-
# See: https://developer.nvidia.com/system-management-interface
|
737
|
-
nvidia_smi_cmd = "nvidia-smi -L > /dev/null && nvidia-smi -L | wc -l"
|
738
|
-
nvidia_smi_ret = subprocess.run(nvidia_smi_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
739
|
-
if nvidia_smi_ret.returncode == 0:
|
740
|
-
num_cuda_devices = int(nvidia_smi_ret.stdout.split()[0])
|
741
|
-
else:
|
742
|
-
num_cuda_devices = None
|
743
|
-
|
744
735
|
# If desired, pin to accelerator
|
745
736
|
if accelerator is not None:
|
737
|
+
|
738
|
+
# If CUDA devices, find total number of devices to allow for MPS
|
739
|
+
# See: https://developer.nvidia.com/system-management-interface
|
740
|
+
nvidia_smi_cmd = "nvidia-smi -L > /dev/null && nvidia-smi -L | wc -l"
|
741
|
+
nvidia_smi_ret = subprocess.run(nvidia_smi_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
742
|
+
if nvidia_smi_ret.returncode == 0:
|
743
|
+
num_cuda_devices = int(nvidia_smi_ret.stdout.split()[0])
|
744
|
+
else:
|
745
|
+
num_cuda_devices = None
|
746
|
+
|
746
747
|
try:
|
747
748
|
if num_cuda_devices is not None:
|
748
749
|
procs_per_cuda_device = pool_size // num_cuda_devices
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: parsl
|
3
|
-
Version: 2024.7.
|
3
|
+
Version: 2024.7.22
|
4
4
|
Summary: Simple data dependent workflows in Python
|
5
5
|
Home-page: https://github.com/Parsl/parsl
|
6
|
-
Download-URL: https://github.com/Parsl/parsl/archive/2024.07.
|
6
|
+
Download-URL: https://github.com/Parsl/parsl/archive/2024.07.22.tar.gz
|
7
7
|
Author: The Parsl Team
|
8
8
|
Author-email: parsl@googlegroups.com
|
9
9
|
License: Apache 2.0
|
@@ -8,7 +8,7 @@ parsl/multiprocessing.py,sha256=MyaEcEq-Qf860u7V98u-PZrPNdtzOZL_NW6EhIJnmfQ,1937
|
|
8
8
|
parsl/process_loggers.py,sha256=uQ7Gd0W72Jz7rrcYlOMfLsAEhkRltxXJL2MgdduJjEw,1136
|
9
9
|
parsl/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
parsl/utils.py,sha256=91FjQiTUY383ueAjkBAgE21My9nba6SP2a2SrbB1r1Q,11250
|
11
|
-
parsl/version.py,sha256=
|
11
|
+
parsl/version.py,sha256=MTzhueu1_EeHa7_SmFzbomAqeyRCXKJ4cimHiEDRYbs,131
|
12
12
|
parsl/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
parsl/app/app.py,sha256=0gbM4AH2OtFOLsv07I5nglpElcwMSOi-FzdZZfrk7So,8532
|
14
14
|
parsl/app/bash.py,sha256=jm2AvePlCT9DZR7H_4ANDWxatp5dN_22FUlT_gWhZ-g,5528
|
@@ -72,7 +72,7 @@ parsl/dataflow/taskrecord.py,sha256=-FuujdZQ1y5GSc-PJ91QKGT-Kp0lrg70MFDoxpbWI1Q,
|
|
72
72
|
parsl/executors/__init__.py,sha256=Cg8e-F2NUaBD8A9crDAXKCSdoBEwQVIdgm4FlXd-wvk,476
|
73
73
|
parsl/executors/base.py,sha256=10xMzqVa2vV7muet08Tm1iHBZ4m2jCESPPiRnbwzGUk,5120
|
74
74
|
parsl/executors/errors.py,sha256=xVswxgi7vmJcUMCeYDAPK8sQT2kHFFROVoOr0dnmcWE,2098
|
75
|
-
parsl/executors/status_handling.py,sha256=
|
75
|
+
parsl/executors/status_handling.py,sha256=Hwcp8eCJSc_vVXycZX2vPTfikAP1SigtQJEiYbarjLw,13784
|
76
76
|
parsl/executors/threads.py,sha256=hJt1LzxphqX4fe_9R9Cf1MU0lepWTU_eJe8O665B0Xo,3352
|
77
77
|
parsl/executors/flux/__init__.py,sha256=P9grTTeRPXfqXurFhlSS7XhmE6tTbnCnyQ1f9b-oYHE,136
|
78
78
|
parsl/executors/flux/execute_parsl_task.py,sha256=gRN7F4HhdrKQ-bvn4wXrquBzFOp_9WF88hMIeUaRg5I,1553
|
@@ -88,7 +88,7 @@ parsl/executors/high_throughput/mpi_executor.py,sha256=V07t1GOzFhcwdlZGuYUPqc1Na
|
|
88
88
|
parsl/executors/high_throughput/mpi_prefix_composer.py,sha256=hah_IznfFqk-rzuHWmg6aiF_saiDRrpW-aSo4kH9Nso,4854
|
89
89
|
parsl/executors/high_throughput/mpi_resource_management.py,sha256=LFBbJ3BnzTcY_v-jNu30uoIB2Enk4cleN4ygY3dncjY,8194
|
90
90
|
parsl/executors/high_throughput/probe.py,sha256=TNpGTXb4_DEeg_h-LHu4zEKi1-hffboxvKcZUl2OZGk,2751
|
91
|
-
parsl/executors/high_throughput/process_worker_pool.py,sha256=
|
91
|
+
parsl/executors/high_throughput/process_worker_pool.py,sha256=weEld9iZr669gGmPxJC77ISVop7Y47Lc8TkjEfmnAyk,42991
|
92
92
|
parsl/executors/high_throughput/zmq_pipes.py,sha256=tAjQB3aNVMuTXziN3dbJWre46YpXgliD55qMBbhYTLU,8581
|
93
93
|
parsl/executors/radical/__init__.py,sha256=CKbtV2numw5QvgIBq1htMUrt9TqDCIC2zifyf2svTNU,186
|
94
94
|
parsl/executors/radical/executor.py,sha256=426cMt6d8uJFZ_7Ub1kCslaND4OKtBX5WZdz-0RXjMk,22554
|
@@ -467,13 +467,13 @@ parsl/usage_tracking/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
467
467
|
parsl/usage_tracking/api.py,sha256=iaCY58Dc5J4UM7_dJzEEs871P1p1HdxBMtNGyVdzc9g,1821
|
468
468
|
parsl/usage_tracking/levels.py,sha256=xbfzYEsd55KiZJ-mzNgPebvOH4rRHum04hROzEf41tU,291
|
469
469
|
parsl/usage_tracking/usage.py,sha256=qNEJ7nPimqd3Y7OWFLdYmNwJ6XDKlyfV_fTzasxsQw8,8690
|
470
|
-
parsl-2024.7.
|
471
|
-
parsl-2024.7.
|
472
|
-
parsl-2024.7.
|
473
|
-
parsl-2024.7.
|
474
|
-
parsl-2024.7.
|
475
|
-
parsl-2024.7.
|
476
|
-
parsl-2024.7.
|
477
|
-
parsl-2024.7.
|
478
|
-
parsl-2024.7.
|
479
|
-
parsl-2024.7.
|
470
|
+
parsl-2024.7.22.data/scripts/exec_parsl_function.py,sha256=RUkJ4JSJAjr7YyRZ58zhMdg8cR5dVV9odUl3AuzNf3k,7802
|
471
|
+
parsl-2024.7.22.data/scripts/interchange.py,sha256=n0aOHLX64DEWx-OA4vWrYRVZfmaz8Rc8haNtafbgh4k,30565
|
472
|
+
parsl-2024.7.22.data/scripts/parsl_coprocess.py,sha256=zrVjEqQvFOHxsLufPi00xzMONagjVwLZbavPM7bbjK4,5722
|
473
|
+
parsl-2024.7.22.data/scripts/process_worker_pool.py,sha256=Ar-HLibZxnEVSVanAbOnBFtYdwQ_bSOwXGznoVQIdqI,42977
|
474
|
+
parsl-2024.7.22.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
475
|
+
parsl-2024.7.22.dist-info/METADATA,sha256=D24HXi2DjCTXBzgd8QBjrkbk97stTxn18dY1_fv9tYM,4124
|
476
|
+
parsl-2024.7.22.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
477
|
+
parsl-2024.7.22.dist-info/entry_points.txt,sha256=XqnsWDYoEcLbsMcpnYGKLEnSBmaIe1YoM5YsBdJG2tI,176
|
478
|
+
parsl-2024.7.22.dist-info/top_level.txt,sha256=PIheYoUFQtF2icLsgOykgU-Cjuwr2Oi6On2jo5RYgRM,6
|
479
|
+
parsl-2024.7.22.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|