|
56 | 56 | "--mpi-launcher={mpi_launcher} "
|
57 | 57 | "--available-accelerators {accelerators}")
|
58 | 58 |
|
| 59 | +DEFAULT_INTERCHANGE_LAUNCH_CMD = "interchange.py" |
| 60 | + |
59 | 61 | GENERAL_HTEX_PARAM_DOCS = """provider : :class:`~parsl.providers.base.ExecutionProvider`
|
60 | 62 | Provider to access computation resources. Can be one of :class:`~parsl.providers.aws.aws.EC2Provider`,
|
61 | 63 | :class:`~parsl.providers.cobalt.cobalt.Cobalt`,
|
|
76 | 78 | cores_per_worker, nodes_per_block, heartbeat_period ,heartbeat_threshold, logdir). For example:
|
77 | 79 | launch_cmd="process_worker_pool.py {debug} -c {cores_per_worker} --task_url={task_url} --result_url={result_url}"
|
78 | 80 |
|
| 81 | + interchange_launch_cmd : str |
| 82 | + Custom command line string to launch the interchange process from the executor. If undefined, |
| 83 | + the executor will use the default "interchange.py" command. |
| 84 | +
|
79 | 85 | address : string
|
80 | 86 | An address to connect to the main Parsl process which is reachable from the network in which
|
81 | 87 | workers will be running. This field expects an IPv4 address (xxx.xxx.xxx.xxx).
|
@@ -231,6 +237,7 @@ def __init__(self,
|
231 | 237 | label: str = 'HighThroughputExecutor',
|
232 | 238 | provider: ExecutionProvider = LocalProvider(),
|
233 | 239 | launch_cmd: Optional[str] = None,
|
| 240 | + interchange_launch_cmd: Optional[str] = None, |
234 | 241 | address: Optional[str] = None,
|
235 | 242 | worker_ports: Optional[Tuple[int, int]] = None,
|
236 | 243 | worker_port_range: Optional[Tuple[int, int]] = (54000, 55000),
|
@@ -329,6 +336,10 @@ def __init__(self,
|
329 | 336 | launch_cmd = DEFAULT_LAUNCH_CMD
|
330 | 337 | self.launch_cmd = launch_cmd
|
331 | 338 |
|
| 339 | + if not interchange_launch_cmd: |
| 340 | + interchange_launch_cmd = DEFAULT_INTERCHANGE_LAUNCH_CMD |
| 341 | + self.interchange_launch_cmd = interchange_launch_cmd |
| 342 | + |
332 | 343 | radio_mode = "htex"
|
333 | 344 |
|
334 | 345 | def _warn_deprecated(self, old: str, new: str):
|
@@ -544,7 +555,7 @@ def _start_local_interchange_process(self) -> None:
|
544 | 555 |
|
545 | 556 | config_pickle = pickle.dumps(interchange_config)
|
546 | 557 |
|
547 |
| - self.interchange_proc = subprocess.Popen(b"interchange.py", stdin=subprocess.PIPE) |
| 558 | + self.interchange_proc = subprocess.Popen(self.interchange_launch_cmd.encode("utf-8"), stdin=subprocess.PIPE) |
548 | 559 | stdin = self.interchange_proc.stdin
|
549 | 560 | assert stdin is not None, "Popen should have created an IO object (vs default None) because of PIPE mode"
|
550 | 561 |
|
|
0 commit comments