diff --git a/core/modes/__init__.py b/core/modes/__init__.py index 38a53283b56c65336cdc76b82940c9767ab6a56c..948c9477f986188d489c8463bb8a1ca79c1e8eb5 100644 --- a/core/modes/__init__.py +++ b/core/modes/__init__.py @@ -252,7 +252,7 @@ class Slurm(ModeBase): def get_run_properties(self): self.set_srun_cmd() self.set_slurm_env() - return self._run_properties + f' {self.job.shell_path} -l' + return f'{srun_path} ' + self._run_properties + f' {self.job.shell_path} -l' def get_run_script(self): self._run_script = self.job.exec_script @@ -579,12 +579,8 @@ class SingleSlurmJobAcrossStages(Slurm): def get_run_properties(self): if not os.path.isfile(self.slurm_jobid_file): - num_cores = get_cenv("SRUN_CPUS_PER_TASK") - if not num_cores: - num_cores = get_cenv('SLURM_ENV_SRUN_CPUS_PER_TASK', '1') - _timelimit = get_cenv('SLURM_TIMELIMIT', '15:00') - salloc_command = ['/opt/slurm/current/bin/salloc', f'--cpus-per-task={num_cores}', f'--time={_timelimit}', - '--no-shell', f'--job-name=CI_{self.job.pipeline_id}'] + salloc_command = ['/opt/slurm/current/bin/salloc', '--no-shell', f'--job-name=CI_{self.job.pipeline_id}'] + \ + self.job.get_parameters().split(" ") salloc_command.extend(self.slurm_vars) salloc_out = self.job.execute(' '.join(salloc_command), '', f"{self.job.driver_path}/core/scripts/runHelper.sh", @@ -619,7 +615,7 @@ class SingleSlurmJobAcrossStages(Slurm): # self._custom_env = self.get_env_for_single_slurm_job(self.id_vars) # self._custom_env['SLURM_JOB_ID'] = self.slurm_job_id if not additional_env.__sizeof__() == 0: - self._run_properties.insert(2, f'--export=' + ",".join(additional_env)) + self._run_properties.insert(1, f'--export=' + ",".join(additional_env)) self._run_properties.insert(1, f'--jobid={self.slurm_job_id}') self._run_properties = ' '.join(self._run_properties) return self._run_properties