From fcf0c5c81060df2f5ecfbfd9f3815f56a797d982 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Fri, 20 Sep 2024 18:40:19 -0700 Subject: [PATCH] Better job names --- .../spades/pipeline/spades_pipeline/commands_parser.py | 3 ++- .../pipeline/spades_pipeline/executors/executor_slurm.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/projects/spades/pipeline/spades_pipeline/commands_parser.py b/src/projects/spades/pipeline/spades_pipeline/commands_parser.py index 2d1610820..d6281b07b 100644 --- a/src/projects/spades/pipeline/spades_pipeline/commands_parser.py +++ b/src/projects/spades/pipeline/spades_pipeline/commands_parser.py @@ -77,7 +77,8 @@ def to_dict(self): "del_after": self.del_after} def generate_job_uuid(self): - return self.STAGE.replace(' ', '_') + "_" + \ + return ('hpcSPAdes_' if self.mpi_support else 'SPAdes_') + \ + self.STAGE.replace(' ', '_') + "_" + \ ''.join([random.choice(string.ascii_uppercase + string.digits) for k in range(32)]) diff --git a/src/projects/spades/pipeline/spades_pipeline/executors/executor_slurm.py b/src/projects/spades/pipeline/spades_pipeline/executors/executor_slurm.py index fa80813ef..6702ec1c1 100644 --- a/src/projects/spades/pipeline/spades_pipeline/executors/executor_slurm.py +++ b/src/projects/spades/pipeline/spades_pipeline/executors/executor_slurm.py @@ -53,7 +53,7 @@ def get_MPI_sh_preambula(self): return preambula def get_sh_command(self, command, prev_id, mpi): - cmd_str = "#=== STAGE " + command.STAGE + ("(MPI) ===\n" if mpi else "(not MPI) ===\n") + cmd_str = "#=== STAGE " + command.STAGE + (" (MPI) ===\n" if mpi else " (not MPI) ===\n") cmd_str += "CMD=\"" + command.mpi_sh_str() + "\"\n" cmd_str += "SID1=$(" + self.grid_engine_submit_command + " $SLURM_ARGS " + \ self.grid_engine_job_name.format(JOB_NAME=command.job_uuid) + " $LOG_OUT $ERR_OUT "