parsl 2024.11.25__py3-none-any.whl → 2024.12.9__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/ASPIRE1.py +0 -1
- 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/executor.py +15 -2
- parsl/executors/high_throughput/interchange.py +2 -1
- parsl/executors/high_throughput/zmq_pipes.py +13 -4
- 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 +4 -13
- parsl/providers/grid_engine/grid_engine.py +3 -9
- parsl/providers/local/local.py +6 -23
- parsl/providers/lsf/lsf.py +3 -18
- parsl/providers/pbspro/pbspro.py +3 -10
- parsl/providers/slurm/slurm.py +4 -20
- parsl/providers/torque/torque.py +2 -10
- 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 -3
- parsl/tests/configs/htex_local_intask_staging.py +0 -2
- parsl/tests/configs/htex_local_rsync_staging.py +0 -2
- parsl/tests/configs/local_threads_monitoring.py +0 -1
- 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/manual_tests/test_udp_simple.py +0 -1
- 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 -3
- parsl/tests/test_monitoring/test_stdouterr.py +0 -1
- 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.11.25.data → parsl-2024.12.9.data}/scripts/interchange.py +2 -1
- {parsl-2024.11.25.dist-info → parsl-2024.12.9.dist-info}/METADATA +2 -2
- {parsl-2024.11.25.dist-info → parsl-2024.12.9.dist-info}/RECORD +71 -73
- parsl/channels/__init__.py +0 -4
- parsl/channels/base.py +0 -82
- parsl/channels/errors.py +0 -30
- parsl/channels/local/local.py +0 -102
- 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.11.25.data → parsl-2024.12.9.data}/scripts/exec_parsl_function.py +0 -0
- {parsl-2024.11.25.data → parsl-2024.12.9.data}/scripts/parsl_coprocess.py +0 -0
- {parsl-2024.11.25.data → parsl-2024.12.9.data}/scripts/process_worker_pool.py +0 -0
- {parsl-2024.11.25.dist-info → parsl-2024.12.9.dist-info}/LICENSE +0 -0
- {parsl-2024.11.25.dist-info → parsl-2024.12.9.dist-info}/WHEEL +0 -0
- {parsl-2024.11.25.dist-info → parsl-2024.12.9.dist-info}/entry_points.txt +0 -0
- {parsl-2024.11.25.dist-info → parsl-2024.12.9.dist-info}/top_level.txt +0 -0
@@ -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.
|
3
|
+
Version: 2024.12.9
|
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.
|
6
|
+
Download-URL: https://github.com/Parsl/parsl/archive/2024.12.09.tar.gz
|
7
7
|
Author: The Parsl Team
|
8
8
|
Author-email: parsl@googlegroups.com
|
9
9
|
License: Apache 2.0
|