From d746249d5424f60c73468ef03e6f6ba4847eb772 Mon Sep 17 00:00:00 2001 From: Felix Tomski <tomski@itc.rwth-aachen.de> Date: Tue, 30 May 2023 14:07:15 +0200 Subject: [PATCH] Fix lmod errors in sbatch mode and remove srun output --- core/utility/executor.py | 6 +++--- utility/.gitlab/.template.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/utility/executor.py b/core/utility/executor.py index f00ea57..7c60191 100644 --- a/core/utility/executor.py +++ b/core/utility/executor.py @@ -68,7 +68,7 @@ class Executor(ABC): class Slurm_Executor(Executor, ABC): - srun_path = "srun --export=NONE" # "/usr/local_host/bin/srun" + srun_path = "srun -Q --export=NONE" # "/usr/local_host/bin/srun" sbatch_path = "sbatch" # "/usr/local_host/bin/sbatch" salloc_path = "/opt/slurm/current/bin/salloc" scancel_path = "scancel" @@ -109,7 +109,7 @@ class Slurm_Executor(Executor, ABC): mapping = json.loads(file.read()) self.simple_job_id = mapping[get_cenv("CI_JOB_ID")] return - except (IOError, KeyError): + except (IOError, KeyError, json.decoder.JSONDecodeError): self.simple_job_id = None logging.warning(f'Could not read internal Slurm jobid from mapping file') @@ -171,7 +171,7 @@ class Slurm_Executor(Executor, ABC): def run_batched(self, params="", wrapper_add="", script=""): sbatch_out = self.execute(helper_script=f"{self.job.scripts_path}/xPipeHelper.sh", allocator=self.get_sbatch_cmd(), - params=params, + params=f'--export=NONE {params}', wrapper_add=wrapper_add, target_script=script, main_script=True, run_async=True, diff --git a/utility/.gitlab/.template.yml b/utility/.gitlab/.template.yml index f7a50ce..b44c550 100644 --- a/utility/.gitlab/.template.yml +++ b/utility/.gitlab/.template.yml @@ -35,7 +35,7 @@ default: variables: SLURM_PARAM_TIMELIMIT: "-t 10:00" - SLURM_PARAM_PARTITION: "-p c18m_low" + SLURM_PARAM_PARTITION: "-p devel" SLURM_PARAM_CPUS: "-c 1" GIT_STRATEGY: clone -- GitLab