@@ -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
0 commit comments