Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
pycalibration
Commits
59c9e142
Commit
59c9e142
authored
2 years ago
by
Philipp Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Apply degressive SLURM priority only to non-exfel partitions
parent
515400cb
No related branches found
No related tags found
1 merge request
!655
Launch jobs with variable nice value
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_webservice.py
+7
-0
7 additions, 0 deletions
tests/test_webservice.py
webservice/webservice.py
+3
-0
3 additions, 0 deletions
webservice/webservice.py
with
10 additions
and
0 deletions
tests/test_webservice.py
+
7
−
0
View file @
59c9e142
...
@@ -214,3 +214,10 @@ async def test_get_slurm_nice_fails(fp):
...
@@ -214,3 +214,10 @@ async def test_get_slurm_nice_fails(fp):
assert
await
get_slurm_nice
(
'
upex-higher
'
,
'
SPB
'
,
'
202201
'
)
==
0
assert
await
get_slurm_nice
(
'
upex-higher
'
,
'
SPB
'
,
'
202201
'
)
==
0
# exfel is special
fp
.
register
(
[
'
squeue
'
,
'
-h
'
,
'
-o
'
,
'
%.20j
'
,
'
-p
'
,
'
exfel
'
,
'
--me
'
],
stdout
=
'
\n
'
.
join
([
f
'
correct_SPB_
{
i
}
'
for
i
in
range
(
10
)]),
returncode
=
0
)
assert
await
get_slurm_nice
(
'
exfel
'
,
'
SPB
'
,
'
202201
'
)
==
0
This diff is collapsed.
Click to expand it.
webservice/webservice.py
+
3
−
0
View file @
59c9e142
...
@@ -694,6 +694,9 @@ async def get_slurm_nice(partition: str, instrument: str,
...
@@ -694,6 +694,9 @@ async def get_slurm_nice(partition: str, instrument: str,
:return: Nice value to be passed to sbatch --nice
:return: Nice value to be passed to sbatch --nice
"""
"""
if
partition
==
'
exfel
'
:
return
0
# Don't apply degressive priority on exfel.
# List all names for jobs running in the specified partition.
# List all names for jobs running in the specified partition.
returncode
,
job_names
=
await
run_proc_async
(
returncode
,
job_names
=
await
run_proc_async
(
[
'
squeue
'
,
'
-h
'
,
'
-o
'
,
'
%.20j
'
,
'
-p
'
,
partition
,
'
--me
'
])
[
'
squeue
'
,
'
-h
'
,
'
-o
'
,
'
%.20j
'
,
'
-p
'
,
partition
,
'
--me
'
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment