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.
93 строки
2.7 KiB
C
93 строки
2.7 KiB
C
/*
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
* University Research and Technology
|
|
* Corporation. All rights reserved.
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
* of Tennessee Research Foundation. All rights
|
|
* reserved.
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
* University of Stuttgart. All rights reserved.
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
* All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
|
|
#include "orte_config.h"
|
|
#include "orte/constants.h"
|
|
|
|
#include "opal/mca/mca.h"
|
|
#include "opal/util/output.h"
|
|
#include "opal/mca/base/base.h"
|
|
#include "opal/mca/base/mca_base_param.h"
|
|
|
|
|
|
#include "orte/mca/grpcomm/base/base.h"
|
|
|
|
|
|
/*
|
|
* The following file was created by configure. It contains extern
|
|
* statements and the definition of an array of pointers to each
|
|
* component's public mca_base_component_t struct.
|
|
*/
|
|
|
|
#include "orte/mca/grpcomm/base/static-components.h"
|
|
|
|
/*
|
|
* Global variables
|
|
*/
|
|
orte_grpcomm_base_t orte_grpcomm_base;
|
|
|
|
orte_grpcomm_base_module_t orte_grpcomm = {0};
|
|
|
|
/**
|
|
* Function for finding and opening either all MCA components, or the one
|
|
* that was specifically requested via a MCA parameter.
|
|
*/
|
|
int orte_grpcomm_base_open(void)
|
|
{
|
|
/* Debugging / verbose output. Always have stream open, with
|
|
verbose set by the mca open system... */
|
|
orte_grpcomm_base.output = opal_output_open(NULL);
|
|
orte_grpcomm_base.profile_fd = -1;
|
|
|
|
/* define the default daemon collective fn */
|
|
orte_grpcomm_base.daemon_coll = orte_grpcomm_base_daemon_collective;
|
|
|
|
/* Open up all available components */
|
|
|
|
if (ORTE_SUCCESS !=
|
|
mca_base_components_open("grpcomm", orte_grpcomm_base.output,
|
|
mca_grpcomm_base_static_components,
|
|
&orte_grpcomm_base.components_available, true)) {
|
|
return ORTE_ERROR;
|
|
}
|
|
|
|
/* All done */
|
|
|
|
return ORTE_SUCCESS;
|
|
}
|
|
|
|
/* local objects */
|
|
static void collective_constructor(orte_grpcomm_collective_t *ptr)
|
|
{
|
|
OBJ_CONSTRUCT(&ptr->lock, opal_mutex_t);
|
|
OBJ_CONSTRUCT(&ptr->cond, opal_condition_t);
|
|
OBJ_CONSTRUCT(&ptr->results, opal_buffer_t);
|
|
ptr->recvd = 0;
|
|
}
|
|
static void collective_destructor(orte_grpcomm_collective_t *ptr)
|
|
{
|
|
OBJ_DESTRUCT(&ptr->lock);
|
|
OBJ_DESTRUCT(&ptr->cond);
|
|
OBJ_DESTRUCT(&ptr->results);
|
|
}
|
|
OBJ_CLASS_INSTANCE(orte_grpcomm_collective_t,
|
|
opal_object_t,
|
|
collective_constructor,
|
|
collective_destructor);
|