2004-01-12 00:26:55 +03: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-01-12 00:26:55 +03: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
|
2004-06-07 19:33:53 +04:00
|
|
|
* prevents utility programs such as "ompi_info" from having to import
|
2004-08-02 04:24:22 +04:00
|
|
|
* entire components just to query their version and parameters.
|
2004-01-12 00:26:55 +03:00
|
|
|
*/
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2004-02-15 00:26:30 +03:00
|
|
|
#include "coll_basic.h"
|
2004-01-12 00:26:55 +03:00
|
|
|
|
|
|
|
#include "mpi.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/mca/coll/coll.h"
|
2004-01-12 00:26:55 +03:00
|
|
|
#include "coll_basic.h"
|
|
|
|
|
|
|
|
/*
|
2004-08-02 04:24:22 +04:00
|
|
|
* Public string showing the coll ompi_basic component version number
|
2004-01-12 00:26:55 +03:00
|
|
|
*/
|
2004-08-02 04:24:22 +04:00
|
|
|
const char *mca_coll_basic_component_version_string =
|
2005-08-10 14:51:42 +04:00
|
|
|
"Open MPI basic collective MCA component version " OMPI_VERSION;
|
2004-01-12 00:26:55 +03:00
|
|
|
|
2004-10-12 16:38:56 +04:00
|
|
|
/*
|
2005-10-04 01:07:42 +04:00
|
|
|
* Global variables
|
2004-10-12 16:38:56 +04:00
|
|
|
*/
|
2005-10-04 01:07:42 +04:00
|
|
|
int mca_coll_basic_priority = 10;
|
|
|
|
int mca_coll_basic_crossover = 4;
|
2004-10-12 16:38:56 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Local function
|
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
static int basic_register(void);
|
2004-10-12 16:38:56 +04:00
|
|
|
|
2004-01-12 00:26:55 +03: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_basic_component = {
|
2004-01-12 00:26:55 +03:00
|
|
|
|
2005-08-10 14:51:42 +04:00
|
|
|
/* First, the mca_component_t struct containing meta information
|
|
|
|
* about the component itself */
|
2004-01-12 00:26:55 +03:00
|
|
|
|
2005-08-10 14:51:42 +04:00
|
|
|
{
|
2008-07-29 02:40:57 +04:00
|
|
|
MCA_COLL_BASE_VERSION_2_0_0,
|
2004-01-12 00:26:55 +03:00
|
|
|
|
2005-08-10 14:51:42 +04:00
|
|
|
/* Component name and version */
|
|
|
|
"basic",
|
|
|
|
OMPI_MAJOR_VERSION,
|
|
|
|
OMPI_MINOR_VERSION,
|
|
|
|
OMPI_RELEASE_VERSION,
|
2004-01-12 00:26:55 +03:00
|
|
|
|
2005-08-10 14:51:42 +04:00
|
|
|
/* Component open and close functions */
|
2008-07-29 02:40:57 +04:00
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
basic_register
|
2005-10-04 01:07:42 +04:00
|
|
|
},
|
2005-08-10 14:51:42 +04:00
|
|
|
{
|
2007-03-17 02:11:45 +03:00
|
|
|
/* The component is checkpoint ready */
|
|
|
|
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
2005-10-04 01:07:42 +04:00
|
|
|
},
|
2004-01-12 00:26:55 +03:00
|
|
|
|
2005-08-10 14:51:42 +04:00
|
|
|
/* Initialization / querying functions */
|
2004-01-12 00:26:55 +03:00
|
|
|
|
2005-08-10 14:51:42 +04:00
|
|
|
mca_coll_basic_init_query,
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_basic_comm_query
|
2004-01-12 00:26:55 +03:00
|
|
|
};
|
2004-10-12 16:38:56 +04:00
|
|
|
|
|
|
|
|
2005-08-10 14:51:42 +04:00
|
|
|
static int
|
2008-07-29 02:40:57 +04:00
|
|
|
basic_register(void)
|
2004-10-12 16:38:56 +04:00
|
|
|
{
|
|
|
|
/* Use a low priority, but allow other components to be lower */
|
2005-08-10 14:51:42 +04:00
|
|
|
|
2005-10-04 01:07:42 +04:00
|
|
|
mca_base_param_reg_int(&mca_coll_basic_component.collm_version,
|
|
|
|
"priority",
|
|
|
|
"Priority of the basic coll component",
|
|
|
|
false, false, mca_coll_basic_priority,
|
|
|
|
&mca_coll_basic_priority);
|
|
|
|
mca_base_param_reg_int(&mca_coll_basic_component.collm_version,
|
|
|
|
"crossover",
|
|
|
|
"Minimum number of processes in a communicator before using the logarithmic algorithms",
|
|
|
|
false, false, mca_coll_basic_crossover,
|
|
|
|
&mca_coll_basic_crossover);
|
2004-10-12 16:38:56 +04:00
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
2007-08-19 07:37:49 +04:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
mca_coll_basic_module_construct(mca_coll_basic_module_t *module)
|
|
|
|
{
|
|
|
|
module->mccb_reqs = NULL;
|
|
|
|
module->mccb_num_reqs = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
mca_coll_basic_module_destruct(mca_coll_basic_module_t *module)
|
|
|
|
{
|
|
|
|
if (NULL != module->mccb_reqs) free(module->mccb_reqs);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
OBJ_CLASS_INSTANCE(mca_coll_basic_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_basic_module_construct,
|
|
|
|
mca_coll_basic_module_destruct);
|