Skip to content

Commit 46510a9

Browse files
committed
Better version check for Slurm
1 parent e7fcd19 commit 46510a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reframe/core/launchers/mpi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ def __init__(self):
2020
self.use_cpus_per_task = True
2121
try:
2222
out = osext.run_command('srun --version')
23-
match = re.search('slurm (\d+)\.(\d+)\.(\d+)', out.stdout)
23+
match = re.search(r'slurm(-wlm)? (\d+)\.(\d+)\.(\d+)', out.stdout)
2424
if match:
2525
# We cannot pass to semver strings like 22.05.1 directly
2626
# because it is not a valid version string for semver. We
2727
# need to remove all the leading zeros.
2828
slurm_version = (
2929
semver.VersionInfo(
30-
match.group(1), match.group(2), match.group(3)
30+
match.group(2), match.group(3), match.group(4)
3131
)
3232
)
3333
if slurm_version < semver.VersionInfo(22, 5, 0):

0 commit comments

Comments
 (0)