def test_gloo_run_minimal(self): if not gloo_built: self.skipTest("Gloo is not available") cmd = ['whoami'] settings = self.minimal_settings gloo_run(settings, ['lo'], {}, '127.0.0.1', cmd)
def test_gloo_run_with_os_environ(self): if not gloo_built: self.skipTest("Gloo is not available") cmd = ['whoami'] settings = self.minimal_settings gloo_run(settings, ['lo'], os.environ, '127.0.0.1', cmd)
def run_controller(use_gloo, gloo_run, use_mpi, mpi_run, use_jsrun, js_run, verbosity): # keep logic in sync with is_gloo_used(...) verbose = verbosity is not None and verbosity >= 2 if use_gloo: if not gloo_built(verbose=verbose): raise ValueError('Gloo support has not been built. If this is not expected, ensure CMake is installed ' 'and reinstall Horovod with HOROVOD_WITH_GLOO=1 to debug the build error.') gloo_run() elif use_mpi: if not mpi_built(verbose=verbose): raise ValueError('MPI support has not been built. If this is not expected, ensure MPI is installed ' 'and reinstall Horovod with HOROVOD_WITH_MPI=1 to debug the build error.') mpi_run() elif use_jsrun: if not mpi_built(verbose=verbose): raise ValueError('MPI support has not been built. If this is not expected, ensure MPI is installed ' 'and reinstall Horovod with HOROVOD_WITH_MPI=1 to debug the build error.') if not lsf.LSFUtils.using_lsf(): raise ValueError( 'Horovod did not detect an LSF job. The jsrun launcher can only be used in that environment. ' 'Please, pick a different launcher for other environments.') js_run() else: if mpi_built(verbose=verbose): if lsf.LSFUtils.using_lsf() and is_jsrun_installed(): js_run() else: mpi_run() elif gloo_built(verbose=verbose): gloo_run() else: raise ValueError('Neither MPI nor Gloo support has been built. Try reinstalling Horovod ensuring that ' 'either MPI is installed (MPI) or CMake is installed (Gloo).')
def gloo_run_fn(): driver_ip = network.get_driver_ip(nics) gloo_run(settings, nics, env, driver_ip, command)