def test_daos_vol_mpich(self): """Jira ID: DAOS-3656. Test Description: Run HDF5 testphdf5 and t_shapesame provided in HDF5 package with daos vol connector. Testing various I/O functions provided in HDF5 test suite such as: h5_test_testhdf5 h5vl_test h5_partest_t_bigio h5_partest_testphdf5 h5vl_test_parallel h5_partest_t_shapesame h5daos_test_map h5daos_test_map_parallel h5daos_test_oclass h5daos_test_metadata_parallel :avocado: tags=all,pr,daily_regression :avocado: tags=hw,small :avocado: tags=hdf5,vol,volunit,volmpich :avocado: tags=DAOS_5610 """ self.job_manager = get_job_manager_class("Mpirun", None, False, "mpich") self.set_job_manager_timeout() self.run_test("/usr/lib64/mpich/lib", "/usr/lib64/hdf5_vol_daos/mpich/tests")
def __init__(self, command, manager="Orterun"): """Create a SubprocessManager object. Args: command (YamlCommand): command to manage as a subprocess manager (str, optional): the name of the JobManager class used to manage the YamlCommand defined through the "job" attribute. Defaults to "OpenMpi" """ self.log = getLogger(__name__) # Define the JobManager class used to manage the command as a subprocess self.manager = get_job_manager_class(manager, command, True) # Define the list of hosts that will execute the daos command self._hosts = []
def __init__(self, command, manager="Orterun"): """Create a SubprocessManager object. Args: command (YamlCommand): command to manage as a subprocess manager (str, optional): the name of the JobManager class used to manage the YamlCommand defined through the "job" attribute. Defaults to "OpenMpi" """ self.log = getLogger(__name__) # Define the JobManager class used to manage the command as a subprocess self.manager = get_job_manager_class(manager, command, True) # Define the list of hosts that will execute the daos command self._hosts = [] # The socket directory verification is not required with systemctl self._verify_socket_dir = manager != "Systemctl"
def __init__(self, command, manager="Orterun"): """Create a SubprocessManager object. Args: command (YamlCommand): command to manage as a subprocess manager (str, optional): the name of the JobManager class used to manage the YamlCommand defined through the "job" attribute. Defaults to "OpenMpi" """ self.log = getLogger(__name__) # Define the JobManager class used to manage the command as a subprocess self.manager = get_job_manager_class(manager, command, True) self._id = self.manager.job.command.replace("daos_", "") # Define the list of hosts that will execute the daos command self._hosts = [] # The socket directory verification is not required with systemctl self._verify_socket_dir = manager != "Systemctl" # An internal dictionary used to define the expected states of each # job process. It will be populated when any of the following methods # are called: # - start() # - verify_expected_states(set_expected=True) # Individual states may also be updated by calling the # update_expected_states() method. This is required to avoid any errors # being raised during tearDown() if a test variant intentional affects # the state of a job process. self._expected_states = {} # States for verify_expected_states() self._states = { "all": [ "active", "inactive", "activating", "deactivating", "failed", "unknown" ], "running": ["active"], "stopped": ["inactive", "deactivating", "failed", "unknown"], "errored": ["failed"], }
def test_daos_vol_bigio(self): """Jira ID: DAOS-3656. Test Description: Run HDF5 h5_partest_t_bigio provided in HDF5 package with daos vol connector and mpich. Testing various I/O functions provided in HDF5 test suite such as: h5_partest_t_bigio :avocado: tags=all,full_regression :avocado: tags=hw,small :avocado: tags=hdf5,vol,volbigio :avocado: tags=DAOS_5610 """ self.job_manager = get_job_manager_class("Mpirun", None, False, "mpich") self.set_job_manager_timeout() self.run_test("/usr/lib64/mpich/lib", "/usr/lib64/hdf5_vol_daos/mpich/tests")
def setUp(self): """Set up each test case.""" super(TestWithServers, self).setUp() # Support configuring the startup of servers and agents by the setup() # method from the test yaml file self.setup_start_servers = self.params.get("start_servers", "/run/setup/*", self.setup_start_servers) self.setup_start_agents = self.params.get("start_agents", "/run/setup/*", self.setup_start_agents) # The server config name should be obtained from each ServerManager # object, but some tests still use this TestWithServers attribute. self.server_group = self.params.get("name", "/server_config/", "daos_server") # Support using different job managers to launch the daos agent/servers self.manager_class = self.params.get("manager_class", "/", "Orterun") # Determine which hosts to use as servers and optionally clients. self.hostlist_servers = self.params.get("test_servers", "/run/hosts/*") self.hostlist_clients = self.params.get("test_clients", "/run/hosts/*") # If server or client host list are defined through valid slurm # partition names override any hosts specified through lists. for name in ("servers", "clients"): host_list_name = "_".join(["hostlist", name]) partition_name = "_".join([name[:-1], "partition"]) reservation_name = "_".join([name[:-1], "reservation"]) partition = self.params.get(partition_name, "/run/hosts/*") reservation = self.params.get(reservation_name, "/run/hosts/*") host_list = getattr(self, host_list_name) if partition is not None and host_list is None: # If a partition is provided instead of a list of hosts use the # partition information to populate the list of hosts. setattr(self, partition_name, partition) setattr(self, reservation_name, reservation) slurm_nodes = get_partition_hosts(partition, reservation) if not slurm_nodes: self.fail("No valid nodes in {} partition with {} " "reservation".format(partition, reservation)) setattr(self, host_list_name, slurm_nodes) elif partition is not None and host_list is not None: self.fail( "Specifying both a {} partition name and a list of hosts " "is not supported!".format(name)) # # Find a configuration that meets the test requirements # self.config = Configuration( # self.params, self.hostlist_servers, debug=self.debug) # if not self.config.set_config(self): # self.cancel("Test requirements not met!") # Create host files - In the future this should be the responsibility of # tests/classes that need a host file and hostfile_clients should not be # a property of this class. if self.hostlist_clients: self.hostfile_clients = write_host_file( self.hostlist_clients, self.workdir, self.hostfile_clients_slots) # Display host information self.log.info("--- HOST INFORMATION ---") self.log.info("hostlist_servers: %s", self.hostlist_servers) self.log.info("hostlist_clients: %s", self.hostlist_clients) self.log.info("server_partition: %s", self.server_partition) self.log.info("client_partition: %s", self.client_partition) self.log.info("server_reservation: %s", self.server_reservation) self.log.info("client_reservation: %s", self.client_reservation) # Kill commands left running on the hosts (from a previous test) before # starting any tests. Currently only handles 'orterun' processes, but # can be expanded. hosts = list(self.hostlist_servers) if self.hostlist_clients: hosts.extend(self.hostlist_clients) self.stop_leftover_processes(["orterun"], hosts) # Start the clients (agents) if self.setup_start_agents: self.start_agents() # Start the servers if self.setup_start_servers: self.start_servers() # Setup a job manager command for running the test command manager_class_name = self.params.get("job_manager_class_name", default=None) manager_subprocess = self.params.get("job_manager_subprocess", default=False) manager_mpi_type = self.params.get("job_manager_mpi_type", default="mpich") if manager_class_name is not None: self.job_manager = get_job_manager_class(manager_class_name, None, manager_subprocess, manager_mpi_type) self.set_job_manager_timeout()
def get_job_manager(test, class_name=None, job=None, subprocess=None, mpi_type=None, timeout=None, namespace="/run/job_manager/*", class_name_default="Mpirun"): """Get a JobManager object. Create a JobManager class using either: - the provided arguments - the test yaml arguments (if no arguments are provided) - default values (if no arguments are provided and there are no test yaml entries) Args: test (Test): avocado Test object class_name (str, optional): JobManager class name. Defaults to None. job (ExecutableCommand, optional): command object to manage. Defaults to None. subprocess (bool, optional): whether the command is run as a subprocess. Defaults to False. mpi_type (str, optional): MPI type to use with the Mpirun class only. Defaults to "openmpi". timeout (int, optional): job manager timeout. Defaults to None. namespace (str, optional): location of yaml parameters used to define unset inputs. Defaults to "/run/job_manager/*". class_name_default (str, optional): default class_name to use when. Defaults to "Mpirun". Returns: JobManager: a JobManager class, e.g. Orterun, Mpirun, Srun, etc. """ job_manager = None if class_name is None: class_name = test.params.get("class_name", namespace, default=class_name_default) if subprocess is None: subprocess = test.params.get("subprocess", namespace, default=False) if mpi_type is None: mpi_type_default = "mpich" if class_name == "Mpirun" else "openmpi" mpi_type = test.params.get("mpi_type", namespace, default=mpi_type_default) if timeout is None: timeout = test.params.get(test.get_test_name(), namespace.replace("*", "manager_timeout/*"), None) if timeout is None: timeout = test.params.get("timeout", namespace, None) # Setup a job manager command for running the test command if class_name is not None: job_manager = get_job_manager_class(class_name, job, subprocess, mpi_type) job_manager.timeout = timeout if mpi_type == "openmpi": job_manager.tmpdir_base.update(test.test_dir, "tmpdir_base") if isinstance(test.job_manager, list): test.job_manager.append(job_manager) else: test.job_manager = job_manager return job_manager