From 2d748efa3a42e637e09d581232b1f3c08ae1b313 Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Thu, 25 May 2023 12:07:56 +0200 Subject: [PATCH] Put executor name and block ID in provider submit script filenames (#2710) Prior to this PR, submit script filenames looked like this: parsl.localprovider.1684151066.651144.sh After this PR, submit script filenames look like this: parsl.htex_Local.block-0.1684154520.747874.sh This PR fixes feature request issue #2692, which requests that the filename contain more block identifying context, for correlation with other block-related log files. Also adds some more uniqueness which is relevant to issue #1122 and addresses the naming collisions I have experienced in that context. --- parsl/executors/status_handling.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parsl/executors/status_handling.py b/parsl/executors/status_handling.py index 4215e1fc9a..7998ceb582 100644 --- a/parsl/executors/status_handling.py +++ b/parsl/executors/status_handling.py @@ -183,7 +183,9 @@ def scale_out(self, blocks: int = 1) -> List[str]: def _launch_block(self, block_id: str) -> Any: launch_cmd = self._get_launch_command(block_id) - job_id = self.provider.submit(launch_cmd, 1) + job_name = f"parsl.{self.label}.block-{block_id}" + logger.debug("Submitting to provider with job_name %s", job_name) + job_id = self.provider.submit(launch_cmd, 1, job_name) if job_id: logger.debug(f"Launched block {block_id} on executor {self.label} with job ID {job_id}") else: