|
56 | 56 | wait_for_num_nodes_in_scheduler,
|
57 | 57 | )
|
58 | 58 | from tests.common.scaling_common import setup_ec2_launch_override_to_emulate_ice
|
59 |
| -from tests.common.schedulers_common import SlurmCommands |
| 59 | +from tests.common.schedulers_common import SlurmCommands, TorqueCommands |
60 | 60 |
|
61 | 61 |
|
62 | 62 | @pytest.mark.usefixtures("instance", "os")
|
@@ -120,6 +120,8 @@ def test_slurm(
|
120 | 120 | max_count=5,
|
121 | 121 | gpu_instance_type_info=gpu_instance_type_info,
|
122 | 122 | )
|
| 123 | + # Test torque command wrapper |
| 124 | + _test_torque_job_submit(remote_command_executor, test_datadir) |
123 | 125 |
|
124 | 126 | # Tests below must run on HeadNode or need HeadNode participate.
|
125 | 127 | head_node_command_executor = RemoteCommandExecutor(cluster)
|
@@ -239,6 +241,8 @@ def test_slurm_from_login_nodes_in_private_network(
|
239 | 241 | max_count=5,
|
240 | 242 | gpu_instance_type_info=gpu_instance_type_info,
|
241 | 243 | )
|
| 244 | + # Test torque command wrapper |
| 245 | + _test_torque_job_submit(remote_command_executor, test_datadir) |
242 | 246 | head_node_command_executor = RemoteCommandExecutor(cluster)
|
243 | 247 | assert_no_errors_in_logs(head_node_command_executor, "slurm")
|
244 | 248 |
|
@@ -1805,6 +1809,14 @@ def _assert_job_state(slurm_commands, job_id, job_state):
|
1805 | 1809 | assert_that(e.result.stdout).contains("slurm_load_jobs error: Invalid job id specified")
|
1806 | 1810 |
|
1807 | 1811 |
|
| 1812 | +def _test_torque_job_submit(remote_command_executor, test_datadir): |
| 1813 | + """Test torque job submit command in slurm cluster.""" |
| 1814 | + logging.info("Testing cluster submits job by torque command") |
| 1815 | + torque_commands = TorqueCommands(remote_command_executor) |
| 1816 | + result = torque_commands.submit_script(str(test_datadir / "torque_job.sh")) |
| 1817 | + torque_commands.assert_job_submitted(result.stdout) |
| 1818 | + |
| 1819 | + |
1808 | 1820 | def _submit_kill_networking_job(remote_command_executor, scheduler_commands, partition, node_type, num_nodes):
|
1809 | 1821 | """Submit job that will detach network interface on compute."""
|
1810 | 1822 | # Get network interface name from Head node, assuming Head node and Compute are of the same instance type
|
|
0 commit comments