2004-01-11 21:31:52 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00:00
|
|
|
* 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.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-11 21:31:52 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2004-10-22 16:06:05 +00:00
|
|
|
#include "ompi_config.h"
|
2004-01-11 21:31:52 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "ompi/constants.h"
|
2005-07-03 23:31:27 +00:00
|
|
|
#include "opal/util/output.h"
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "opal/mca/base/mca_base_param.h"
|
|
|
|
#include "ompi/mca/coll/coll.h"
|
|
|
|
#include "ompi/mca/coll/base/base.h"
|
2004-01-11 21:31:52 +00:00
|
|
|
|
|
|
|
|
2004-01-30 03:53:03 +00:00
|
|
|
/*
|
|
|
|
* The following file was created by configure. It contains extern
|
|
|
|
* statements and the definition of an array of pointers to each
|
2004-08-02 00:24:22 +00:00
|
|
|
* component's public mca_base_component_t struct.
|
2004-01-30 03:53:03 +00:00
|
|
|
*/
|
2005-07-04 18:24:58 +00:00
|
|
|
#include "ompi/mca/coll/base/static-components.h"
|
2004-10-22 16:06:05 +00:00
|
|
|
|
2004-01-30 03:53:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2004-06-29 00:02:25 +00:00
|
|
|
* Global variables; most of which are loaded by back-ends of MCA
|
|
|
|
* variables
|
2004-01-30 03:53:03 +00:00
|
|
|
*/
|
2004-06-29 00:02:25 +00:00
|
|
|
int mca_coll_base_param = -1;
|
2004-01-30 03:53:03 +00:00
|
|
|
int mca_coll_base_output = -1;
|
2004-06-29 00:02:25 +00:00
|
|
|
|
2004-01-30 03:53:03 +00:00
|
|
|
int mca_coll_base_crossover = 4;
|
|
|
|
int mca_coll_base_associative = 1;
|
2004-06-29 00:02:25 +00:00
|
|
|
|
|
|
|
bool mca_coll_base_components_opened_valid = false;
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_t mca_coll_base_components_opened;
|
2004-01-30 03:53:03 +00:00
|
|
|
|
2007-08-19 03:37:49 +00:00
|
|
|
OBJ_CLASS_INSTANCE(mca_coll_base_module_1_1_0_t, opal_object_t, NULL, NULL);
|
2004-01-30 03:53:03 +00:00
|
|
|
|
2004-06-29 00:02:25 +00:00
|
|
|
/*
|
|
|
|
* Function for finding and opening either all MCA components, or the one
|
2004-01-30 03:53:03 +00:00
|
|
|
* that was specifically requested via a MCA parameter.
|
|
|
|
*/
|
|
|
|
int mca_coll_base_open(void)
|
2004-01-11 21:31:52 +00:00
|
|
|
{
|
2005-10-03 19:56:39 +00:00
|
|
|
/* Open an output stream for this framework */
|
2004-06-29 00:02:25 +00:00
|
|
|
|
2005-10-03 19:56:39 +00:00
|
|
|
mca_coll_base_output = opal_output_open(NULL);
|
2004-06-29 00:02:25 +00:00
|
|
|
|
2005-10-03 19:56:39 +00:00
|
|
|
/* Open up all available components */
|
2004-01-30 03:53:03 +00:00
|
|
|
|
2005-10-03 19:56:39 +00:00
|
|
|
if (OMPI_SUCCESS !=
|
|
|
|
mca_base_components_open("coll", mca_coll_base_output,
|
|
|
|
mca_coll_base_static_components,
|
|
|
|
&mca_coll_base_components_opened, true)) {
|
|
|
|
return OMPI_ERROR;
|
|
|
|
}
|
|
|
|
mca_coll_base_components_opened_valid = true;
|
2004-06-29 00:02:25 +00:00
|
|
|
|
2005-10-03 19:56:39 +00:00
|
|
|
/* Find the index of the MCA "coll" param for selection */
|
2004-06-29 00:02:25 +00:00
|
|
|
|
2005-10-03 19:56:39 +00:00
|
|
|
mca_coll_base_param = mca_base_param_find("coll", "base", NULL);
|
2004-01-30 03:53:03 +00:00
|
|
|
|
2005-10-03 19:56:39 +00:00
|
|
|
/* All done */
|
2004-01-30 03:53:03 +00:00
|
|
|
|
2005-10-03 19:56:39 +00:00
|
|
|
return OMPI_SUCCESS;
|
2004-01-11 21:31:52 +00:00
|
|
|
}
|