Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ProfiT-HPC
aggregator
Commits
8d6ca798
Commit
8d6ca798
authored
Jun 03, 2020
by
Azat Khuziyakhmetov
Browse files
added the exit code to job's export info
parent
af4f1a2c
Changes
1
Show whitespace changes
Inline
Side-by-side
postexec/exportjobinfo.py
View file @
8d6ca798
...
...
@@ -37,6 +37,11 @@ _info = {
"lsf"
:
"RUN_TIME"
,
"slurm"
:
"Elapsed"
,
"regex"
:
"([0-9]+)"
},
"exit_code"
:
{
"rename"
:
"exit_code"
,
"type"
:
MType
.
INT
,
"lsf"
:
"EXIT_CODE"
,
"slurm"
:
"ExitCode"
,
"regex"
:
"([0-9]+):"
},
"requested_time"
:
{
"rename"
:
"requested_time"
,
"type"
:
MType
.
INT
,
"lsf"
:
"RUNTIMELIMIT"
,
...
...
@@ -213,6 +218,7 @@ def slurm_fetch_alloc_info(job_id):
def
parse_job_info_slurm
(
raw_data
,
alloc_info
):
time_fields
=
[
"submit_time"
,
"start_time"
,
"end_time"
]
dur_fields
=
[
"run_time"
,
"requested_time"
]
reg_fields
=
[
"exit_code"
]
job_info
=
{}
for
m
,
par
in
_info
.
items
():
...
...
@@ -229,6 +235,10 @@ def parse_job_info_slurm(raw_data, alloc_info):
else
:
job_info
[
f
]
=
date_to_timestamp
(
job_info
[
f
],
"%Y-%m-%dT%H:%M:%S"
)
# regexes
for
f
in
reg_fields
:
job_info
[
f
]
=
get_by_regex
(
job_info
[
f
],
_info
[
f
][
"regex"
])
# slurm times to seconds
for
f
in
dur_fields
:
job_info
[
f
]
=
slurm_time_to_sec
(
job_info
[
f
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment