Skip to content

Commit 18cf50f

Browse files
[Test] Make StarCCM choose number of cores according to instance type
This commit also enable exclusive job execution to make sure benchmarks are run on dedicated nodes
1 parent 1dbe8e8 commit 18cf50f

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

tests/integration-tests/tests/performance_tests/test_openfoam.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
OPENFOAM_INSTALLATION_TIMEOUT = 300
1111
OPENFOAM_JOB_TIMEOUT = 5400 # Takes long time because during the first time, it's not only execute the job but also
1212
# builds and installs many things
13-
TASK_VCPUS = 36 # vCPUs are cut in a half because multithreading is disabled
1413
BASELINE_CLUSTER_SIZE_ELAPSED_SECONDS = {
1514
"alinux2023": {8: 754, 16: 366, 32: 182}, # v3.10.0
1615
"alinux2": {8: 754, 16: 366, 32: 182}, # v3.1.3

tests/integration-tests/tests/performance_tests/test_openfoam/test_openfoam/pcluster.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Scheduling:
2020
Scheduler: slurm
2121
SlurmQueues:
2222
- Name: q1
23+
JobExclusiveAllocation: true
2324
ComputeResources:
2425
- Name: c5n18xl-efa
2526
InstanceType: {{ instance }}

tests/integration-tests/tests/performance_tests/test_osu/test_osu/pcluster.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Scheduling:
1212
Scheduler: {{ scheduler }}
1313
SlurmQueues:
1414
- Name: efa-enabled
15+
JobExclusiveAllocation: true
1516
Networking:
1617
PlacementGroup:
1718
Enabled: true

tests/integration-tests/tests/performance_tests/test_starccm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
import pytest
66
from remote_command_executor import RemoteCommandExecutionError, RemoteCommandExecutor
77

8-
from tests.common.utils import assert_no_file_handler_leak, get_compute_ip_to_num_files
8+
from tests.common.utils import assert_no_file_handler_leak, fetch_instance_slots, get_compute_ip_to_num_files
99
from tests.performance_tests.common import _log_output_performance_difference, push_result_to_dynamodb
1010

1111
# timeout in seconds
1212
STARCCM_INSTALLATION_TIMEOUT = 1800
1313
STARCCM_JOB_TIMEOUT = 600
1414
STARCCM_LICENCE_SECRET = "starccm-license-secret"
15-
TASK_VCPUS = 36 # vCPUs are cut in a half because multithreading is disabled
1615
BASELINE_CLUSTER_SIZE_ELAPSED_SECONDS = {
1716
"alinux2023": {8: 62.414, 16: 31.998, 32: 20.422}, # v3.10.0
1817
"alinux2": {8: 64.475, 16: 33.173, 32: 17.899}, # v3.1.3
@@ -106,7 +105,8 @@ def test_starccm(
106105
parallelism = int(max_node_num / num_of_nodes)
107106
result = []
108107
logging.info(f"Submitting StarCCM+ job with {num_of_nodes} nodes")
109-
run_command = f'sbatch --ntasks={num_of_nodes * TASK_VCPUS} starccm.slurm.sh "{podkey}" "{licpath}"'
108+
instance_slots = fetch_instance_slots(region, instance, multithreading_disabled=True)
109+
run_command = f'sbatch --ntasks={num_of_nodes * instance_slots} starccm.slurm.sh "{podkey}" "{licpath}"'
110110
multiple_runs = []
111111
# Run at least twice up to whatever parallelism allows to maximize usage of available nodes
112112
number_of_runs = max(parallelism, 2)

tests/integration-tests/tests/performance_tests/test_starccm/test_starccm/pcluster.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Scheduling:
2626
Scheduler: slurm
2727
SlurmQueues:
2828
- Name: q1
29+
JobExclusiveAllocation: true
2930
ComputeResources:
3031
- Name: c5n-18xl-efa
3132
InstanceType: {{ instance }}

0 commit comments

Comments
 (0)