def run()

in azure-slurm/slurmcc/topology.py [0:0]


    def run(self):
        """
        Executes the sequence of steps to generate and write the SLURM topology.
        Returns:
            None
        """
        log.debug("Retrieving hostnames")
        self.get_hostnames()
        log.debug("Retrieving sharp_cmd directory")
        self.sharp_cmd_path=self.get_sharp_cmd()
        log.debug("checking that sharp_hello_works")
        self.check_sharp_hello()
        log.debug("Checking ibstat can be run on all hosts")
        self.check_ibstatus()
        log.debug("Running ibstat on hosts to collect InfiniBand device GUIDs")
        self.retrieve_guids()
        log.debug("Finished collecting InfiniBand device GUIDs from hosts")
        self.write_guids_to_file()
        log.debug("Finished writing guids to %s", self.guids_file)
        self.generate_topo_file()
        log.debug("Topology file generated at %s", self.topo_file)
        self.device_guids_per_switch =  self.group_guids_per_switch()
        log.debug("Finished grouping device guids per switch")
        self.host_to_torset_map = self.identify_torsets()
        log.debug("Identified torsets for hosts")
        self.torsets = self.group_hosts_by_torset()
        log.debug("Finished grouping hosts by torsets")
        self.write_slurm_topology()
        if self.topo_file:
            log.info("Finished writing slurm topology from torsets to %s",
                          self.slurm_top_file)
        else:
            log.info("Printed slurm topology")