2004-10-12 18:19:29 +04:00
|
|
|
/*
|
2007-03-17 02:11:45 +03:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* 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 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2008-07-29 02:40:57 +04:00
|
|
|
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-10-12 18:19:29 +04:00
|
|
|
* $HEADER$
|
|
|
|
*
|
|
|
|
* These symbols are in a file by themselves to provide nice linker
|
|
|
|
* semantics. Since linkers generally pull in symbols by object
|
|
|
|
* files, keeping these symbols as the only symbols in this file
|
|
|
|
* prevents utility programs such as "ompi_info" from having to import
|
|
|
|
* entire components just to query their version and parameters.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
|
|
|
#include "mpi.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/mca/coll/coll.h"
|
2004-10-12 18:19:29 +04:00
|
|
|
#include "coll_demo.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Public string showing the coll ompi_demo component version number
|
|
|
|
*/
|
|
|
|
const char *mca_coll_demo_component_version_string =
|
Major simplifications to component versioning:
- After long discussions and ruminations on how we run components in
LAM/MPI, made the decision that, by default, all components included
in Open MPI will use the version number of their parent project
(i.e., OMPI or ORTE). They are certaint free to use a different
number, but this simplification makes the common cases easy:
- components are only released when the parent project is released
- it is easy (trivial?) to distinguish which version component goes
with with version of the parent project
- removed all autogen/configure code for templating the version .h
file in components
- made all ORTE components use ORTE_*_VERSION for version numbers
- made all OMPI components use OMPI_*_VERSION for version numbers
- removed all VERSION files from components
- configure now displays OPAL, ORTE, and OMPI version numbers
- ditto for ompi_info
- right now, faking it -- OPAL and ORTE and OMPI will always have the
same version number (i.e., they all come from the same top-level
VERSION file). But this paves the way for the Great Configure
Reorganization, where, among other things, each project will have
its own version number.
So all in all, we went from a boatload of version numbers to
[effectively] three. That's pretty good. :-)
This commit was SVN r6344.
2005-07-05 00:12:36 +04:00
|
|
|
"OMPI/MPI demo collective MCA component version " OMPI_VERSION;
|
2004-10-12 18:19:29 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Global variable
|
|
|
|
*/
|
|
|
|
int mca_coll_demo_priority_param = -1;
|
|
|
|
int mca_coll_demo_verbose_param = -1;
|
|
|
|
int mca_coll_demo_verbose = 0;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local function
|
|
|
|
*/
|
|
|
|
static int demo_open(void);
|
|
|
|
|
2005-01-30 21:44:00 +03:00
|
|
|
|
2004-10-12 18:19:29 +04:00
|
|
|
/*
|
|
|
|
* Instantiate the public struct with all of our public information
|
|
|
|
* and pointers to our public functions in it
|
|
|
|
*/
|
|
|
|
|
2008-07-29 02:40:57 +04:00
|
|
|
const mca_coll_base_component_2_0_0_t mca_coll_demo_component = {
|
2004-10-12 18:19:29 +04:00
|
|
|
|
2005-01-30 21:44:00 +03:00
|
|
|
/* First, the mca_component_t struct containing meta information
|
|
|
|
about the component itself */
|
2004-10-12 18:19:29 +04:00
|
|
|
|
2005-01-30 21:44:00 +03:00
|
|
|
{
|
2008-07-29 02:40:57 +04:00
|
|
|
MCA_COLL_BASE_VERSION_2_0_0,
|
2004-10-12 18:19:29 +04:00
|
|
|
|
2005-01-30 21:44:00 +03:00
|
|
|
/* Component name and version */
|
|
|
|
"demo",
|
Major simplifications to component versioning:
- After long discussions and ruminations on how we run components in
LAM/MPI, made the decision that, by default, all components included
in Open MPI will use the version number of their parent project
(i.e., OMPI or ORTE). They are certaint free to use a different
number, but this simplification makes the common cases easy:
- components are only released when the parent project is released
- it is easy (trivial?) to distinguish which version component goes
with with version of the parent project
- removed all autogen/configure code for templating the version .h
file in components
- made all ORTE components use ORTE_*_VERSION for version numbers
- made all OMPI components use OMPI_*_VERSION for version numbers
- removed all VERSION files from components
- configure now displays OPAL, ORTE, and OMPI version numbers
- ditto for ompi_info
- right now, faking it -- OPAL and ORTE and OMPI will always have the
same version number (i.e., they all come from the same top-level
VERSION file). But this paves the way for the Great Configure
Reorganization, where, among other things, each project will have
its own version number.
So all in all, we went from a boatload of version numbers to
[effectively] three. That's pretty good. :-)
This commit was SVN r6344.
2005-07-05 00:12:36 +04:00
|
|
|
OMPI_MAJOR_VERSION,
|
|
|
|
OMPI_MINOR_VERSION,
|
|
|
|
OMPI_RELEASE_VERSION,
|
2004-10-12 18:19:29 +04:00
|
|
|
|
2005-01-30 21:44:00 +03:00
|
|
|
/* Component open and close functions */
|
|
|
|
demo_open,
|
|
|
|
NULL
|
|
|
|
},
|
|
|
|
{
|
2007-03-17 02:11:45 +03:00
|
|
|
/* The component is checkpoint ready */
|
|
|
|
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
2005-01-30 21:44:00 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
/* Initialization / querying functions */
|
|
|
|
|
|
|
|
mca_coll_demo_init_query,
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_demo_comm_query
|
2004-10-12 18:19:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static int demo_open(void)
|
|
|
|
{
|
|
|
|
mca_coll_demo_priority_param =
|
2012-10-30 23:45:18 +04:00
|
|
|
mca_base_param_reg_int(&mca_coll_demo_component.collm_version,
|
|
|
|
"priority", NULL, false, false, 20, NULL);
|
2004-10-12 18:19:29 +04:00
|
|
|
mca_coll_demo_verbose_param =
|
2012-10-30 23:45:18 +04:00
|
|
|
mca_base_param_reg_int(&mca_coll_demo_component.collm_version,
|
|
|
|
"verbose", NULL, false, false,
|
|
|
|
mca_coll_demo_verbose, NULL);
|
2004-10-12 18:19:29 +04:00
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
2007-08-19 07:37:49 +04:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
mca_coll_demo_module_construct(mca_coll_demo_module_t *module)
|
|
|
|
{
|
|
|
|
memset(&module->underlying, 0, sizeof(mca_coll_base_comm_coll_t));
|
|
|
|
}
|
|
|
|
|
|
|
|
#define RELEASE(module, func) \
|
|
|
|
do { \
|
|
|
|
if (NULL != module->underlying.coll_ ## func ## _module) { \
|
|
|
|
OBJ_RELEASE(module->underlying.coll_ ## func ## _module); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
static void
|
|
|
|
mca_coll_demo_module_destruct(mca_coll_demo_module_t *module)
|
|
|
|
{
|
|
|
|
RELEASE(module, allgather);
|
|
|
|
RELEASE(module, allgatherv);
|
|
|
|
RELEASE(module, allreduce);
|
|
|
|
RELEASE(module, alltoall);
|
|
|
|
RELEASE(module, alltoallv);
|
|
|
|
RELEASE(module, alltoallw);
|
|
|
|
RELEASE(module, barrier);
|
|
|
|
RELEASE(module, bcast);
|
|
|
|
RELEASE(module, exscan);
|
|
|
|
RELEASE(module, gather);
|
|
|
|
RELEASE(module, gatherv);
|
|
|
|
RELEASE(module, reduce);
|
|
|
|
RELEASE(module, reduce_scatter);
|
|
|
|
RELEASE(module, scan);
|
|
|
|
RELEASE(module, scatter);
|
|
|
|
RELEASE(module, scatterv);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
OBJ_CLASS_INSTANCE(mca_coll_demo_module_t,
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_coll_base_module_t,
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_demo_module_construct,
|
|
|
|
mca_coll_demo_module_destruct);
|