parsl 2024.5.27__py3-none-any.whl → 2024.6.10__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/__init__.py +9 -10
- parsl/addresses.py +6 -4
- parsl/app/app.py +3 -6
- parsl/app/bash.py +4 -4
- parsl/app/errors.py +5 -3
- parsl/app/futures.py +3 -3
- parsl/app/python.py +2 -1
- parsl/benchmark/perf.py +2 -1
- parsl/channels/__init__.py +2 -2
- parsl/channels/base.py +0 -1
- parsl/channels/errors.py +2 -1
- parsl/channels/oauth_ssh/oauth_ssh.py +4 -3
- parsl/channels/ssh/ssh.py +9 -1
- parsl/channels/ssh_il/ssh_il.py +1 -0
- parsl/concurrent/__init__.py +2 -2
- parsl/config.py +32 -9
- parsl/configs/ASPIRE1.py +3 -3
- parsl/configs/Azure.py +6 -7
- parsl/configs/ad_hoc.py +4 -3
- parsl/configs/bridges.py +3 -3
- parsl/configs/cc_in2p3.py +2 -2
- parsl/configs/ec2.py +1 -1
- parsl/configs/expanse.py +1 -2
- parsl/configs/frontera.py +2 -3
- parsl/configs/htex_local.py +1 -2
- parsl/configs/illinoiscluster.py +1 -1
- parsl/configs/kubernetes.py +1 -2
- parsl/configs/midway.py +3 -3
- parsl/configs/osg.py +1 -1
- parsl/configs/polaris.py +1 -1
- parsl/configs/stampede2.py +4 -5
- parsl/configs/summit.py +1 -3
- parsl/configs/toss3_llnl.py +1 -2
- parsl/configs/vineex_local.py +3 -3
- parsl/configs/wqex_local.py +2 -2
- parsl/data_provider/data_manager.py +3 -3
- parsl/data_provider/file_noop.py +1 -2
- parsl/data_provider/files.py +3 -3
- parsl/data_provider/ftp.py +1 -3
- parsl/data_provider/globus.py +7 -6
- parsl/data_provider/http.py +2 -2
- parsl/data_provider/rsync.py +1 -1
- parsl/data_provider/staging.py +2 -2
- parsl/data_provider/zip.py +4 -5
- parsl/dataflow/dflow.py +57 -26
- parsl/dataflow/errors.py +2 -1
- parsl/dataflow/futures.py +1 -2
- parsl/dataflow/memoization.py +5 -5
- parsl/dataflow/rundirs.py +1 -1
- parsl/dataflow/taskrecord.py +4 -5
- parsl/executors/__init__.py +3 -3
- parsl/executors/base.py +1 -0
- parsl/executors/flux/execute_parsl_task.py +2 -2
- parsl/executors/flux/executor.py +11 -12
- parsl/executors/flux/flux_instance_manager.py +3 -3
- parsl/executors/high_throughput/executor.py +31 -36
- parsl/executors/high_throughput/interchange.py +37 -38
- parsl/executors/high_throughput/manager_record.py +1 -0
- parsl/executors/high_throughput/monitoring_info.py +2 -1
- parsl/executors/high_throughput/mpi_executor.py +5 -2
- parsl/executors/high_throughput/mpi_prefix_composer.py +1 -1
- parsl/executors/high_throughput/mpi_resource_management.py +1 -2
- parsl/executors/high_throughput/probe.py +6 -4
- parsl/executors/high_throughput/process_worker_pool.py +31 -20
- parsl/executors/high_throughput/zmq_pipes.py +28 -14
- parsl/executors/radical/executor.py +15 -15
- parsl/executors/radical/rpex_master.py +1 -2
- parsl/executors/radical/rpex_resources.py +1 -2
- parsl/executors/radical/rpex_worker.py +2 -1
- parsl/executors/status_handling.py +5 -4
- parsl/executors/taskvine/__init__.py +1 -1
- parsl/executors/taskvine/errors.py +1 -1
- parsl/executors/taskvine/exec_parsl_function.py +2 -2
- parsl/executors/taskvine/executor.py +23 -24
- parsl/executors/taskvine/factory.py +1 -1
- parsl/executors/taskvine/manager.py +11 -13
- parsl/executors/threads.py +4 -5
- parsl/executors/workqueue/errors.py +1 -1
- parsl/executors/workqueue/exec_parsl_function.py +5 -4
- parsl/executors/workqueue/executor.py +26 -27
- parsl/executors/workqueue/parsl_coprocess.py +1 -1
- parsl/jobs/error_handlers.py +1 -1
- parsl/jobs/job_status_poller.py +2 -5
- parsl/jobs/states.py +1 -1
- parsl/jobs/strategy.py +2 -2
- parsl/launchers/__init__.py +12 -3
- parsl/launchers/errors.py +1 -1
- parsl/log_utils.py +1 -2
- parsl/monitoring/db_manager.py +16 -10
- parsl/monitoring/monitoring.py +11 -15
- parsl/monitoring/queries/pandas.py +1 -2
- parsl/monitoring/radios.py +2 -4
- parsl/monitoring/remote.py +13 -8
- parsl/monitoring/router.py +8 -11
- parsl/monitoring/types.py +2 -0
- parsl/monitoring/visualization/app.py +4 -2
- parsl/monitoring/visualization/models.py +0 -1
- parsl/monitoring/visualization/plots/default/workflow_plots.py +8 -4
- parsl/monitoring/visualization/plots/default/workflow_resource_plots.py +1 -0
- parsl/monitoring/visualization/utils.py +0 -1
- parsl/monitoring/visualization/views.py +16 -9
- parsl/multiprocessing.py +0 -1
- parsl/process_loggers.py +1 -2
- parsl/providers/__init__.py +9 -12
- parsl/providers/ad_hoc/ad_hoc.py +1 -1
- parsl/providers/aws/aws.py +2 -3
- parsl/providers/azure/azure.py +4 -5
- parsl/providers/base.py +1 -1
- parsl/providers/cluster_provider.py +1 -1
- parsl/providers/cobalt/cobalt.py +3 -3
- parsl/providers/condor/condor.py +4 -2
- parsl/providers/errors.py +2 -2
- parsl/providers/googlecloud/googlecloud.py +2 -1
- parsl/providers/grid_engine/grid_engine.py +2 -2
- parsl/providers/kubernetes/kube.py +24 -9
- parsl/providers/local/local.py +5 -1
- parsl/providers/lsf/lsf.py +2 -2
- parsl/providers/pbspro/pbspro.py +1 -1
- parsl/providers/slurm/slurm.py +36 -27
- parsl/providers/torque/torque.py +1 -1
- parsl/serialize/__init__.py +8 -3
- parsl/serialize/base.py +1 -2
- parsl/serialize/concretes.py +5 -4
- parsl/serialize/proxystore.py +3 -2
- parsl/tests/__init__.py +1 -1
- parsl/tests/configs/ad_hoc_cluster_htex.py +4 -4
- parsl/tests/configs/azure_single_node.py +4 -5
- parsl/tests/configs/bridges.py +3 -2
- parsl/tests/configs/cc_in2p3.py +2 -2
- parsl/tests/configs/comet.py +2 -1
- parsl/tests/configs/ec2_single_node.py +1 -2
- parsl/tests/configs/ec2_spot.py +1 -2
- parsl/tests/configs/flux_local.py +11 -0
- parsl/tests/configs/frontera.py +3 -2
- parsl/tests/configs/htex_ad_hoc_cluster.py +2 -4
- parsl/tests/configs/htex_local.py +2 -3
- parsl/tests/configs/htex_local_alternate.py +8 -11
- parsl/tests/configs/htex_local_intask_staging.py +5 -7
- parsl/tests/configs/htex_local_rsync_staging.py +4 -6
- parsl/tests/configs/local_adhoc.py +1 -1
- parsl/tests/configs/local_radical.py +1 -3
- parsl/tests/configs/local_radical_mpi.py +2 -2
- parsl/tests/configs/midway.py +2 -2
- parsl/tests/configs/nscc_singapore.py +3 -3
- parsl/tests/configs/osg_htex.py +1 -1
- parsl/tests/configs/petrelkube.py +3 -2
- parsl/tests/configs/summit.py +1 -0
- parsl/tests/configs/swan_htex.py +2 -2
- parsl/tests/configs/taskvine_ex.py +3 -5
- parsl/tests/configs/theta.py +2 -2
- parsl/tests/configs/workqueue_ex.py +3 -4
- parsl/tests/conftest.py +8 -4
- parsl/tests/integration/test_channels/test_ssh_errors.py +1 -1
- parsl/tests/integration/test_stress/test_python_simple.py +3 -4
- parsl/tests/integration/test_stress/test_python_threads.py +3 -5
- parsl/tests/manual_tests/htex_local.py +4 -4
- parsl/tests/manual_tests/test_ad_hoc_htex.py +2 -1
- parsl/tests/manual_tests/test_basic.py +1 -0
- parsl/tests/manual_tests/test_fan_in_out_htex_remote.py +4 -4
- parsl/tests/manual_tests/test_log_filter.py +3 -1
- parsl/tests/manual_tests/test_memory_limits.py +6 -6
- parsl/tests/manual_tests/test_regression_220.py +2 -1
- parsl/tests/manual_tests/test_udp_simple.py +4 -3
- parsl/tests/manual_tests/test_worker_count.py +3 -2
- parsl/tests/scaling_tests/htex_local.py +2 -2
- parsl/tests/scaling_tests/test_scale.py +0 -9
- parsl/tests/scaling_tests/vineex_condor.py +1 -2
- parsl/tests/scaling_tests/vineex_local.py +1 -2
- parsl/tests/site_tests/test_provider.py +3 -1
- parsl/tests/site_tests/test_site.py +2 -0
- parsl/tests/sites/test_affinity.py +7 -5
- parsl/tests/sites/test_dynamic_executor.py +3 -3
- parsl/tests/sites/test_ec2.py +3 -2
- parsl/tests/sites/test_local_adhoc.py +2 -1
- parsl/tests/sites/test_worker_info.py +4 -3
- parsl/tests/test_aalst_patterns.py +0 -1
- parsl/tests/test_bash_apps/test_apptimeout.py +2 -2
- parsl/tests/test_bash_apps/test_error_codes.py +1 -4
- parsl/tests/test_bash_apps/test_memoize_ignore_args.py +1 -0
- parsl/tests/test_bash_apps/test_memoize_ignore_args_regr.py +2 -2
- parsl/tests/test_bash_apps/test_pipeline.py +1 -1
- parsl/tests/test_bash_apps/test_std_uri.py +4 -3
- parsl/tests/test_bash_apps/test_stdout.py +20 -2
- parsl/tests/test_callables.py +2 -2
- parsl/tests/test_checkpointing/test_python_checkpoint_1.py +1 -0
- parsl/tests/test_checkpointing/test_python_checkpoint_2.py +2 -1
- parsl/tests/test_checkpointing/test_regression_239.py +1 -1
- parsl/tests/test_checkpointing/test_task_exit.py +1 -1
- parsl/tests/test_docs/test_from_slides.py +2 -2
- parsl/tests/test_docs/test_kwargs.py +1 -1
- parsl/tests/test_docs/test_tutorial_1.py +1 -2
- parsl/tests/test_docs/test_workflow1.py +2 -2
- parsl/tests/test_docs/test_workflow2.py +0 -1
- parsl/tests/test_error_handling/test_rand_fail.py +2 -2
- parsl/tests/test_error_handling/test_resource_spec.py +4 -2
- parsl/tests/test_error_handling/test_retries.py +2 -1
- parsl/tests/test_error_handling/test_retry_handler.py +1 -0
- parsl/tests/test_error_handling/test_retry_handler_failure.py +2 -1
- parsl/tests/test_error_handling/test_serialization_fail.py +1 -1
- parsl/tests/test_error_handling/test_wrap_with_logs.py +1 -0
- parsl/tests/test_flux.py +1 -1
- parsl/tests/test_htex/test_command_client_timeout.py +9 -12
- parsl/tests/test_htex/test_connected_blocks.py +3 -2
- parsl/tests/test_htex/test_cpu_affinity_explicit.py +5 -2
- parsl/tests/test_htex/test_disconnected_blocks.py +6 -4
- parsl/tests/test_htex/test_drain.py +5 -5
- parsl/tests/test_htex/test_htex.py +1 -2
- parsl/tests/test_htex/test_managers_command.py +3 -2
- parsl/tests/test_htex/test_multiple_disconnected_blocks.py +6 -4
- parsl/tests/test_htex/test_zmq_binding.py +22 -6
- parsl/tests/test_monitoring/test_app_names.py +3 -2
- parsl/tests/test_monitoring/test_basic.py +4 -4
- parsl/tests/test_monitoring/test_db_locks.py +6 -3
- parsl/tests/test_monitoring/test_fuzz_zmq.py +6 -3
- parsl/tests/test_monitoring/test_htex_init_blocks_vs_monitoring.py +5 -5
- parsl/tests/test_monitoring/test_incomplete_futures.py +5 -3
- parsl/tests/test_monitoring/test_memoization_representation.py +4 -1
- parsl/tests/test_monitoring/test_stdouterr.py +4 -4
- parsl/tests/test_monitoring/test_viz_colouring.py +1 -0
- parsl/tests/test_mpi_apps/test_bad_mpi_config.py +1 -1
- parsl/tests/test_mpi_apps/test_mpi_mode_disabled.py +2 -0
- parsl/tests/test_mpi_apps/test_mpi_mode_enabled.py +7 -5
- parsl/tests/test_mpi_apps/test_mpi_prefix.py +4 -4
- parsl/tests/test_mpi_apps/test_mpi_scheduler.py +7 -2
- parsl/tests/test_mpi_apps/test_mpiex.py +4 -3
- parsl/tests/test_mpi_apps/test_resource_spec.py +9 -10
- parsl/tests/test_providers/test_cobalt_deprecation_warning.py +2 -0
- parsl/tests/test_providers/test_local_provider.py +2 -1
- parsl/tests/test_providers/test_pbspro_template.py +1 -1
- parsl/tests/test_providers/test_slurm_template.py +1 -1
- parsl/tests/test_providers/test_submiterror_deprecation.py +2 -1
- parsl/tests/test_python_apps/test_context_manager.py +99 -3
- parsl/tests/test_python_apps/test_dep_standard_futures.py +2 -1
- parsl/tests/test_python_apps/test_dependencies_deep.py +59 -0
- parsl/tests/test_python_apps/test_futures.py +2 -1
- parsl/tests/test_python_apps/test_join.py +0 -1
- parsl/tests/test_python_apps/test_lifted.py +3 -3
- parsl/tests/test_python_apps/test_memoize_bad_id_for_memo.py +1 -0
- parsl/tests/test_python_apps/test_pluggable_future_resolution.py +1 -1
- parsl/tests/test_radical/test_mpi_funcs.py +1 -2
- parsl/tests/test_regression/test_1480.py +2 -1
- parsl/tests/test_regression/test_1653.py +2 -1
- parsl/tests/test_regression/test_2652.py +1 -0
- parsl/tests/test_regression/test_69a.py +0 -1
- parsl/tests/test_regression/test_854.py +4 -2
- parsl/tests/test_regression/test_97_parallelism_0.py +1 -2
- parsl/tests/test_regression/test_98.py +0 -1
- parsl/tests/test_scaling/test_block_error_handler.py +9 -4
- parsl/tests/test_scaling/test_scale_down.py +2 -3
- parsl/tests/test_scaling/test_scale_down_htex_auto_scale.py +4 -5
- parsl/tests/test_scaling/test_scale_down_htex_unregistered.py +3 -4
- parsl/tests/test_scaling/test_shutdown_scalein.py +1 -2
- parsl/tests/test_serialization/test_2555_caching_deserializer.py +1 -1
- parsl/tests/test_serialization/test_basic.py +2 -1
- parsl/tests/test_serialization/test_htex_code_cache.py +3 -4
- parsl/tests/test_serialization/test_pack_resource_spec.py +2 -1
- parsl/tests/test_serialization/test_proxystore_configured.py +10 -5
- parsl/tests/test_serialization/test_proxystore_impl.py +5 -3
- parsl/tests/test_shutdown/test_kill_monitoring.py +3 -2
- parsl/tests/test_staging/staging_provider.py +2 -2
- parsl/tests/test_staging/test_1316.py +3 -2
- parsl/tests/test_staging/test_docs_1.py +1 -1
- parsl/tests/test_staging/test_docs_2.py +2 -1
- parsl/tests/test_staging/test_elaborate_noop_file.py +2 -2
- parsl/tests/test_staging/test_staging_https.py +2 -2
- parsl/tests/test_staging/test_staging_stdout.py +4 -3
- parsl/tests/test_staging/test_zip_in.py +6 -8
- parsl/tests/test_staging/test_zip_out.py +7 -9
- parsl/tests/test_staging/test_zip_to_zip.py +6 -8
- parsl/tests/test_summary.py +2 -1
- parsl/tests/test_thread_parallelism.py +0 -1
- parsl/tests/test_threads/test_configs.py +1 -1
- parsl/tests/test_threads/test_lazy_errors.py +2 -1
- parsl/tests/unit/test_usage_tracking.py +45 -0
- parsl/usage_tracking/api.py +2 -3
- parsl/usage_tracking/levels.py +6 -0
- parsl/usage_tracking/usage.py +60 -39
- parsl/utils.py +13 -2
- parsl/version.py +1 -1
- {parsl-2024.5.27.data → parsl-2024.6.10.data}/scripts/exec_parsl_function.py +5 -4
- {parsl-2024.5.27.data → parsl-2024.6.10.data}/scripts/process_worker_pool.py +31 -20
- {parsl-2024.5.27.dist-info → parsl-2024.6.10.dist-info}/METADATA +2 -2
- parsl-2024.6.10.dist-info/RECORD +475 -0
- parsl-2024.5.27.dist-info/RECORD +0 -471
- {parsl-2024.5.27.data → parsl-2024.6.10.data}/scripts/parsl_coprocess.py +1 -1
- {parsl-2024.5.27.dist-info → parsl-2024.6.10.dist-info}/LICENSE +0 -0
- {parsl-2024.5.27.dist-info → parsl-2024.6.10.dist-info}/WHEEL +0 -0
- {parsl-2024.5.27.dist-info → parsl-2024.6.10.dist-info}/entry_points.txt +0 -0
- {parsl-2024.5.27.dist-info → parsl-2024.6.10.dist-info}/top_level.txt +0 -0
@@ -1,31 +1,28 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
|
-
import
|
3
|
-
import
|
2
|
+
import datetime
|
3
|
+
import json
|
4
|
+
import logging
|
4
5
|
import os
|
5
|
-
import
|
6
|
+
import pickle
|
6
7
|
import platform
|
8
|
+
import queue
|
7
9
|
import random
|
8
|
-
import time
|
9
|
-
import datetime
|
10
|
-
import pickle
|
11
10
|
import signal
|
12
|
-
import
|
13
|
-
import queue
|
11
|
+
import sys
|
14
12
|
import threading
|
15
|
-
import
|
13
|
+
import time
|
14
|
+
from typing import Any, Dict, List, NoReturn, Optional, Sequence, Set, Tuple, cast
|
16
15
|
|
17
|
-
|
16
|
+
import zmq
|
18
17
|
|
19
18
|
from parsl import curvezmq
|
20
|
-
from parsl.utils import setproctitle
|
21
|
-
from parsl.version import VERSION as PARSL_VERSION
|
22
|
-
from parsl.serialize import serialize as serialize_object
|
23
|
-
|
24
19
|
from parsl.app.errors import RemoteExceptionWrapper
|
25
20
|
from parsl.executors.high_throughput.manager_record import ManagerRecord
|
26
21
|
from parsl.monitoring.message_type import MessageType
|
27
22
|
from parsl.process_loggers import wrap_with_logs
|
28
|
-
|
23
|
+
from parsl.serialize import serialize as serialize_object
|
24
|
+
from parsl.utils import setproctitle
|
25
|
+
from parsl.version import VERSION as PARSL_VERSION
|
29
26
|
|
30
27
|
PKL_HEARTBEAT_CODE = pickle.dumps((2 ** 32) - 1)
|
31
28
|
PKL_DRAINED_CODE = pickle.dumps((2 ** 32) - 2)
|
@@ -68,18 +65,19 @@ class Interchange:
|
|
68
65
|
3. Detect workers that have failed using heartbeats
|
69
66
|
"""
|
70
67
|
def __init__(self,
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
68
|
+
*,
|
69
|
+
client_address: str,
|
70
|
+
interchange_address: Optional[str],
|
71
|
+
client_ports: Tuple[int, int, int],
|
72
|
+
worker_ports: Optional[Tuple[int, int]],
|
73
|
+
worker_port_range: Tuple[int, int],
|
74
|
+
hub_address: Optional[str],
|
75
|
+
hub_zmq_port: Optional[int],
|
76
|
+
heartbeat_threshold: int,
|
77
|
+
logdir: str,
|
78
|
+
logging_level: int,
|
79
|
+
poll_period: int,
|
80
|
+
cert_dir: Optional[str],
|
83
81
|
) -> None:
|
84
82
|
"""
|
85
83
|
Parameters
|
@@ -95,34 +93,34 @@ class Interchange:
|
|
95
93
|
The ports at which the client can be reached
|
96
94
|
|
97
95
|
worker_ports : tuple(int, int)
|
98
|
-
The specific two ports at which workers will connect to the Interchange.
|
96
|
+
The specific two ports at which workers will connect to the Interchange.
|
99
97
|
|
100
98
|
worker_port_range : tuple(int, int)
|
101
99
|
The interchange picks ports at random from the range which will be used by workers.
|
102
|
-
This is overridden when the worker_ports option is set.
|
100
|
+
This is overridden when the worker_ports option is set.
|
103
101
|
|
104
102
|
hub_address : str
|
105
103
|
The IP address at which the interchange can send info about managers to when monitoring is enabled.
|
106
|
-
|
104
|
+
When None, monitoring is disabled.
|
107
105
|
|
108
106
|
hub_zmq_port : str
|
109
107
|
The port at which the interchange can send info about managers to when monitoring is enabled.
|
110
|
-
|
108
|
+
When None, monitoring is disabled.
|
111
109
|
|
112
110
|
heartbeat_threshold : int
|
113
111
|
Number of seconds since the last heartbeat after which worker is considered lost.
|
114
112
|
|
115
113
|
logdir : str
|
116
|
-
Parsl log directory paths. Logs and temp files go here.
|
114
|
+
Parsl log directory paths. Logs and temp files go here.
|
117
115
|
|
118
116
|
logging_level : int
|
119
|
-
Logging level as defined in the logging module.
|
117
|
+
Logging level as defined in the logging module.
|
120
118
|
|
121
119
|
poll_period : int
|
122
|
-
The main thread polling period, in milliseconds.
|
120
|
+
The main thread polling period, in milliseconds.
|
123
121
|
|
124
122
|
cert_dir : str | None
|
125
|
-
Path to the certificate directory.
|
123
|
+
Path to the certificate directory.
|
126
124
|
"""
|
127
125
|
self.cert_dir = cert_dir
|
128
126
|
self.logdir = logdir
|
@@ -328,6 +326,9 @@ class Interchange:
|
|
328
326
|
|
329
327
|
reply = None
|
330
328
|
|
329
|
+
elif command_req == "WORKER_PORTS":
|
330
|
+
reply = (self.worker_task_port, self.worker_result_port)
|
331
|
+
|
331
332
|
else:
|
332
333
|
logger.error(f"Received unknown command: {command_req}")
|
333
334
|
reply = None
|
@@ -672,7 +673,7 @@ def start_file_logger(filename: str, level: int = logging.DEBUG, format_string:
|
|
672
673
|
|
673
674
|
|
674
675
|
@wrap_with_logs(target="interchange")
|
675
|
-
def starter(
|
676
|
+
def starter(*args: Any, **kwargs: Any) -> None:
|
676
677
|
"""Start the interchange process
|
677
678
|
|
678
679
|
The executor is expected to call this function. The args, kwargs match that of the Interchange.__init__
|
@@ -680,6 +681,4 @@ def starter(comm_q: multiprocessing.Queue, *args: Any, **kwargs: Any) -> None:
|
|
680
681
|
setproctitle("parsl: HTEX interchange")
|
681
682
|
# logger = multiprocessing.get_logger()
|
682
683
|
ic = Interchange(*args, **kwargs)
|
683
|
-
comm_q.put((ic.worker_task_port,
|
684
|
-
ic.worker_result_port))
|
685
684
|
ic.start()
|
@@ -1,10 +1,13 @@
|
|
1
1
|
"""A simplified interface for HTEx when running in MPI mode"""
|
2
|
-
from typing import
|
2
|
+
from typing import Callable, Dict, List, Optional, Tuple, Union
|
3
3
|
|
4
4
|
import typeguard
|
5
5
|
|
6
6
|
from parsl.data_provider.staging import Staging
|
7
|
-
from parsl.executors.high_throughput.executor import
|
7
|
+
from parsl.executors.high_throughput.executor import (
|
8
|
+
GENERAL_HTEX_PARAM_DOCS,
|
9
|
+
HighThroughputExecutor,
|
10
|
+
)
|
8
11
|
from parsl.executors.status_handling import BlockProviderExecutor
|
9
12
|
from parsl.jobs.states import JobStatus
|
10
13
|
from parsl.providers import LocalProvider
|
@@ -8,8 +8,7 @@ from enum import Enum
|
|
8
8
|
from typing import Dict, List
|
9
9
|
|
10
10
|
from parsl.multiprocessing import SpawnContext
|
11
|
-
from parsl.serialize import
|
12
|
-
unpack_res_spec_apply_message)
|
11
|
+
from parsl.serialize import pack_res_spec_apply_message, unpack_res_spec_apply_message
|
13
12
|
|
14
13
|
logger = logging.getLogger(__name__)
|
15
14
|
|
@@ -1,11 +1,13 @@
|
|
1
|
-
import zmq
|
2
1
|
import argparse
|
3
|
-
import uuid
|
4
|
-
import time
|
5
2
|
import logging
|
6
|
-
|
3
|
+
import time
|
4
|
+
import uuid
|
5
|
+
|
6
|
+
import zmq
|
7
7
|
from zmq.utils.monitor import recv_monitor_message
|
8
8
|
|
9
|
+
from parsl.addresses import get_all_addresses
|
10
|
+
|
9
11
|
logger = logging.getLogger(__name__)
|
10
12
|
|
11
13
|
|
@@ -1,39 +1,41 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
|
3
3
|
import argparse
|
4
|
+
import json
|
4
5
|
import logging
|
6
|
+
import math
|
7
|
+
import multiprocessing
|
5
8
|
import os
|
6
|
-
import
|
9
|
+
import pickle
|
7
10
|
import platform
|
11
|
+
import queue
|
12
|
+
import sys
|
8
13
|
import threading
|
9
|
-
import pickle
|
10
14
|
import time
|
11
|
-
import queue
|
12
15
|
import uuid
|
13
|
-
from typing import Sequence, Optional, Dict, List
|
14
|
-
|
15
|
-
import zmq
|
16
|
-
import math
|
17
|
-
import json
|
18
|
-
import psutil
|
19
|
-
import multiprocessing
|
20
16
|
from multiprocessing.managers import DictProxy
|
21
17
|
from multiprocessing.sharedctypes import Synchronized
|
18
|
+
from typing import Dict, List, Optional, Sequence
|
19
|
+
|
20
|
+
import psutil
|
21
|
+
import zmq
|
22
22
|
|
23
23
|
from parsl import curvezmq
|
24
|
-
from parsl.process_loggers import wrap_with_logs
|
25
|
-
from parsl.version import VERSION as PARSL_VERSION
|
26
24
|
from parsl.app.errors import RemoteExceptionWrapper
|
27
25
|
from parsl.executors.high_throughput.errors import WorkerLost
|
28
|
-
from parsl.executors.high_throughput.
|
29
|
-
|
30
|
-
|
26
|
+
from parsl.executors.high_throughput.mpi_prefix_composer import (
|
27
|
+
VALID_LAUNCHERS,
|
28
|
+
compose_all,
|
29
|
+
)
|
31
30
|
from parsl.executors.high_throughput.mpi_resource_management import (
|
31
|
+
MPITaskScheduler,
|
32
32
|
TaskScheduler,
|
33
|
-
MPITaskScheduler
|
34
33
|
)
|
35
|
-
|
36
|
-
from parsl.
|
34
|
+
from parsl.executors.high_throughput.probe import probe_addresses
|
35
|
+
from parsl.multiprocessing import SpawnContext
|
36
|
+
from parsl.process_loggers import wrap_with_logs
|
37
|
+
from parsl.serialize import serialize, unpack_res_spec_apply_message
|
38
|
+
from parsl.version import VERSION as PARSL_VERSION
|
37
39
|
|
38
40
|
HEARTBEAT_CODE = (2 ** 32) - 1
|
39
41
|
DRAINED_CODE = (2 ** 32) - 2
|
@@ -677,7 +679,8 @@ def worker(
|
|
677
679
|
# If desired, set process affinity
|
678
680
|
if cpu_affinity != "none":
|
679
681
|
# Count the number of cores per worker
|
680
|
-
|
682
|
+
# OSX does not implement os.sched_getaffinity
|
683
|
+
avail_cores = sorted(os.sched_getaffinity(0)) # type: ignore[attr-defined, unused-ignore]
|
681
684
|
cores_per_worker = len(avail_cores) // pool_size
|
682
685
|
assert cores_per_worker > 0, "Affinity does not work if there are more workers than cores"
|
683
686
|
|
@@ -717,7 +720,15 @@ def worker(
|
|
717
720
|
os.environ["KMP_AFFINITY"] = f"explicit,proclist=[{proc_list}]" # For Intel OpenMP
|
718
721
|
|
719
722
|
# Set the affinity for this worker
|
720
|
-
os.sched_setaffinity
|
723
|
+
# OSX does not implement os.sched_setaffinity so type checking
|
724
|
+
# is ignored here in two ways:
|
725
|
+
# On a platform without sched_setaffinity, that attribute will not
|
726
|
+
# be defined, so ignore[attr-defined] will tell mypy to ignore this
|
727
|
+
# incorrect-for-OS X attribute access.
|
728
|
+
# On a platform with sched_setaffinity, that type: ignore message
|
729
|
+
# will be redundant, and ignore[unused-ignore] tells mypy to ignore
|
730
|
+
# that this ignore is unneeded.
|
731
|
+
os.sched_setaffinity(0, my_cores) # type: ignore[attr-defined, unused-ignore]
|
721
732
|
logger.info("Set worker CPU affinity to {}".format(my_cores))
|
722
733
|
|
723
734
|
# If desired, pin to accelerator
|
@@ -1,13 +1,18 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
|
3
|
-
import zmq
|
4
3
|
import logging
|
5
4
|
import threading
|
6
5
|
import time
|
6
|
+
from typing import Optional
|
7
|
+
|
8
|
+
import zmq
|
7
9
|
|
8
10
|
from parsl import curvezmq
|
9
11
|
from parsl.errors import InternalConsistencyError
|
10
|
-
from parsl.executors.high_throughput.errors import
|
12
|
+
from parsl.executors.high_throughput.errors import (
|
13
|
+
CommandClientBadError,
|
14
|
+
CommandClientTimeoutError,
|
15
|
+
)
|
11
16
|
|
12
17
|
logger = logging.getLogger(__name__)
|
13
18
|
|
@@ -15,20 +20,23 @@ logger = logging.getLogger(__name__)
|
|
15
20
|
class CommandClient:
|
16
21
|
""" CommandClient
|
17
22
|
"""
|
18
|
-
def __init__(self,
|
23
|
+
def __init__(self, ip_address, port_range, cert_dir: Optional[str] = None):
|
19
24
|
"""
|
20
25
|
Parameters
|
21
26
|
----------
|
22
27
|
|
23
|
-
zmq_context: curvezmq.ClientContext
|
24
|
-
CurveZMQ client context used to create secure sockets
|
25
28
|
ip_address: str
|
26
29
|
IP address of the client (where Parsl runs)
|
30
|
+
|
27
31
|
port_range: tuple(int, int)
|
28
32
|
Port range for the comms between client and interchange
|
29
33
|
|
34
|
+
cert_dir: str | None
|
35
|
+
Path to the certificate directory. Setting this to None will disable encryption.
|
36
|
+
default: None
|
37
|
+
|
30
38
|
"""
|
31
|
-
self.zmq_context =
|
39
|
+
self.zmq_context = curvezmq.ClientContext(cert_dir)
|
32
40
|
self.ip_address = ip_address
|
33
41
|
self.port_range = port_range
|
34
42
|
self.port = None
|
@@ -119,20 +127,23 @@ class CommandClient:
|
|
119
127
|
class TasksOutgoing:
|
120
128
|
""" Outgoing task queue from the executor to the Interchange
|
121
129
|
"""
|
122
|
-
def __init__(self,
|
130
|
+
def __init__(self, ip_address, port_range, cert_dir: Optional[str] = None):
|
123
131
|
"""
|
124
132
|
Parameters
|
125
133
|
----------
|
126
134
|
|
127
|
-
zmq_context: curvezmq.ClientContext
|
128
|
-
CurveZMQ client context used to create secure sockets
|
129
135
|
ip_address: str
|
130
136
|
IP address of the client (where Parsl runs)
|
137
|
+
|
131
138
|
port_range: tuple(int, int)
|
132
139
|
Port range for the comms between client and interchange
|
133
140
|
|
141
|
+
cert_dir: str | None
|
142
|
+
Path to the certificate directory. Setting this to None will disable encryption.
|
143
|
+
default: None
|
144
|
+
|
134
145
|
"""
|
135
|
-
self.zmq_context =
|
146
|
+
self.zmq_context = curvezmq.ClientContext(cert_dir)
|
136
147
|
self.zmq_socket = self.zmq_context.socket(zmq.DEALER)
|
137
148
|
self.zmq_socket.set_hwm(0)
|
138
149
|
self.port = self.zmq_socket.bind_to_random_port("tcp://{}".format(ip_address),
|
@@ -172,20 +183,23 @@ class ResultsIncoming:
|
|
172
183
|
""" Incoming results queue from the Interchange to the executor
|
173
184
|
"""
|
174
185
|
|
175
|
-
def __init__(self,
|
186
|
+
def __init__(self, ip_address, port_range, cert_dir: Optional[str] = None):
|
176
187
|
"""
|
177
188
|
Parameters
|
178
189
|
----------
|
179
190
|
|
180
|
-
zmq_context: curvezmq.ClientContext
|
181
|
-
CurveZMQ client context used to create secure sockets
|
182
191
|
ip_address: str
|
183
192
|
IP address of the client (where Parsl runs)
|
193
|
+
|
184
194
|
port_range: tuple(int, int)
|
185
195
|
Port range for the comms between client and interchange
|
186
196
|
|
197
|
+
cert_dir: str | None
|
198
|
+
Path to the certificate directory. Setting this to None will disable encryption.
|
199
|
+
default: None
|
200
|
+
|
187
201
|
"""
|
188
|
-
self.zmq_context =
|
202
|
+
self.zmq_context = curvezmq.ClientContext(cert_dir)
|
189
203
|
self.results_receiver = self.zmq_context.socket(zmq.DEALER)
|
190
204
|
self.results_receiver.set_hwm(0)
|
191
205
|
self.port = self.results_receiver.bind_to_random_port("tcp://{}".format(ip_address),
|
@@ -1,30 +1,30 @@
|
|
1
1
|
"""RadicalPilotExecutor builds on the RADICAL-Pilot/Parsl
|
2
2
|
"""
|
3
|
+
import inspect
|
4
|
+
import logging
|
3
5
|
import os
|
4
|
-
import sys
|
5
|
-
import time
|
6
|
-
import parsl
|
7
6
|
import queue
|
8
|
-
import
|
9
|
-
import inspect
|
10
|
-
import requests
|
11
|
-
import typeguard
|
7
|
+
import sys
|
12
8
|
import threading as mt
|
13
|
-
|
9
|
+
import time
|
10
|
+
from concurrent.futures import Future
|
14
11
|
from functools import partial
|
15
|
-
from typing import Optional, Dict
|
16
12
|
from pathlib import Path, PosixPath
|
17
|
-
from
|
13
|
+
from typing import Dict, Optional
|
14
|
+
|
15
|
+
import requests
|
16
|
+
import typeguard
|
18
17
|
|
18
|
+
import parsl
|
19
|
+
from parsl.app.errors import BashExitFailure, RemoteExceptionWrapper
|
19
20
|
from parsl.app.python import timeout
|
20
|
-
from .rpex_resources import ResourceConfig
|
21
21
|
from parsl.data_provider.files import File
|
22
|
-
from parsl.utils import RepresentationMixin
|
23
|
-
from parsl.app.errors import BashExitFailure
|
24
22
|
from parsl.executors.base import ParslExecutor
|
25
|
-
from parsl.app.errors import RemoteExceptionWrapper
|
26
23
|
from parsl.serialize import deserialize, pack_res_spec_apply_message
|
27
|
-
from parsl.serialize.errors import
|
24
|
+
from parsl.serialize.errors import DeserializationError, SerializationError
|
25
|
+
from parsl.utils import RepresentationMixin
|
26
|
+
|
27
|
+
from .rpex_resources import ResourceConfig
|
28
28
|
|
29
29
|
try:
|
30
30
|
import radical.pilot as rp
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import sys
|
2
|
+
|
2
3
|
import radical.pilot as rp
|
3
4
|
|
4
5
|
import parsl.app.errors as pe
|
5
6
|
from parsl.app.bash import remote_side_bash_executor
|
6
|
-
from parsl.serialize import unpack_res_spec_apply_message, serialize
|
7
7
|
from parsl.executors.high_throughput.process_worker_pool import execute_task
|
8
|
+
from parsl.serialize import serialize, unpack_res_spec_apply_message
|
8
9
|
|
9
10
|
|
10
11
|
class ParslWorker:
|
@@ -1,17 +1,18 @@
|
|
1
1
|
from __future__ import annotations
|
2
|
+
|
2
3
|
import datetime
|
3
4
|
import logging
|
4
5
|
import threading
|
5
6
|
import time
|
6
|
-
from itertools import compress
|
7
7
|
from abc import abstractmethod, abstractproperty
|
8
8
|
from concurrent.futures import Future
|
9
|
-
from
|
9
|
+
from itertools import compress
|
10
|
+
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
|
10
11
|
|
11
12
|
from parsl.executors.base import ParslExecutor
|
12
13
|
from parsl.executors.errors import BadStateException, ScalingFailed
|
13
|
-
from parsl.jobs.
|
14
|
-
from parsl.jobs.
|
14
|
+
from parsl.jobs.error_handlers import noop_error_handler, simple_error_handler
|
15
|
+
from parsl.jobs.states import JobState, JobStatus
|
15
16
|
from parsl.monitoring.message_type import MessageType
|
16
17
|
from parsl.providers.base import ExecutionProvider
|
17
18
|
from parsl.utils import AtomicIDCounter
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from parsl.executors.taskvine.executor import TaskVineExecutor
|
2
|
-
from parsl.executors.taskvine.manager_config import TaskVineManagerConfig
|
3
2
|
from parsl.executors.taskvine.factory_config import TaskVineFactoryConfig
|
3
|
+
from parsl.executors.taskvine.manager_config import TaskVineManagerConfig
|
4
4
|
|
5
5
|
__all__ = ['TaskVineExecutor', 'TaskVineManagerConfig', 'TaskVineFactoryConfig']
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import traceback
|
2
1
|
import sys
|
2
|
+
import traceback
|
3
3
|
|
4
4
|
from parsl.app.errors import RemoteExceptionWrapper
|
5
5
|
from parsl.data_provider.files import File
|
6
|
-
from parsl.utils import get_std_fname_mode
|
7
6
|
from parsl.serialize import deserialize, serialize
|
7
|
+
from parsl.utils import get_std_fname_mode
|
8
8
|
|
9
9
|
# This scripts executes a parsl function which is pickled in 4 files:
|
10
10
|
#
|
@@ -3,46 +3,45 @@ Cooperative Computing Lab (CCL) at Notre Dame to provide a fault-tolerant,
|
|
3
3
|
high-throughput system for delegating Parsl tasks to thousands of remote machines
|
4
4
|
"""
|
5
5
|
|
6
|
-
# Import Python built-in libraries
|
7
|
-
import threading
|
8
|
-
import multiprocessing
|
9
|
-
import logging
|
10
|
-
import tempfile
|
11
6
|
import hashlib
|
12
|
-
import
|
7
|
+
import inspect
|
8
|
+
import itertools
|
9
|
+
import logging
|
10
|
+
import multiprocessing
|
13
11
|
import os
|
14
12
|
import queue
|
15
|
-
import inspect
|
16
13
|
import shutil
|
17
|
-
import
|
14
|
+
import subprocess
|
15
|
+
import tempfile
|
16
|
+
|
17
|
+
# Import Python built-in libraries
|
18
|
+
import threading
|
18
19
|
import uuid
|
19
20
|
from concurrent.futures import Future
|
20
|
-
from typing import List, Optional, Union
|
21
|
+
from typing import List, Literal, Optional, Union
|
22
|
+
|
23
|
+
# Import other libraries
|
24
|
+
import typeguard
|
21
25
|
|
22
26
|
# Import Parsl constructs
|
23
27
|
import parsl.utils as putils
|
24
|
-
from parsl.
|
25
|
-
from parsl.serialize import serialize, deserialize
|
28
|
+
from parsl.addresses import get_any_address
|
26
29
|
from parsl.data_provider.files import File
|
30
|
+
from parsl.data_provider.staging import Staging
|
27
31
|
from parsl.errors import OptionalModuleMissing
|
28
|
-
from parsl.providers.base import ExecutionProvider
|
29
|
-
from parsl.providers import LocalProvider, CondorProvider
|
30
|
-
from parsl.process_loggers import wrap_with_logs
|
31
|
-
from parsl.addresses import get_any_address
|
32
32
|
from parsl.executors.errors import ExecutorError
|
33
33
|
from parsl.executors.status_handling import BlockProviderExecutor
|
34
34
|
from parsl.executors.taskvine import exec_parsl_function
|
35
|
-
from parsl.executors.taskvine.
|
35
|
+
from parsl.executors.taskvine.errors import TaskVineManagerFailure, TaskVineTaskFailure
|
36
|
+
from parsl.executors.taskvine.factory import _taskvine_factory
|
36
37
|
from parsl.executors.taskvine.factory_config import TaskVineFactoryConfig
|
37
|
-
from parsl.executors.taskvine.errors import TaskVineTaskFailure
|
38
|
-
from parsl.executors.taskvine.errors import TaskVineManagerFailure
|
39
|
-
from parsl.executors.taskvine.utils import ParslTaskToVine
|
40
|
-
from parsl.executors.taskvine.utils import ParslFileToVine
|
41
38
|
from parsl.executors.taskvine.manager import _taskvine_submit_wait
|
42
|
-
from parsl.executors.taskvine.
|
43
|
-
|
44
|
-
|
45
|
-
import
|
39
|
+
from parsl.executors.taskvine.manager_config import TaskVineManagerConfig
|
40
|
+
from parsl.executors.taskvine.utils import ParslFileToVine, ParslTaskToVine
|
41
|
+
from parsl.process_loggers import wrap_with_logs
|
42
|
+
from parsl.providers import CondorProvider, LocalProvider
|
43
|
+
from parsl.providers.base import ExecutionProvider
|
44
|
+
from parsl.serialize import deserialize, serialize
|
46
45
|
|
47
46
|
logger = logging.getLogger(__name__)
|
48
47
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import logging
|
2
2
|
|
3
|
-
from parsl.process_loggers import wrap_with_logs
|
4
3
|
from parsl.executors.taskvine.errors import TaskVineFactoryFailure
|
4
|
+
from parsl.process_loggers import wrap_with_logs
|
5
5
|
|
6
6
|
# This try except clause prevents import errors
|
7
7
|
# when TaskVine is not used in Parsl.
|
@@ -1,25 +1,23 @@
|
|
1
|
-
import logging
|
2
1
|
import hashlib
|
3
|
-
import
|
2
|
+
import logging
|
4
3
|
import os
|
5
4
|
import queue
|
6
5
|
import shutil
|
6
|
+
import subprocess
|
7
7
|
import uuid
|
8
8
|
|
9
|
-
from parsl.utils import setproctitle
|
10
|
-
from parsl.process_loggers import wrap_with_logs
|
11
9
|
from parsl.executors.taskvine import exec_parsl_function
|
12
|
-
from parsl.executors.taskvine.utils import VineTaskToParsl
|
13
|
-
from parsl.
|
10
|
+
from parsl.executors.taskvine.utils import VineTaskToParsl, run_parsl_function
|
11
|
+
from parsl.process_loggers import wrap_with_logs
|
12
|
+
from parsl.utils import setproctitle
|
14
13
|
|
15
14
|
try:
|
16
|
-
from ndcctools.taskvine import cvine
|
17
|
-
from ndcctools.taskvine import
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
from ndcctools.taskvine.cvine import VINE_ALLOCATION_MODE_MAX
|
15
|
+
from ndcctools.taskvine import FunctionCall, Manager, Task, cvine
|
16
|
+
from ndcctools.taskvine.cvine import (
|
17
|
+
VINE_ALLOCATION_MODE_EXHAUSTIVE_BUCKETING,
|
18
|
+
VINE_ALLOCATION_MODE_MAX,
|
19
|
+
VINE_ALLOCATION_MODE_MAX_THROUGHPUT,
|
20
|
+
)
|
23
21
|
except ImportError:
|
24
22
|
_taskvine_enabled = False
|
25
23
|
else:
|