Skip to content

Commit 07ceabd

Browse files
committed
slurm cannot oversubscribe CPUs
limit cluster tests to 2, since that's what we get on github actions
1 parent fb8b242 commit 07ceabd

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

ci/slurm/slurm.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,7 @@ SlurmdLogFile=/var/log/slurm-llnl/slurmd.log
4747
#
4848
#
4949
# COMPUTE NODES
50-
NodeName=localhost NodeHostName=localhost NodeAddr=127.0.0.1 CPUs=3 State=UNKNOWN
50+
# Note: CPUs apparently cannot be oversubscribed
51+
# this can only run where at least 2 CPUs are available
52+
NodeName=localhost NodeHostName=localhost NodeAddr=127.0.0.1 CPUs=2 State=UNKNOWN
5153
PartitionName=part Nodes=localhost Default=YES MaxTime=INFINITE State=UP OverSubscribe=YES

ipyparallel/tests/test_cluster.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import asyncio
22
import os
3-
import shutil
43
import signal
54
import sys
65
import time
@@ -84,7 +83,7 @@ async def test_start_stop_engines(Cluster, engine_launcher_class):
8483
cluster = Cluster(engine_launcher_class=engine_launcher_class)
8584
await cluster.start_controller()
8685

87-
n = 3
86+
n = 2
8887
engine_set_id = await cluster.start_engines(n)
8988
assert engine_set_id in cluster._engine_sets
9089
engine_set = cluster._engine_sets[engine_set_id]
@@ -123,10 +122,10 @@ async def test_start_stop_cluster(Cluster, engine_launcher_class):
123122
async def test_signal_engines(request, Cluster, engine_launcher_class):
124123
cluster = Cluster(engine_launcher_class=engine_launcher_class)
125124
await cluster.start_controller()
126-
engine_set_id = await cluster.start_engines(n=3)
125+
engine_set_id = await cluster.start_engines(n=2)
127126
rc = await cluster.connect_client()
128127
request.addfinalizer(rc.close)
129-
rc.wait_for_engines(3)
128+
rc.wait_for_engines(2)
130129
# seems to be a problem if we start too soon...
131130
await asyncio.sleep(1)
132131
# ensure responsive
@@ -153,7 +152,7 @@ async def test_signal_engines(request, Cluster, engine_launcher_class):
153152

154153

155154
async def test_restart_engines(Cluster, engine_launcher_class):
156-
n = 3
155+
n = 2
157156
async with Cluster(engine_launcher_class=engine_launcher_class, n=n) as rc:
158157
cluster = rc.cluster
159158
engine_set_id = next(iter(cluster._engine_sets))

0 commit comments

Comments
 (0)