Skip to content

Commit e67e696

Browse files
Rextilne
authored andcommitted
Fix CentOS6 slurm test
* Change initial queue size for CentOS6 slurm test from 2 to 0 so test can run without waiting for a scaledown Signed-off-by: Rex <[email protected]>
1 parent 50085a0 commit e67e696

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

tests/integration-tests/tests/schedulers/test_slurm.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,20 @@ def test_slurm(region, os, pcluster_config_reader, clusters_factory, test_datadi
3636
"""
3737
scaledown_idletime = 3
3838
max_queue_size = 5
39-
cluster_config = pcluster_config_reader(scaledown_idletime=scaledown_idletime, max_queue_size=max_queue_size)
39+
# IntelMPI not available on centos6
40+
# For OSs running _test_mpi_job_termination, spin up 2 compute nodes at cluster creation to run test
41+
# Else do not spin up compute node and start running regular slurm tests
42+
does_not_support_impi = ["centos6"]
43+
initial_queue_size = 2 if os not in does_not_support_impi else 0
44+
cluster_config = pcluster_config_reader(
45+
scaledown_idletime=scaledown_idletime, max_queue_size=max_queue_size, initial_queue_size=initial_queue_size
46+
)
4047
cluster = clusters_factory(cluster_config)
4148
remote_command_executor = RemoteCommandExecutor(cluster)
4249

4350
_test_slurm_version(remote_command_executor)
4451

45-
# IntelMPI not available on centos6
46-
if os != "centos6":
52+
if os not in does_not_support_impi:
4753
_test_mpi_job_termination(remote_command_executor, test_datadir)
4854

4955
_test_dynamic_max_cluster_size(remote_command_executor, region, cluster.asg, max_queue_size=max_queue_size)
@@ -96,6 +102,8 @@ def _test_mpi_job_termination(remote_command_executor, test_datadir):
96102
"""
97103
logging.info("Testing no stray process left behind after mpirun job is terminated")
98104
slurm_commands = SlurmCommands(remote_command_executor)
105+
# Assert initial condition
106+
assert_that(slurm_commands.compute_nodes_count()).is_equal_to(2)
99107

100108
# Submit mpi_job, which runs Intel MPI benchmarks with intelmpi
101109
# Leaving 1 vcpu on each node idle so that the process check job can run while mpi_job is running

tests/integration-tests/tests/schedulers/test_slurm/test_slurm/pcluster.config.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ vpc_settings = parallelcluster-vpc
1111
scheduler = slurm
1212
master_instance_type = {{ instance }}
1313
compute_instance_type = {{ instance }}
14-
initial_queue_size = 2
14+
initial_queue_size = {{ initial_queue_size }}
1515
max_queue_size = {{ max_queue_size }}
1616
maintain_initial_size = false
1717
scaling_settings = custom

0 commit comments

Comments
 (0)