![Jeff Squyres](/assets/img/avatar_default.png)
* Moved "check basics" sanity check from openib BTL to common/verbs (which also allows us to have openib ''not'' include <infiniband/driver.h>, which is a Very Good Thing) * Add new ompi_common_verbs_qp_test() function, which tests to see whether a device supports RC and/or UD QPs. The openib BTL now uses this function to ensure that the device supports RC QPs. * Rename ompi_common_verbs_find_ibv_ports() to be ompi_common_verbs_find_ports() -- the "ibv" was redundant. * Re-work ompi_common_verbs_find_ports() to use ompi_common_verbs_qp_test() instead of testing for RC/UD QPs itself * Add bunches of opal_output_verbose() to the find_ports() routine (to help diagnosing connectivity problems -- imaging running with --mca btl_base_verbose 10; you'll see all the find_ports() test results) * Make ompi_common_verbs_qp_test() warn if devices/ports are supplied in the if_include/if_exclude strings that do not exists (quite similar to what the openib BTL does today). * Add ompi_common_verbs_mca_register() function, which registers common verbs MCA params. It will also register MCA param synonyms for thse MCA params to upper-level components (e.g., btl_<upper-level-component>_<the-mca-param>). * common_verbs_warn_nonexistent_if: warn if if_include/if_exclude-specified devices or ports do not exist. This commit was SVN r27332.
57 строки
1.7 KiB
C
57 строки
1.7 KiB
C
/*
|
|
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
|
*
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#include "ompi_config.h"
|
|
|
|
#include "opal/mca/base/mca_base_param.h"
|
|
|
|
#include "common_verbs.h"
|
|
|
|
/***********************************************************************/
|
|
|
|
static bool registered = false;
|
|
static int warn_nonexistent_if_index = -1;
|
|
|
|
bool ompi_common_verbs_warn_nonexistent_if = true;
|
|
|
|
static void register_internal(void)
|
|
{
|
|
int ival;
|
|
|
|
warn_nonexistent_if_index =
|
|
mca_base_param_reg_int_name("ompi_common_verbs",
|
|
"warn_nonexistent_if",
|
|
"Warn if non-existent devices and/or ports are specified in device include/exclude MCA parameters "
|
|
"(0 = do not warn; any other value = warn)",
|
|
false, false,
|
|
(int) ompi_common_verbs_warn_nonexistent_if,
|
|
&ival);
|
|
ompi_common_verbs_warn_nonexistent_if = (bool) ival;
|
|
|
|
registered = true;
|
|
}
|
|
|
|
void ompi_common_verbs_mca_register(mca_base_component_t *component)
|
|
{
|
|
int ival;
|
|
|
|
if (!registered) {
|
|
register_internal();
|
|
}
|
|
|
|
/* Make synonyms for the common_verbs MCA params. Need to look up
|
|
the value again, because a new/different value may have been
|
|
set by the new synonym name. */
|
|
mca_base_param_reg_syn(warn_nonexistent_if_index, component,
|
|
"warn_nonexistent_if", false);
|
|
mca_base_param_lookup_int(warn_nonexistent_if_index, &ival);
|
|
ompi_common_verbs_warn_nonexistent_if = (bool) ival;
|
|
}
|