From f756e23f297fe64582f1c2e212b35b49e7ea97df Mon Sep 17 00:00:00 2001 From: Mahendra Paipuri Date: Mon, 6 Dec 2021 20:54:50 +0100 Subject: [PATCH] Improve OAR preamble commands Due to a bug in OAR scheduler we had to give full path to stdout and stderr files and change working directory to stagedir in preamble commands. This issue has been fixed at upstream OAR and so we remove these unnecessary full paths in preamble --- reframe/core/schedulers/oar.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/reframe/core/schedulers/oar.py b/reframe/core/schedulers/oar.py index b4431b1fa6..b327da94af 100644 --- a/reframe/core/schedulers/oar.py +++ b/reframe/core/schedulers/oar.py @@ -73,8 +73,8 @@ def emit_preamble(self, job): # avoid writing them in the working dir preamble = [ self._format_option(f'-n "{job.name}"'), - self._format_option(f'-O {os.path.join(job.workdir, job.stdout)}'), - self._format_option(f'-E {os.path.join(job.workdir, job.stderr)}'), + self._format_option(f'-O {job.stdout}'), + self._format_option(f'-E {job.stderr}'), ] if job.time_limit is not None: @@ -98,14 +98,10 @@ def emit_preamble(self, job): else: preamble.append(self._format_option(opt)) - # OAR starts the job in the home directory by default - preamble.append(f'cd {job.workdir}') return preamble def submit(self, job): - # For some reason OAR job manager says that job launching dir is - # working dir of the repo and not stage dir. A workaround is to give - # full path of script to oarsub + # OAR batch submission mode needs full path to the job script job_script_fullpath = os.path.join(job.workdir, job.script_filename) # OAR needs -S to submit job in batch mode