parsl 2024.12.2__py3-none-any.whl → 2024.12.16__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/configs/cc_in2p3.py +0 -2
- parsl/configs/frontera.py +0 -2
- parsl/configs/htex_local.py +0 -2
- parsl/dataflow/dflow.py +0 -2
- parsl/executors/base.py +1 -1
- parsl/executors/high_throughput/interchange.py +2 -1
- parsl/executors/radical/executor.py +12 -1
- parsl/monitoring/monitoring.py +1 -1
- parsl/monitoring/radios/base.py +13 -0
- parsl/monitoring/radios/filesystem.py +52 -0
- parsl/monitoring/radios/htex.py +57 -0
- parsl/monitoring/radios/multiprocessing.py +17 -0
- parsl/monitoring/radios/udp.py +56 -0
- parsl/monitoring/radios/zmq.py +17 -0
- parsl/monitoring/remote.py +4 -6
- parsl/monitoring/router.py +1 -1
- parsl/providers/cluster_provider.py +2 -5
- parsl/providers/condor/condor.py +1 -8
- parsl/providers/grid_engine/grid_engine.py +1 -6
- parsl/providers/local/local.py +5 -8
- parsl/providers/lsf/lsf.py +1 -6
- parsl/providers/pbspro/pbspro.py +2 -7
- parsl/providers/slurm/slurm.py +3 -9
- parsl/providers/torque/torque.py +1 -7
- parsl/tests/configs/cc_in2p3.py +0 -2
- parsl/tests/configs/frontera.py +0 -2
- parsl/tests/configs/htex_local.py +0 -2
- parsl/tests/configs/htex_local_alternate.py +0 -2
- parsl/tests/configs/htex_local_intask_staging.py +0 -2
- parsl/tests/configs/htex_local_rsync_staging.py +0 -2
- parsl/tests/configs/slurm_local.py +0 -2
- parsl/tests/manual_tests/htex_local.py +0 -2
- parsl/tests/manual_tests/test_memory_limits.py +0 -2
- parsl/tests/scaling_tests/htex_local.py +0 -2
- parsl/tests/sites/test_affinity.py +0 -2
- parsl/tests/sites/test_worker_info.py +0 -2
- parsl/tests/test_htex/test_drain.py +0 -2
- parsl/tests/test_htex/test_manager_selector_by_block.py +0 -2
- parsl/tests/test_monitoring/test_htex_init_blocks_vs_monitoring.py +0 -2
- parsl/tests/test_providers/test_local_provider.py +1 -2
- parsl/tests/test_providers/test_pbspro_template.py +1 -3
- parsl/tests/test_providers/test_slurm_template.py +1 -3
- parsl/tests/test_scaling/test_regression_1621.py +0 -2
- parsl/tests/test_scaling/test_regression_3568_scaledown_vs_MISSING.py +0 -1
- parsl/tests/test_scaling/test_scale_down.py +0 -2
- parsl/tests/test_scaling/test_scale_down_htex_auto_scale.py +0 -2
- parsl/tests/test_scaling/test_scale_down_htex_unregistered.py +0 -2
- parsl/tests/test_scaling/test_shutdown_scalein.py +0 -2
- parsl/tests/test_scaling/test_worker_interchange_bad_messages_3262.py +0 -2
- parsl/tests/test_staging/test_zip_in.py +0 -1
- parsl/tests/test_staging/test_zip_out.py +0 -1
- parsl/tests/test_staging/test_zip_to_zip.py +0 -1
- parsl/tests/test_utils/test_execute_wait.py +35 -0
- parsl/utils.py +35 -0
- parsl/version.py +1 -1
- {parsl-2024.12.2.data → parsl-2024.12.16.data}/scripts/interchange.py +2 -1
- {parsl-2024.12.2.dist-info → parsl-2024.12.16.dist-info}/METADATA +2 -2
- {parsl-2024.12.2.dist-info → parsl-2024.12.16.dist-info}/RECORD +66 -68
- parsl/channels/__init__.py +0 -4
- parsl/channels/base.py +0 -54
- parsl/channels/errors.py +0 -30
- parsl/channels/local/local.py +0 -66
- parsl/monitoring/radios.py +0 -191
- parsl/tests/integration/test_channels/__init__.py +0 -0
- parsl/tests/test_channels/__init__.py +0 -0
- parsl/tests/test_channels/test_large_output.py +0 -22
- parsl/tests/test_channels/test_local_channel.py +0 -19
- /parsl/{channels/local → monitoring/radios}/__init__.py +0 -0
- {parsl-2024.12.2.data → parsl-2024.12.16.data}/scripts/exec_parsl_function.py +0 -0
- {parsl-2024.12.2.data → parsl-2024.12.16.data}/scripts/parsl_coprocess.py +0 -0
- {parsl-2024.12.2.data → parsl-2024.12.16.data}/scripts/process_worker_pool.py +0 -0
- {parsl-2024.12.2.dist-info → parsl-2024.12.16.dist-info}/LICENSE +0 -0
- {parsl-2024.12.2.dist-info → parsl-2024.12.16.dist-info}/WHEEL +0 -0
- {parsl-2024.12.2.dist-info → parsl-2024.12.16.dist-info}/entry_points.txt +0 -0
- {parsl-2024.12.2.dist-info → parsl-2024.12.16.dist-info}/top_level.txt +0 -0
parsl/providers/slurm/slurm.py
CHANGED
@@ -3,12 +3,10 @@ import math
|
|
3
3
|
import os
|
4
4
|
import re
|
5
5
|
import time
|
6
|
-
from typing import Optional
|
6
|
+
from typing import Any, Dict, Optional
|
7
7
|
|
8
8
|
import typeguard
|
9
9
|
|
10
|
-
from parsl.channels import LocalChannel
|
11
|
-
from parsl.channels.base import Channel
|
12
10
|
from parsl.jobs.states import JobState, JobStatus
|
13
11
|
from parsl.launchers import SingleNodeLauncher
|
14
12
|
from parsl.launchers.base import Launcher
|
@@ -73,8 +71,6 @@ class SlurmProvider(ClusterProvider, RepresentationMixin):
|
|
73
71
|
clusters : str
|
74
72
|
Slurm cluster name, or comma seperated cluster list, used to choose between different clusters in a federated Slurm instance.
|
75
73
|
If unspecified or ``None``, no slurm directive for clusters will be added.
|
76
|
-
channel : Channel
|
77
|
-
Channel for accessing this provider.
|
78
74
|
nodes_per_block : int
|
79
75
|
Nodes to provision per block.
|
80
76
|
cores_per_node : int
|
@@ -119,7 +115,6 @@ class SlurmProvider(ClusterProvider, RepresentationMixin):
|
|
119
115
|
qos: Optional[str] = None,
|
120
116
|
constraint: Optional[str] = None,
|
121
117
|
clusters: Optional[str] = None,
|
122
|
-
channel: Channel = LocalChannel(),
|
123
118
|
nodes_per_block: int = 1,
|
124
119
|
cores_per_node: Optional[int] = None,
|
125
120
|
mem_per_node: Optional[int] = None,
|
@@ -136,7 +131,6 @@ class SlurmProvider(ClusterProvider, RepresentationMixin):
|
|
136
131
|
launcher: Launcher = SingleNodeLauncher()):
|
137
132
|
label = 'slurm'
|
138
133
|
super().__init__(label,
|
139
|
-
channel,
|
140
134
|
nodes_per_block,
|
141
135
|
init_blocks,
|
142
136
|
min_blocks,
|
@@ -286,8 +280,8 @@ class SlurmProvider(ClusterProvider, RepresentationMixin):
|
|
286
280
|
|
287
281
|
logger.debug("Requesting one block with {} nodes".format(self.nodes_per_block))
|
288
282
|
|
289
|
-
job_config = {}
|
290
|
-
job_config["submit_script_dir"] = self.
|
283
|
+
job_config: Dict[str, Any] = {}
|
284
|
+
job_config["submit_script_dir"] = self.script_dir
|
291
285
|
job_config["nodes"] = self.nodes_per_block
|
292
286
|
job_config["tasks_per_node"] = tasks_per_node
|
293
287
|
job_config["walltime"] = wtime_to_minutes(self.walltime)
|
parsl/providers/torque/torque.py
CHANGED
@@ -2,7 +2,6 @@ import logging
|
|
2
2
|
import os
|
3
3
|
import time
|
4
4
|
|
5
|
-
from parsl.channels import LocalChannel
|
6
5
|
from parsl.jobs.states import JobState, JobStatus
|
7
6
|
from parsl.launchers import AprunLauncher
|
8
7
|
from parsl.providers.cluster_provider import ClusterProvider
|
@@ -33,8 +32,6 @@ class TorqueProvider(ClusterProvider, RepresentationMixin):
|
|
33
32
|
|
34
33
|
Parameters
|
35
34
|
----------
|
36
|
-
channel : Channel
|
37
|
-
Channel for accessing this provider.
|
38
35
|
account : str
|
39
36
|
Account the job will be charged against.
|
40
37
|
queue : str
|
@@ -65,7 +62,6 @@ class TorqueProvider(ClusterProvider, RepresentationMixin):
|
|
65
62
|
|
66
63
|
"""
|
67
64
|
def __init__(self,
|
68
|
-
channel=LocalChannel(),
|
69
65
|
account=None,
|
70
66
|
queue=None,
|
71
67
|
scheduler_options='',
|
@@ -80,7 +76,6 @@ class TorqueProvider(ClusterProvider, RepresentationMixin):
|
|
80
76
|
cmd_timeout=120):
|
81
77
|
label = 'torque'
|
82
78
|
super().__init__(label,
|
83
|
-
channel,
|
84
79
|
nodes_per_block,
|
85
80
|
init_blocks,
|
86
81
|
min_blocks,
|
@@ -170,8 +165,7 @@ class TorqueProvider(ClusterProvider, RepresentationMixin):
|
|
170
165
|
tasks_per_node)
|
171
166
|
|
172
167
|
job_config = {}
|
173
|
-
|
174
|
-
job_config["submit_script_dir"] = self.channel.script_dir
|
168
|
+
job_config["submit_script_dir"] = self.script_dir
|
175
169
|
job_config["nodes"] = self.nodes_per_block
|
176
170
|
job_config["task_blocks"] = self.nodes_per_block * tasks_per_node
|
177
171
|
job_config["nodes_per_block"] = self.nodes_per_block
|
parsl/tests/configs/cc_in2p3.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
from parsl.channels import LocalChannel
|
2
1
|
from parsl.config import Config
|
3
2
|
from parsl.executors import HighThroughputExecutor
|
4
3
|
from parsl.providers import GridEngineProvider
|
@@ -14,7 +13,6 @@ def fresh_config():
|
|
14
13
|
max_workers_per_node=1,
|
15
14
|
encrypted=True,
|
16
15
|
provider=GridEngineProvider(
|
17
|
-
channel=LocalChannel(),
|
18
16
|
nodes_per_block=2,
|
19
17
|
init_blocks=2,
|
20
18
|
max_blocks=2,
|
parsl/tests/configs/frontera.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
from parsl.channels import LocalChannel
|
2
1
|
from parsl.config import Config
|
3
2
|
from parsl.executors import HighThroughputExecutor
|
4
3
|
from parsl.launchers import SrunLauncher
|
@@ -20,7 +19,6 @@ def fresh_config():
|
|
20
19
|
encrypted=True,
|
21
20
|
provider=SlurmProvider(
|
22
21
|
cmd_timeout=60, # Add extra time for slow scheduler responses
|
23
|
-
channel=LocalChannel(),
|
24
22
|
nodes_per_block=2,
|
25
23
|
init_blocks=1,
|
26
24
|
min_blocks=1,
|
@@ -1,4 +1,3 @@
|
|
1
|
-
from parsl.channels import LocalChannel
|
2
1
|
from parsl.config import Config
|
3
2
|
from parsl.executors import HighThroughputExecutor
|
4
3
|
from parsl.launchers import SimpleLauncher
|
@@ -15,7 +14,6 @@ def fresh_config():
|
|
15
14
|
cores_per_worker=1,
|
16
15
|
encrypted=True,
|
17
16
|
provider=LocalProvider(
|
18
|
-
channel=LocalChannel(),
|
19
17
|
init_blocks=1,
|
20
18
|
max_blocks=1,
|
21
19
|
launcher=SimpleLauncher(),
|
@@ -17,7 +17,6 @@ those timing parameters control.
|
|
17
17
|
|
18
18
|
import os
|
19
19
|
|
20
|
-
from parsl.channels import LocalChannel
|
21
20
|
from parsl.config import Config
|
22
21
|
from parsl.data_provider.file_noop import NoOpFileStaging
|
23
22
|
from parsl.data_provider.ftp import FTPInTaskStaging
|
@@ -48,7 +47,6 @@ def fresh_config():
|
|
48
47
|
poll_period=100,
|
49
48
|
encrypted=True,
|
50
49
|
provider=LocalProvider(
|
51
|
-
channel=LocalChannel(),
|
52
50
|
init_blocks=0,
|
53
51
|
min_blocks=0,
|
54
52
|
max_blocks=5,
|
@@ -1,4 +1,3 @@
|
|
1
|
-
from parsl.channels import LocalChannel
|
2
1
|
from parsl.config import Config
|
3
2
|
from parsl.data_provider.file_noop import NoOpFileStaging
|
4
3
|
from parsl.data_provider.ftp import FTPInTaskStaging
|
@@ -15,7 +14,6 @@ config = Config(
|
|
15
14
|
cores_per_worker=1,
|
16
15
|
encrypted=True,
|
17
16
|
provider=LocalProvider(
|
18
|
-
channel=LocalChannel(),
|
19
17
|
init_blocks=1,
|
20
18
|
max_blocks=1,
|
21
19
|
launcher=SimpleLauncher(),
|
@@ -1,4 +1,3 @@
|
|
1
|
-
from parsl.channels import LocalChannel
|
2
1
|
from parsl.config import Config
|
3
2
|
from parsl.data_provider.ftp import FTPInTaskStaging
|
4
3
|
from parsl.data_provider.http import HTTPInTaskStaging
|
@@ -16,7 +15,6 @@ config = Config(
|
|
16
15
|
working_dir="./rsync-workdir/",
|
17
16
|
encrypted=True,
|
18
17
|
provider=LocalProvider(
|
19
|
-
channel=LocalChannel(),
|
20
18
|
init_blocks=1,
|
21
19
|
max_blocks=1,
|
22
20
|
launcher=SimpleLauncher(),
|
@@ -1,4 +1,3 @@
|
|
1
|
-
from parsl.channels import LocalChannel
|
2
1
|
from parsl.config import Config
|
3
2
|
from parsl.executors import HighThroughputExecutor
|
4
3
|
from parsl.launchers import SrunLauncher
|
@@ -13,7 +12,6 @@ def fresh_config():
|
|
13
12
|
encrypted=True,
|
14
13
|
provider=SlurmProvider(
|
15
14
|
cmd_timeout=60, # Add extra time for slow scheduler responses
|
16
|
-
channel=LocalChannel(),
|
17
15
|
nodes_per_block=1,
|
18
16
|
init_blocks=1,
|
19
17
|
min_blocks=1,
|
@@ -1,4 +1,3 @@
|
|
1
|
-
from parsl.channels import LocalChannel
|
2
1
|
from parsl.config import Config
|
3
2
|
from parsl.executors import HighThroughputExecutor
|
4
3
|
|
@@ -15,7 +14,6 @@ config = Config(
|
|
15
14
|
cores_per_worker=1,
|
16
15
|
encrypted=True,
|
17
16
|
provider=LocalProvider(
|
18
|
-
channel=LocalChannel(),
|
19
17
|
init_blocks=1,
|
20
18
|
max_blocks=1,
|
21
19
|
# tasks_per_node=1, # For HighThroughputExecutor, this option should in most cases be 1
|
@@ -5,7 +5,6 @@ import psutil
|
|
5
5
|
|
6
6
|
import parsl
|
7
7
|
from parsl.app.app import python_app # , bash_app
|
8
|
-
from parsl.channels import LocalChannel
|
9
8
|
from parsl.config import Config
|
10
9
|
from parsl.executors import HighThroughputExecutor
|
11
10
|
from parsl.launchers import SingleNodeLauncher
|
@@ -30,7 +29,6 @@ def test_simple(mem_per_worker):
|
|
30
29
|
suppress_failure=True,
|
31
30
|
encrypted=True,
|
32
31
|
provider=LocalProvider(
|
33
|
-
channel=LocalChannel(),
|
34
32
|
init_blocks=1,
|
35
33
|
max_blocks=1,
|
36
34
|
launcher=SingleNodeLauncher(),
|
@@ -1,4 +1,3 @@
|
|
1
|
-
from parsl.channels import LocalChannel
|
2
1
|
from parsl.config import Config
|
3
2
|
from parsl.executors import HighThroughputExecutor
|
4
3
|
from parsl.providers import LocalProvider
|
@@ -12,7 +11,6 @@ config = Config(
|
|
12
11
|
max_workers_per_node=8,
|
13
12
|
encrypted=True,
|
14
13
|
provider=LocalProvider(
|
15
|
-
channel=LocalChannel(),
|
16
14
|
init_blocks=1,
|
17
15
|
max_blocks=1,
|
18
16
|
),
|
@@ -5,7 +5,6 @@ import os
|
|
5
5
|
import pytest
|
6
6
|
|
7
7
|
from parsl import python_app
|
8
|
-
from parsl.channels import LocalChannel
|
9
8
|
from parsl.config import Config
|
10
9
|
from parsl.executors import HighThroughputExecutor
|
11
10
|
from parsl.providers import LocalProvider
|
@@ -22,7 +21,6 @@ def local_config():
|
|
22
21
|
available_accelerators=2,
|
23
22
|
encrypted=True,
|
24
23
|
provider=LocalProvider(
|
25
|
-
channel=LocalChannel(),
|
26
24
|
init_blocks=1,
|
27
25
|
max_blocks=1,
|
28
26
|
),
|
@@ -3,7 +3,6 @@
|
|
3
3
|
import pytest
|
4
4
|
|
5
5
|
from parsl import python_app
|
6
|
-
from parsl.channels import LocalChannel
|
7
6
|
from parsl.config import Config
|
8
7
|
from parsl.executors import HighThroughputExecutor
|
9
8
|
from parsl.providers import LocalProvider
|
@@ -18,7 +17,6 @@ def local_config():
|
|
18
17
|
max_workers_per_node=4,
|
19
18
|
encrypted=True,
|
20
19
|
provider=LocalProvider(
|
21
|
-
channel=LocalChannel(),
|
22
20
|
init_blocks=1,
|
23
21
|
max_blocks=1,
|
24
22
|
),
|
@@ -3,7 +3,6 @@ import time
|
|
3
3
|
import pytest
|
4
4
|
|
5
5
|
import parsl
|
6
|
-
from parsl.channels import LocalChannel
|
7
6
|
from parsl.config import Config
|
8
7
|
from parsl.executors import HighThroughputExecutor
|
9
8
|
from parsl.launchers import SimpleLauncher
|
@@ -28,7 +27,6 @@ def local_config():
|
|
28
27
|
cores_per_worker=1,
|
29
28
|
encrypted=True,
|
30
29
|
provider=LocalProvider(
|
31
|
-
channel=LocalChannel(),
|
32
30
|
init_blocks=1,
|
33
31
|
min_blocks=0,
|
34
32
|
max_blocks=0,
|
@@ -4,7 +4,6 @@ import pytest
|
|
4
4
|
|
5
5
|
import parsl
|
6
6
|
from parsl.app.app import bash_app, python_app
|
7
|
-
from parsl.channels import LocalChannel
|
8
7
|
from parsl.config import Config
|
9
8
|
from parsl.executors import HighThroughputExecutor
|
10
9
|
from parsl.executors.high_throughput.manager_selector import (
|
@@ -31,7 +30,6 @@ def test_block_id_selection(try_assert):
|
|
31
30
|
max_workers_per_node=1,
|
32
31
|
manager_selector=BlockIdManagerSelector(),
|
33
32
|
provider=LocalProvider(
|
34
|
-
channel=LocalChannel(),
|
35
33
|
init_blocks=BLOCK_COUNT,
|
36
34
|
max_blocks=BLOCK_COUNT,
|
37
35
|
min_blocks=BLOCK_COUNT,
|
@@ -5,7 +5,6 @@ import time
|
|
5
5
|
import pytest
|
6
6
|
|
7
7
|
import parsl
|
8
|
-
from parsl.channels import LocalChannel
|
9
8
|
from parsl.config import Config
|
10
9
|
from parsl.executors import HighThroughputExecutor
|
11
10
|
from parsl.launchers import SimpleLauncher
|
@@ -22,7 +21,6 @@ def fresh_config(run_dir, strategy, db_url):
|
|
22
21
|
cores_per_worker=1,
|
23
22
|
encrypted=True,
|
24
23
|
provider=LocalProvider(
|
25
|
-
channel=LocalChannel(),
|
26
24
|
init_blocks=1,
|
27
25
|
# min and max are set to 0 to ensure that we don't get
|
28
26
|
# a block from ongoing strategy scaling, only from
|
@@ -11,7 +11,6 @@ import time
|
|
11
11
|
|
12
12
|
import pytest
|
13
13
|
|
14
|
-
from parsl.channels import LocalChannel
|
15
14
|
from parsl.jobs.states import JobState
|
16
15
|
from parsl.launchers import SingleNodeLauncher
|
17
16
|
from parsl.providers import LocalProvider
|
@@ -63,7 +62,7 @@ def _run_tests(p: LocalProvider):
|
|
63
62
|
def test_local_channel():
|
64
63
|
with tempfile.TemporaryDirectory() as script_dir:
|
65
64
|
script_dir = tempfile.mkdtemp()
|
66
|
-
p = LocalProvider(
|
65
|
+
p = LocalProvider(launcher=SingleNodeLauncher(debug=False))
|
67
66
|
p.script_dir = script_dir
|
68
67
|
_run_tests(p)
|
69
68
|
|
@@ -3,7 +3,6 @@ from unittest import mock
|
|
3
3
|
|
4
4
|
import pytest
|
5
5
|
|
6
|
-
from parsl.channels import LocalChannel
|
7
6
|
from parsl.providers import PBSProProvider
|
8
7
|
|
9
8
|
|
@@ -12,10 +11,9 @@ def test_submit_script_basic(tmp_path):
|
|
12
11
|
"""Test slurm resources table"""
|
13
12
|
|
14
13
|
provider = PBSProProvider(
|
15
|
-
queue="debug"
|
14
|
+
queue="debug"
|
16
15
|
)
|
17
16
|
provider.script_dir = tmp_path
|
18
|
-
provider.channel.script_dir = tmp_path
|
19
17
|
job_id = str(random.randint(55000, 59000))
|
20
18
|
provider.execute_wait = mock.Mock(spec=PBSProProvider.execute_wait)
|
21
19
|
provider.execute_wait.return_value = (0, job_id, "")
|
@@ -4,7 +4,6 @@ from unittest import mock
|
|
4
4
|
|
5
5
|
import pytest
|
6
6
|
|
7
|
-
from parsl.channels import LocalChannel
|
8
7
|
from parsl.providers import SlurmProvider
|
9
8
|
|
10
9
|
|
@@ -13,10 +12,9 @@ def test_submit_script_basic(tmp_path):
|
|
13
12
|
"""Test slurm resources table"""
|
14
13
|
|
15
14
|
provider = SlurmProvider(
|
16
|
-
partition="debug"
|
15
|
+
partition="debug"
|
17
16
|
)
|
18
17
|
provider.script_dir = tmp_path
|
19
|
-
provider.channel.script_dir = tmp_path
|
20
18
|
job_id = str(random.randint(55000, 59000))
|
21
19
|
provider.execute_wait = mock.MagicMock(spec=SlurmProvider.execute_wait)
|
22
20
|
provider.execute_wait.return_value = (0, f"Submitted batch job {job_id}", "")
|
@@ -3,7 +3,6 @@ import threading
|
|
3
3
|
import pytest
|
4
4
|
|
5
5
|
import parsl
|
6
|
-
from parsl.channels import LocalChannel
|
7
6
|
from parsl.config import Config
|
8
7
|
from parsl.executors import HighThroughputExecutor
|
9
8
|
from parsl.launchers import SimpleLauncher
|
@@ -43,7 +42,6 @@ def test_one_block(tmpd_cwd):
|
|
43
42
|
one app is invoked. this is a regression test.
|
44
43
|
"""
|
45
44
|
oneshot_provider = OneShotLocalProvider(
|
46
|
-
channel=LocalChannel(),
|
47
45
|
init_blocks=0,
|
48
46
|
min_blocks=0,
|
49
47
|
max_blocks=10,
|
@@ -5,7 +5,6 @@ import pytest
|
|
5
5
|
|
6
6
|
import parsl
|
7
7
|
from parsl import File, python_app
|
8
|
-
from parsl.channels import LocalChannel
|
9
8
|
from parsl.config import Config
|
10
9
|
from parsl.executors import HighThroughputExecutor
|
11
10
|
from parsl.launchers import SingleNodeLauncher
|
@@ -29,7 +28,6 @@ def local_config():
|
|
29
28
|
max_workers_per_node=1,
|
30
29
|
encrypted=True,
|
31
30
|
provider=LocalProvider(
|
32
|
-
channel=LocalChannel(),
|
33
31
|
init_blocks=0,
|
34
32
|
max_blocks=_max_blocks,
|
35
33
|
min_blocks=_min_blocks,
|
@@ -4,7 +4,6 @@ import pytest
|
|
4
4
|
|
5
5
|
import parsl
|
6
6
|
from parsl import File, python_app
|
7
|
-
from parsl.channels import LocalChannel
|
8
7
|
from parsl.config import Config
|
9
8
|
from parsl.executors import HighThroughputExecutor
|
10
9
|
from parsl.launchers import SingleNodeLauncher
|
@@ -26,7 +25,6 @@ def local_config():
|
|
26
25
|
max_workers_per_node=1,
|
27
26
|
encrypted=True,
|
28
27
|
provider=LocalProvider(
|
29
|
-
channel=LocalChannel(),
|
30
28
|
init_blocks=0,
|
31
29
|
max_blocks=_max_blocks,
|
32
30
|
min_blocks=_min_blocks,
|
@@ -5,7 +5,6 @@ import pytest
|
|
5
5
|
|
6
6
|
import parsl
|
7
7
|
from parsl import File, python_app
|
8
|
-
from parsl.channels import LocalChannel
|
9
8
|
from parsl.config import Config
|
10
9
|
from parsl.executors import HighThroughputExecutor
|
11
10
|
from parsl.jobs.states import TERMINAL_STATES, JobState
|
@@ -31,7 +30,6 @@ def local_config():
|
|
31
30
|
encrypted=True,
|
32
31
|
launch_cmd="sleep inf",
|
33
32
|
provider=LocalProvider(
|
34
|
-
channel=LocalChannel(),
|
35
33
|
init_blocks=1,
|
36
34
|
max_blocks=_max_blocks,
|
37
35
|
min_blocks=_min_blocks,
|
@@ -4,7 +4,6 @@ import threading
|
|
4
4
|
import pytest
|
5
5
|
|
6
6
|
import parsl
|
7
|
-
from parsl.channels import LocalChannel
|
8
7
|
from parsl.config import Config
|
9
8
|
from parsl.executors import HighThroughputExecutor
|
10
9
|
from parsl.launchers import SimpleLauncher
|
@@ -47,7 +46,6 @@ def test_shutdown_scalein_blocks(tmpd_cwd, try_assert):
|
|
47
46
|
scaled in at DFK shutdown.
|
48
47
|
"""
|
49
48
|
accumulating_provider = AccumulatingLocalProvider(
|
50
|
-
channel=LocalChannel(),
|
51
49
|
init_blocks=BLOCK_COUNT,
|
52
50
|
min_blocks=0,
|
53
51
|
max_blocks=0,
|
@@ -6,7 +6,6 @@ import pytest
|
|
6
6
|
import zmq
|
7
7
|
|
8
8
|
import parsl
|
9
|
-
from parsl.channels import LocalChannel
|
10
9
|
from parsl.config import Config
|
11
10
|
from parsl.executors import HighThroughputExecutor
|
12
11
|
from parsl.launchers import SimpleLauncher
|
@@ -24,7 +23,6 @@ def fresh_config():
|
|
24
23
|
cores_per_worker=1,
|
25
24
|
encrypted=False,
|
26
25
|
provider=LocalProvider(
|
27
|
-
channel=LocalChannel(),
|
28
26
|
init_blocks=0,
|
29
27
|
min_blocks=0,
|
30
28
|
max_blocks=0,
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import pytest
|
2
|
+
|
3
|
+
from parsl.utils import execute_wait
|
4
|
+
|
5
|
+
|
6
|
+
@pytest.mark.local
|
7
|
+
def test_env():
|
8
|
+
''' Regression testing for issue #27
|
9
|
+
'''
|
10
|
+
|
11
|
+
rc, stdout, stderr = execute_wait("env", 1)
|
12
|
+
|
13
|
+
stdout = stdout.split('\n')
|
14
|
+
x = [s for s in stdout if s.startswith("PATH=")]
|
15
|
+
assert x, "PATH not found"
|
16
|
+
|
17
|
+
x = [s for s in stdout if s.startswith("HOME=")]
|
18
|
+
assert x, "HOME not found"
|
19
|
+
|
20
|
+
|
21
|
+
@pytest.mark.local
|
22
|
+
def test_large_output_2210():
|
23
|
+
"""Regression test for #2210.
|
24
|
+
execute_wait was hanging if the specified command gave too
|
25
|
+
much output, due to a race condition between process exiting and
|
26
|
+
pipes filling up.
|
27
|
+
"""
|
28
|
+
|
29
|
+
# this will output 128kb of stdout
|
30
|
+
execute_wait("yes | dd count=128 bs=1024", walltime=60)
|
31
|
+
|
32
|
+
# if this test fails, execute_wait should raise a timeout
|
33
|
+
# exception.
|
34
|
+
|
35
|
+
# The contents out the output is not verified by this test
|
parsl/utils.py
CHANGED
@@ -458,3 +458,38 @@ def sanitize_dns_subdomain_rfc1123(raw_string: str) -> str:
|
|
458
458
|
raise ValueError(f"Sanitized DNS subdomain is empty for input '{raw_string}'")
|
459
459
|
|
460
460
|
return sanitized
|
461
|
+
|
462
|
+
|
463
|
+
def execute_wait(cmd: str, walltime: Optional[int] = None) -> Tuple[int, str, str]:
|
464
|
+
''' Synchronously execute a commandline string on the shell.
|
465
|
+
|
466
|
+
Args:
|
467
|
+
- cmd (string) : Commandline string to execute
|
468
|
+
- walltime (int) : walltime in seconds
|
469
|
+
|
470
|
+
Returns:
|
471
|
+
- retcode : Return code from the execution
|
472
|
+
- stdout : stdout string
|
473
|
+
- stderr : stderr string
|
474
|
+
'''
|
475
|
+
try:
|
476
|
+
logger.debug("Creating process with command '%s'", cmd)
|
477
|
+
proc = subprocess.Popen(
|
478
|
+
cmd,
|
479
|
+
stdout=subprocess.PIPE,
|
480
|
+
stderr=subprocess.PIPE,
|
481
|
+
shell=True,
|
482
|
+
preexec_fn=os.setpgrp
|
483
|
+
)
|
484
|
+
logger.debug("Created process with pid %s. Performing communicate", proc.pid)
|
485
|
+
(stdout, stderr) = proc.communicate(timeout=walltime)
|
486
|
+
retcode = proc.returncode
|
487
|
+
logger.debug("Process %s returned %s", proc.pid, proc.returncode)
|
488
|
+
|
489
|
+
except Exception:
|
490
|
+
logger.exception(f"Execution of command failed:\n{cmd}")
|
491
|
+
raise
|
492
|
+
else:
|
493
|
+
logger.debug("Execution of command in process %s completed normally", proc.pid)
|
494
|
+
|
495
|
+
return (retcode, stdout.decode("utf-8"), stderr.decode("utf-8"))
|
parsl/version.py
CHANGED
@@ -20,7 +20,8 @@ from parsl.executors.high_throughput.errors import ManagerLost, VersionMismatch
|
|
20
20
|
from parsl.executors.high_throughput.manager_record import ManagerRecord
|
21
21
|
from parsl.executors.high_throughput.manager_selector import ManagerSelector
|
22
22
|
from parsl.monitoring.message_type import MessageType
|
23
|
-
from parsl.monitoring.radios import MonitoringRadioSender
|
23
|
+
from parsl.monitoring.radios.base import MonitoringRadioSender
|
24
|
+
from parsl.monitoring.radios.zmq import ZMQRadioSender
|
24
25
|
from parsl.process_loggers import wrap_with_logs
|
25
26
|
from parsl.serialize import serialize as serialize_object
|
26
27
|
from parsl.utils import setproctitle
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: parsl
|
3
|
-
Version: 2024.12.
|
3
|
+
Version: 2024.12.16
|
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.12.
|
6
|
+
Download-URL: https://github.com/Parsl/parsl/archive/2024.12.16.tar.gz
|
7
7
|
Author: The Parsl Team
|
8
8
|
Author-email: parsl@googlegroups.com
|
9
9
|
License: Apache 2.0
|