18c7aaff08
Modify the orte configure options to specify --enable-multicast such that it directs components to build or not instead of littering the code base with #if's. Remove those #if's where they used to occur. Add a new grpcomm "mcast" module to support multicast operations. Still some work required to properly perform daemon collectives for comm_spawn operations. New module only builds when --enable-multicast is provided, and when specifically selected. This commit was SVN r22709.
77 строки
1.8 KiB
C
77 строки
1.8 KiB
C
/* -*- C -*-
|
|
*
|
|
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
*
|
|
*/
|
|
|
|
/*
|
|
* includes
|
|
*/
|
|
#include "orte_config.h"
|
|
#include "orte/constants.h"
|
|
|
|
|
|
#include "opal/mca/mca.h"
|
|
#include "opal/mca/base/base.h"
|
|
#include "opal/mca/base/mca_base_param.h"
|
|
|
|
#include "orte/mca/grpcomm/base/base.h"
|
|
#include "grpcomm_mcast.h"
|
|
|
|
/*
|
|
* Struct of function pointers that need to be initialized
|
|
*/
|
|
orte_grpcomm_base_component_t mca_grpcomm_mcast_component = {
|
|
{
|
|
ORTE_GRPCOMM_BASE_VERSION_2_0_0,
|
|
|
|
"mcast", /* MCA module name */
|
|
ORTE_MAJOR_VERSION, /* MCA module major version */
|
|
ORTE_MINOR_VERSION, /* MCA module minor version */
|
|
ORTE_RELEASE_VERSION, /* MCA module release version */
|
|
orte_grpcomm_mcast_open, /* module open */
|
|
orte_grpcomm_mcast_close, /* module close */
|
|
orte_grpcomm_mcast_component_query /* module query */
|
|
},
|
|
{
|
|
/* The component is checkpoint ready */
|
|
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
|
}
|
|
};
|
|
|
|
/* Open the component */
|
|
int orte_grpcomm_mcast_open(void)
|
|
{
|
|
return ORTE_SUCCESS;
|
|
}
|
|
|
|
int orte_grpcomm_mcast_close(void)
|
|
{
|
|
return ORTE_SUCCESS;
|
|
}
|
|
|
|
int orte_grpcomm_mcast_component_query(mca_base_module_t **module, int *priority)
|
|
{
|
|
/* This component is selected only when requested */
|
|
bool is_required = false;
|
|
|
|
mca_base_is_component_required(&orte_grpcomm_base.components_available,
|
|
&mca_grpcomm_mcast_component.base_version,
|
|
true,
|
|
&is_required);
|
|
|
|
if( !is_required ) {
|
|
*priority = 0;
|
|
*module = NULL;
|
|
return ORTE_ERROR;
|
|
}
|
|
|
|
*priority = 1000;
|
|
*module = (mca_base_module_t *)&orte_grpcomm_mcast_module;
|
|
return ORTE_SUCCESS;
|
|
}
|