Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aurora 2.4 test branch #13457

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/tests/ftest/deployment/agent_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ def run_ior_collect_error(self, results, job_num, file_name, clients):
mpi_type="mpich")
manager.assign_hosts(clients_nodeset, self.workdir, self.hostfile_clients_slots)
ppn = self.params.get("ppn", '/run/ior/client_processes/*')
manager.ppn.update(ppn, 'mpirun.ppn')
manager.processes.update(None, 'mpirun.np')
manager.assign_processes(ppn=ppn)

try:
ior_output = manager.run()
Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/deployment/target_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def run_ior_report_error(self, results, job_num, file_name, pool, container, nam
manager.assign_hosts(
self.hostlist_clients, self.workdir, self.hostfile_clients_slots)
ppn = self.params.get("ppn", '/run/ior/client_processes/*')
manager.ppn.update(ppn, 'mpirun.ppn')
manager.processes.update(None, 'mpirun.np')
manager.assign_processes(ppn=ppn)

# Run the command.
try:
Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/performance/ior_easy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,4 @@ client:
env_vars:
- D_LOG_MASK=INFO
mpirun:
bind_to: hwthread
map_by: socket
args: "--bind-to hwthread --map-by socket"
3 changes: 1 addition & 2 deletions src/tests/ftest/performance/ior_hard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,4 @@ client:
env_vars:
- D_LOG_MASK=INFO
mpirun:
bind_to: hwthread
map_by: socket
args: "--bind-to hwthread --map-by socket"
3 changes: 1 addition & 2 deletions src/tests/ftest/performance/mdtest_easy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,4 @@ client:
env_vars:
- D_LOG_MASK=INFO
mpirun:
bind_to: hwthread
map_by: socket
args: "--bind-to hwthread --map-by socket"
3 changes: 1 addition & 2 deletions src/tests/ftest/performance/mdtest_hard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,4 @@ client:
env_vars:
- D_LOG_MASK=INFO
mpirun:
bind_to: hwthread
map_by: socket
args: "--bind-to hwthread --map-by socket"
2 changes: 1 addition & 1 deletion src/tests/ftest/telemetry/pool_space_metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ior:
env_vars:
- D_LOG_MASK=INFO
mpirun:
bind_to: socket
args: "--bind-to socket"

scm_metric_thresholds:
# Maximal metadata size is empirically adjusted to 8MiB
Expand Down
6 changes: 1 addition & 5 deletions src/tests/ftest/util/data_mover_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,7 @@ def run(self, processes, job_manager, ppn=None, env=None):
# Get job manager cmd
job_manager = Mpirun(self, mpi_type="mpich")
job_manager.assign_hosts(self.hosts, self.tmp)
if ppn is None:
job_manager.assign_processes(processes)
else:
job_manager.ppn.update(ppn, 'mpirun.ppn')
job_manager.processes.update(None, 'mpirun.np')
job_manager.assign_processes(processes, ppn)
job_manager.exit_status_exception = self.exit_status_exception
job_manager.assign_environment(env or {}, True)

Expand Down
8 changes: 4 additions & 4 deletions src/tests/ftest/util/ior_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ def run_ior(self, manager, processes, intercept=None, display_space=True,
manager.working_dir.value = self.dfuse.mount_dir.value
manager.assign_hosts(
self.hostlist_clients, self.workdir, self.hostfile_clients_slots)
if self.ppn is None:
manager.assign_processes(processes)
# Pass only processes or ppn to be compatible with previous behavior
if self.ppn is not None:
manager.assign_processes(ppn=self.ppn)
else:
manager.ppn.update(self.ppn, 'mpirun.ppn')
manager.processes.update(None, 'mpirun.np')
manager.assign_processes(processes=processes)

manager.assign_environment(env)

Expand Down
8 changes: 4 additions & 4 deletions src/tests/ftest/util/ior_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,11 +571,11 @@ def run(self, group, pool, container, processes, ppn=None, intercept=None, plugi
self.manager.job.test_file.update(
os.path.join(os.sep, self.label_generator.get_label("testfile")))

if ppn is None:
self.manager.assign_processes(processes)
# Pass only processes or ppn to be compatible with previous behavior
if ppn is not None:
self.manager.assign_processes(ppn=ppn)
else:
self.manager.ppn.update(ppn, ".".join([self.manager.command, "ppn"]))
self.manager.processes.update(None, ".".join([self.manager.command, "np"]))
self.manager.assign_processes(processes=processes)

self.manager.assign_environment(self.env)

Expand Down
24 changes: 14 additions & 10 deletions src/tests/ftest/util/job_manager_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from ClusterShell.NodeSet import NodeSet
from command_utils import ExecutableCommand, SystemctlCommand
from command_utils_base import EnvironmentVariables, FormattedParameter
from command_utils_base import BasicParameter, EnvironmentVariables, FormattedParameter
from env_modules import load_mpi
from exception_utils import CommandFailure, MPILoadError
from general_utils import (get_job_manager_class, get_journalctl_command, journalctl_time, pcmd,
Expand Down Expand Up @@ -162,12 +162,12 @@ def assign_hosts(self, hosts, path=None, slots=None, hostfile=True):
"""

def assign_processes(self, processes):
"""Assign the number of processes per node.
"""Assign the number of processes.

Set the appropriate command line parameter with the specified value.

Args:
processes (int): number of processes per node
processes (int): number of processes
"""

def assign_environment(self, env_vars, append=False):
Expand Down Expand Up @@ -336,10 +336,10 @@ def assign_hosts(self, hosts, path=None, slots=None, hostfile=True):
self.hostfile.value = write_host_file(**kwargs)

def assign_processes(self, processes):
"""Assign the number of processes per node (-np).
"""Assign the number of processes (-np).

Args:
processes (int): number of processes per node
processes (int): number of processes
"""
self.processes.value = processes

Expand Down Expand Up @@ -432,8 +432,7 @@ def __init__(self, job, subprocess=False, mpi_type="openmpi"):
self.mca = FormattedParameter("--mca {}", mca_default)
self.working_dir = FormattedParameter("-wdir {}", None)
self.tmpdir_base = FormattedParameter("--mca orte_tmpdir_base {}", None)
self.bind_to = FormattedParameter("--bind-to {}", None)
self.map_by = FormattedParameter("--map-by {}", None)
self.args = BasicParameter(None, None)
self.mpi_type = mpi_type

def assign_hosts(self, hosts, path=None, slots=None, hostfile=True):
Expand All @@ -455,13 +454,18 @@ def assign_hosts(self, hosts, path=None, slots=None, hostfile=True):
kwargs["path"] = path
self.hostfile.value = write_host_file(**kwargs)

def assign_processes(self, processes):
"""Assign the number of processes per node (-np).
def assign_processes(self, processes=None, ppn=None):
"""Assign the number of processes (-np) and processes per node (-ppn).

Args:
processes (int): number of processes per node
processes (int, optional): number of processes. Defaults to None.
if not specified, auto-calculated from ppn.
ppn (int, optional): number of processes per node. Defaults to None.
"""
if ppn is not None and processes is None:
processes = ppn * len(self._hosts)
self.processes.update(processes, "mpirun.np")
self.ppn.update(ppn, "mpirun.ppn")

def assign_environment(self, env_vars, append=False):
"""Assign or add environment variables to the command.
Expand Down
8 changes: 4 additions & 4 deletions src/tests/ftest/util/mdtest_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ def run_mdtest(self, manager, processes, display_space=True, pool=None, out_queu
"""
env = self.mdtest_cmd.get_default_env(str(manager), self.client_log)
manager.assign_hosts(self.hostlist_clients, self.workdir, self.hostfile_clients_slots)
if self.ppn is None:
manager.assign_processes(processes)
# Pass only processes or ppn to be compatible with previous behavior
if self.ppn is not None:
manager.assign_processes(ppn=self.ppn)
else:
manager.ppn.update(self.ppn, 'mpirun.ppn')
manager.processes.update(None, 'mpirun.np')
manager.assign_processes(processes=processes)

manager.assign_environment(env)

Expand Down