2004-08-21 04:49:07 +04:00
|
|
|
/*
|
2004-11-22 04:38:40 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* 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.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-08-21 04:49:07 +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"
|
|
|
|
|
2005-01-30 04:42:57 +03:00
|
|
|
#include "include/constants.h"
|
2004-08-21 04:49:07 +04:00
|
|
|
#include "mca/coll/coll.h"
|
|
|
|
#include "coll_sm.h"
|
2005-01-30 04:42:57 +03:00
|
|
|
|
2004-08-21 04:49:07 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Public string showing the coll ompi_sm component version number
|
|
|
|
*/
|
|
|
|
const char *mca_coll_sm_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
|
|
|
"Open MPI sm collective MCA component version " OMPI_VERSION;
|
2005-01-30 04:42:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
static int sm_open(void);
|
2005-07-16 00:01:35 +04:00
|
|
|
static int sm_close(void);
|
2005-01-30 04:42:57 +03:00
|
|
|
|
2004-08-21 04:49:07 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Instantiate the public struct with all of our public information
|
|
|
|
* and pointers to our public functions in it
|
|
|
|
*/
|
|
|
|
|
2005-07-16 00:01:35 +04:00
|
|
|
mca_coll_sm_component_t mca_coll_sm_component = {
|
2004-08-21 04:49:07 +04:00
|
|
|
|
2005-07-16 00:01:35 +04:00
|
|
|
/* First, fill in the super (mca_coll_base_component_1_0_0_t) */
|
2004-08-21 04:49:07 +04:00
|
|
|
|
2005-01-30 04:42:57 +03:00
|
|
|
{
|
2005-07-16 00:01:35 +04:00
|
|
|
/* First, the mca_component_t struct containing meta
|
|
|
|
information about the component itself */
|
|
|
|
|
|
|
|
{
|
|
|
|
/* Indicate that we are a coll v1.0.0 component (which
|
|
|
|
also implies a specific MCA version) */
|
|
|
|
|
|
|
|
MCA_COLL_BASE_VERSION_1_0_0,
|
|
|
|
|
|
|
|
/* Component name and version */
|
|
|
|
|
|
|
|
"sm",
|
|
|
|
OMPI_MAJOR_VERSION,
|
|
|
|
OMPI_MINOR_VERSION,
|
|
|
|
OMPI_RELEASE_VERSION,
|
|
|
|
|
|
|
|
/* Component open and close functions */
|
|
|
|
|
|
|
|
sm_open,
|
|
|
|
sm_close,
|
|
|
|
},
|
|
|
|
|
|
|
|
/* Next the MCA v1.0.0 component meta data */
|
|
|
|
|
|
|
|
{
|
|
|
|
/* Whether the component is checkpointable or not */
|
|
|
|
|
|
|
|
true
|
|
|
|
},
|
|
|
|
|
|
|
|
/* Initialization / querying functions */
|
|
|
|
|
|
|
|
mca_coll_sm_init_query,
|
|
|
|
mca_coll_sm_comm_query,
|
|
|
|
mca_coll_sm_comm_unquery,
|
2005-01-30 04:42:57 +03:00
|
|
|
},
|
2004-08-21 04:49:07 +04:00
|
|
|
|
2005-07-16 00:01:35 +04:00
|
|
|
/* sm-component specifc information */
|
2004-08-21 04:49:07 +04:00
|
|
|
|
2005-07-16 00:01:35 +04:00
|
|
|
/* priority */
|
|
|
|
75,
|
2004-08-21 04:49:07 +04:00
|
|
|
|
2005-07-16 00:01:35 +04:00
|
|
|
/* mpool name and instance */
|
|
|
|
"sm",
|
|
|
|
NULL
|
2004-08-21 04:49:07 +04:00
|
|
|
};
|
2005-01-30 04:42:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Open the component
|
|
|
|
*/
|
|
|
|
static int sm_open(void)
|
|
|
|
{
|
2005-07-16 00:01:35 +04:00
|
|
|
int p, ival;
|
|
|
|
char *sval;
|
|
|
|
|
2005-01-30 04:42:57 +03:00
|
|
|
/* If we want to be selected (i.e., all procs on one node), then
|
|
|
|
we should have a high priority */
|
2005-07-16 00:01:35 +04:00
|
|
|
|
|
|
|
p = mca_base_param_register_int("coll", "sm", "priority", NULL, 75);
|
|
|
|
mca_base_param_lookup_int(p, &ival);
|
|
|
|
mca_coll_sm_component.sm_priority = ival;
|
|
|
|
|
|
|
|
p = mca_base_param_register_string("coll", "sm", "mpool", NULL, "sm");
|
|
|
|
mca_base_param_lookup_string(p, &sval);
|
|
|
|
mca_coll_sm_component.sm_mpool_name = sval;
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Close the component
|
|
|
|
*/
|
|
|
|
static int sm_close(void)
|
|
|
|
{
|
|
|
|
if (NULL != mca_coll_sm_component.sm_mpool_name) {
|
|
|
|
free(mca_coll_sm_component.sm_mpool_name);
|
|
|
|
mca_coll_sm_component.sm_mpool_name = NULL;
|
|
|
|
}
|
2005-01-30 04:42:57 +03:00
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|