Skip to content
Snippets Groups Projects
Commit 8903fb12 authored by Adrian Schmitz's avatar Adrian Schmitz
Browse files

Resolve "Move SLURM parameters to call"

parent 2aed5eae
Branches
Tags
No related merge requests found
......@@ -249,6 +249,17 @@ class Sbatch(Slurm):
self.slurm_output_dir = f'{self.job.clone_path}/slurm_output'
self.slurm_output_file = f'{self.slurm_output_dir}/so_{self.job.jobid}.txt'
def get_batch_properties(self, batch_script):
# cmd_out = ""
if self.job.down_scoping:
stdout = self.job.execute(f"{srun_path} /usr/bin/cat {batch_script}", '',
f"{self.job.driver_path}/core/scripts/runHelper.sh", stdout=subprocess.PIPE,
text=True).stdout
cmd_out = ' '.join([l.split()[1] for l in stdout.split("\n") if l.startswith('#SBATCH')])
else:
with open(batch_script, 'r') as f:
cmd_out = ' '.join([l.split()[1] for l in f.readlines() if l.startswith('#SBATCH')])
return cmd_out
def get_combiner_script(self):
self._combiner_script = f"{self.job.driver_path}/core/scripts/pipeHelper.sh"
......@@ -256,7 +267,9 @@ class Sbatch(Slurm):
def get_run_properties(self):
self._run_properties = f'{sbatch_path} --wait --output={self.slurm_output_file} {self.job.get_parameters()}'
batch_script = f'{self.job.clone_path}/{get_cenv("BATCH_SCRIPT")}'
self._run_properties = f'{sbatch_path} --wait {self.get_batch_properties(batch_script)} ' \
f'{self.job.get_parameters()} --output={self.slurm_output_file}'
return self._run_properties
def custom_run_setup(self, **kwargs):
......
import logging
name = 'Aixcellenz CI Driver'
version = '0.3.0'
version = '0.3.1'
debug = False
stdout_logging = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment