Skip to content
Snippets Groups Projects
Commit 59c9e142 authored by Philipp Schmidt's avatar Philipp Schmidt
Browse files

Apply degressive SLURM priority only to non-exfel partitions

parent 515400cb
No related branches found
No related tags found
1 merge request!655Launch jobs with variable nice value
...@@ -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
...@@ -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'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment