Skip to content

Commit

Permalink
Remove unnecessary version test for Slurm and PMIx
Browse files Browse the repository at this point in the history
The same checks are performed in Kitchen Tests we don't need to execute them again.

Signed-off-by: Enrico Usai <[email protected]>
  • Loading branch information
enrico-usai committed Oct 12, 2023
1 parent 50bc782 commit 9c6e344
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions tests/integration-tests/tests/schedulers/test_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def test_slurm(
remote_command_executor = RemoteCommandExecutor(cluster, use_login_node=use_login_node)
slurm_root_path = _retrieve_slurm_root_path(remote_command_executor)
slurm_commands = scheduler_commands_factory(remote_command_executor)
_test_slurm_version(remote_command_executor)

if supports_impi:
_test_mpi_job_termination(remote_command_executor, test_datadir, slurm_commands, region, cluster)
Expand Down Expand Up @@ -229,18 +228,19 @@ def test_slurm_pmix(pcluster_config_reader, scheduler, clusters_factory, use_log
remote_command_executor = RemoteCommandExecutor(cluster, use_login_node=use_login_node)

# Ensure the expected PMIx version is listed when running `srun --mpi=list`.
# Since we're installing PMIx v4.2.6, we expect to see pmix and pmix_v4 in the output.
# Sample output:
# [ec2-user@ip-172-31-33-187 ~]$ srun 2>&1 --mpi=list
# srun: MPI types are...
# srun: none
# srun: openmpi
# srun: pmi2
# srun: pmix
# srun: pmix_v4
# srun: pmix_vX
#
# _vX is the Major number of the PMIx version installed and used to compile slurm.
# We check this in the cookbook, so we do not repeat the check here
mpi_list_output = remote_command_executor.run_remote_command("srun 2>&1 --mpi=list").stdout
assert_that(mpi_list_output).matches(r"\s+pmix($|\s+)")
assert_that(mpi_list_output).matches(r"\s+pmix_v4($|\s+)")

# Compile and run an MPI program interactively
mpi_module = "openmpi"
Expand Down Expand Up @@ -1708,12 +1708,6 @@ def _gpu_resource_check(slurm_commands, partition, instance_type, instance_type_
assert_that(job_info).contains(f"TresPerNode=gres:gpu:{gpus_per_instance}", f"CpusPerTres=gres:gpu:{cpus_per_gpu}")


def _test_slurm_version(remote_command_executor):
logging.info("Testing Slurm Version")
version = remote_command_executor.run_remote_command("sinfo -V").stdout
assert_that(version).is_equal_to("slurm 23.02.5")


def _test_job_dependencies(slurm_commands, region, stack_name, scaledown_idletime):
logging.info("Testing cluster doesn't scale when job dependencies are not satisfied")
job_id = slurm_commands.submit_command_and_assert_job_accepted(
Expand Down

0 comments on commit 9c6e344

Please sign in to comment.