Skip to content

Commit 41d4ac2

Browse files
authored
Merge pull request #2946 from UeliDeSchwert/fix-2944-oarstat
[bugfix] Update OAR scheduler backend to accept the `Job_Id:` syntax
2 parents cee67de + 1fa9aaa commit 41d4ac2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

reframe/core/schedulers/oar.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,16 @@ def poll(self, *jobs):
135135
jobinfo = {}
136136

137137
# Typical oarstat -fj <job_id> output:
138+
#
138139
# https://github.com/oar-team/oar/blob/0fccc4fc3bb86ee935ce58effc5aec514a3e155d/sources/core/qfunctions/oarstat#L310
140+
#
141+
# Update 2023-07: oarstat now supports multiple types of output,
142+
# once containing `id: XXX` and once containing `Job_Id: XXX`
143+
#
144+
# https://github.com/oar-team/oar/blob/37db5384c7827cca2d334e5248172bb700015434/sources/core/qfunctions/oarstat#L332
139145
job_raw_info = completed.stdout
140146
jobid_match = re.search(
141-
r'^Job_Id:\s*(?P<jobid>\S+)', completed.stdout, re.MULTILINE
147+
r'^(Job_Id|id):\s*(?P<jobid>\S+)', completed.stdout, re.MULTILINE
142148
)
143149
if jobid_match:
144150
jobid = jobid_match.group('jobid')

0 commit comments

Comments
 (0)