fix slurm runner for real user setups

for finished jobs (state DONE) the SLURM runner modifies
the job's stderr file. for real user setups this does not
work because the job dir is still owned by the real user.

solution just add a reclaim ownnership before writing
This commit is contained in:
Matthias Bernt
2021-02-17 22:15:29 +01:00
parent f1ec1b6459
commit 6117d0cbe3
+1
View File
@@ -153,6 +153,7 @@ class SlurmJobRunner(DRMAAJobRunner):
self.work_queue.put((self.fail_job, ajs))
return
if drmaa_state == self.drmaa_job_states.DONE:
ajs.job_wrapper.reclaim_ownership()
with open(ajs.error_file) as rfh:
_remove_spurious_top_lines(rfh, ajs)
with open(ajs.error_file, 'r+') as f: