Example #1
0
def _launch_job(use_mpi,
                use_gloo,
                settings,
                driver,
                env,
                stdout=None,
                stderr=None):
    nics = driver.get_common_interfaces()
    run_controller(
        use_gloo, lambda: gloo_run(settings, nics, driver, env), use_mpi,
        lambda: mpi_run(settings, nics, driver, env, stdout, stderr), False,
        lambda: None, settings.verbose)
Example #2
0
def _launch_job(use_mpi, use_gloo, settings, driver, env, stdout=None, stderr=None):
    # Determine a set of common interfaces for task-to-task communication.
    nics = set(driver.task_addresses_for_tasks(0).keys())
    for index in range(1, settings.num_proc):
        nics.intersection_update(driver.task_addresses_for_tasks(index).keys())
    if not nics:
        raise Exception('Unable to find a set of common task-to-task communication interfaces: %s'
                        % [(index, driver.task_addresses_for_tasks(index)) for index in range(settings.num_proc)])

    run_controller(use_gloo, lambda: gloo_run(settings, nics, driver, env),
                   use_mpi, lambda: mpi_run(settings, nics, driver, env, stdout, stderr),
                   False, lambda: None,
                   settings.verbose)