1
1

Nothing of substance; just indenting changes (''finally'' update this

framework base to 4 space tabs!).

This commit was SVN r20173.
Этот коммит содержится в:
Jeff Squyres 2008-12-31 12:17:08 +00:00
родитель ce313fa391
Коммит 865900dd27
7 изменённых файлов: 225 добавлений и 235 удалений

Просмотреть файл

@ -43,7 +43,6 @@
*/
BEGIN_C_DECLS
/**
* Initialize the coll MCA framework
*
@ -205,5 +204,4 @@ extern bool mca_coll_base_components_available_valid;
extern opal_list_t mca_coll_base_components_available;
END_C_DECLS
#endif /* MCA_BASE_COLL_H */

Просмотреть файл

@ -30,8 +30,8 @@
int mca_coll_base_close(void)
{
/* Close all components that are still open. This may be the opened
list (if we're in ompi_info), or it may be the available list (if
we're anywhere else). */
* list (if we're in ompi_info), or it may be the available list (if
* we're anywhere else). */
if (mca_coll_base_components_opened_valid) {
mca_base_components_close(mca_coll_base_output,
@ -40,7 +40,8 @@ int mca_coll_base_close(void)
mca_coll_base_components_opened_valid = false;
} else if (mca_coll_base_components_available_valid) {
mca_base_components_close(mca_coll_base_output,
&mca_coll_base_components_available, NULL);
&mca_coll_base_components_available,
NULL);
OBJ_DESTRUCT(&mca_coll_base_components_available);
mca_coll_base_components_available_valid = false;
}

Просмотреть файл

@ -38,11 +38,6 @@
#include "ompi/mca/coll/base/base.h"
/*
* Local variables
*/
/*
* Local types
*/
@ -58,20 +53,21 @@ typedef struct avail_coll_t avail_coll_t;
/*
* Local functions
*/
static opal_list_t *check_components(opal_list_t *components,
ompi_communicator_t *comm,
static opal_list_t *check_components(opal_list_t * components,
ompi_communicator_t * comm,
char **names, int num_names);
static int check_one_component(ompi_communicator_t *comm,
const mca_base_component_t *component,
mca_coll_base_module_2_0_0_t **module);
static int check_one_component(ompi_communicator_t * comm,
const mca_base_component_t * component,
mca_coll_base_module_2_0_0_t ** module);
static int query(const mca_base_component_t *component,
ompi_communicator_t *comm, int *priority,
mca_coll_base_module_2_0_0_t **module);
static int query(const mca_base_component_t * component,
ompi_communicator_t * comm, int *priority,
mca_coll_base_module_2_0_0_t ** module);
static int query_2_0_0(const mca_coll_base_component_2_0_0_t *coll_component,
ompi_communicator_t *comm, int *priority,
mca_coll_base_module_2_0_0_t **module);
static int query_2_0_0(const mca_coll_base_component_2_0_0_t *
coll_component, ompi_communicator_t * comm,
int *priority,
mca_coll_base_module_2_0_0_t ** module);
/*
* Stuff for the OBJ interface
@ -98,7 +94,7 @@ static OBJ_CLASS_INSTANCE(avail_coll_t, opal_list_item_t, NULL, NULL);
*
* This selection logic is not for the weak.
*/
int mca_coll_base_comm_select(ompi_communicator_t *comm)
int mca_coll_base_comm_select(ompi_communicator_t * comm)
{
int ret, num_names;
char name[MPI_MAX_OBJECT_NAME + 32];
@ -115,7 +111,7 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm)
name);
/* Initialize all the relevant pointers, since they're used as
sentinel values */
* sentinel values */
memset(&comm->c_coll, 0, sizeof(mca_coll_base_comm_coll_t));
/* See if a set of component was requested by the MCA parameter.
@ -157,10 +153,9 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm)
/* do the selection loop */
for (item = opal_list_remove_first(selectable);
NULL != item;
item = opal_list_remove_first(selectable)) {
NULL != item; item = opal_list_remove_first(selectable)) {
avail_coll_t *avail = (avail_coll_t*) item;
avail_coll_t *avail = (avail_coll_t *) item;
/* initialize the module */
ret = avail->ac_module->coll_module_enable(avail->ac_module, comm);
@ -204,14 +199,14 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm)
(NULL == comm->c_coll.coll_alltoallw) ||
(NULL == comm->c_coll.coll_barrier) ||
(NULL == comm->c_coll.coll_bcast) ||
((OMPI_COMM_IS_INTRA(comm)) && (NULL == comm->c_coll.coll_exscan)) ||
(NULL == comm->c_coll.coll_gather) ||
(NULL == comm->c_coll.coll_gatherv) ||
(NULL == comm->c_coll.coll_reduce) ||
(NULL == comm->c_coll.coll_reduce_scatter) ||
((OMPI_COMM_IS_INTRA(comm)) && (NULL == comm->c_coll.coll_scan)) ||
(NULL == comm->c_coll.coll_scatter) ||
(NULL == comm->c_coll.coll_scatterv)) {
((OMPI_COMM_IS_INTRA(comm)) && (NULL == comm->c_coll.coll_exscan))
|| (NULL == comm->c_coll.coll_gather)
|| (NULL == comm->c_coll.coll_gatherv)
|| (NULL == comm->c_coll.coll_reduce)
|| (NULL == comm->c_coll.coll_reduce_scatter)
|| ((OMPI_COMM_IS_INTRA(comm)) && (NULL == comm->c_coll.coll_scan))
|| (NULL == comm->c_coll.coll_scatter)
|| (NULL == comm->c_coll.coll_scatterv)) {
mca_coll_base_comm_unselect(comm);
return OMPI_ERR_NOT_FOUND;
}
@ -227,8 +222,8 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm)
* only those who returned that they want to run, and put them in
* priority order.
*/
static opal_list_t *check_components(opal_list_t *components,
ompi_communicator_t *comm,
static opal_list_t *check_components(opal_list_t * components,
ompi_communicator_t * comm,
char **names, int num_names)
{
int i, priority;
@ -266,33 +261,35 @@ static opal_list_t *check_components(opal_list_t *components,
}
/* If we determined that we want to check this component, then do
so */
* so */
if (want_to_check) {
priority = check_one_component(comm, component, &module);
if (priority >= 0) {
/* We have a component that indicated that it wants to run by
giving us a module */
* giving us a module */
avail = OBJ_NEW(avail_coll_t);
avail->ac_priority = priority;
avail->ac_module = module;
/* Put this item on the list in priority order (lowest
priority first). Should it go first? */
for(item2 = opal_list_get_first(selectable);
* priority first). Should it go first? */
for (item2 = opal_list_get_first(selectable);
item2 != opal_list_get_end(selectable);
item2 = opal_list_get_next(item2)) {
avail2 = (avail_coll_t*)item2;
if(avail->ac_priority < avail2->ac_priority) {
avail2 = (avail_coll_t *) item2;
if (avail->ac_priority < avail2->ac_priority) {
opal_list_insert_pos(selectable,
item2, (opal_list_item_t*)avail);
item2,
(opal_list_item_t *) avail);
break;
}
}
if(opal_list_get_end(selectable) == item2) {
opal_list_append(selectable, (opal_list_item_t*)avail);
if (opal_list_get_end(selectable) == item2) {
opal_list_append(selectable,
(opal_list_item_t *) avail);
}
}
}
@ -312,9 +309,9 @@ static opal_list_t *check_components(opal_list_t *components,
/*
* Check a single component
*/
static int check_one_component(ompi_communicator_t *comm,
const mca_base_component_t *component,
mca_coll_base_module_2_0_0_t **module)
static int check_one_component(ompi_communicator_t * comm,
const mca_base_component_t * component,
mca_coll_base_module_2_0_0_t ** module)
{
int err;
int priority = -1;
@ -346,9 +343,9 @@ static int check_one_component(ompi_communicator_t *comm,
* Take any version of a coll module, query it, and return the right
* module struct
*/
static int query(const mca_base_component_t *component,
ompi_communicator_t *comm,
int *priority, mca_coll_base_module_2_0_0_t **module)
static int query(const mca_base_component_t * component,
ompi_communicator_t * comm,
int *priority, mca_coll_base_module_2_0_0_t ** module)
{
*module = NULL;
if (2 == component->mca_type_major_version &&
@ -366,9 +363,9 @@ static int query(const mca_base_component_t *component,
}
static int query_2_0_0(const mca_coll_base_component_2_0_0_t *component,
ompi_communicator_t *comm, int *priority,
mca_coll_base_module_2_0_0_t **module)
static int query_2_0_0(const mca_coll_base_component_2_0_0_t * component,
ompi_communicator_t * comm, int *priority,
mca_coll_base_module_2_0_0_t ** module)
{
mca_coll_base_module_2_0_0_t *ret;

Просмотреть файл

@ -39,7 +39,7 @@
} \
} while (0)
int mca_coll_base_comm_unselect(ompi_communicator_t *comm)
int mca_coll_base_comm_unselect(ompi_communicator_t * comm)
{
CLOSE(comm, allgather);
CLOSE(comm, allgatherv);
@ -61,4 +61,3 @@ int mca_coll_base_comm_unselect(ompi_communicator_t *comm)
/* All done */
return OMPI_SUCCESS;
}

Просмотреть файл

@ -44,13 +44,13 @@ opal_list_t mca_coll_base_components_available;
/*
* Private functions
*/
static int init_query(const mca_base_component_t *ls,
mca_base_component_priority_list_item_t *entry,
static int init_query(const mca_base_component_t * ls,
mca_base_component_priority_list_item_t * entry,
bool enable_progress_threads,
bool enable_mpi_threads);
static int init_query_2_0_0(const mca_base_component_t *ls,
mca_base_component_priority_list_item_t *entry,
bool enable_progress_threads,
static int init_query_2_0_0(const mca_base_component_t * ls,
mca_base_component_priority_list_item_t *
entry, bool enable_progress_threads,
bool enable_mpi_threads);
/*
@ -102,9 +102,9 @@ int mca_coll_base_find_available(bool enable_progress_threads,
found = true;
} else {
/* If the component doesn't want to run, then close it. It's
already had its close() method invoked; now close it out of
the DSO repository (if it's there). */
/* If the component doesn't want to run, then close it.
It's already had its close() method invoked; now close
it out of the DSO repository (if it's there). */
mca_base_component_repository_release(component);
OBJ_RELEASE(entry);
@ -144,10 +144,9 @@ int mca_coll_base_find_available(bool enable_progress_threads,
* Query a component, see if it wants to run at all. If it does, save
* some information. If it doesn't, close it.
*/
static int init_query(const mca_base_component_t *m,
mca_base_component_priority_list_item_t *entry,
bool enable_progress_threads,
bool enable_mpi_threads)
static int init_query(const mca_base_component_t * m,
mca_base_component_priority_list_item_t * entry,
bool enable_progress_threads, bool enable_mpi_threads)
{
int ret;
@ -155,8 +154,8 @@ static int init_query(const mca_base_component_t *m,
"coll:find_available: querying coll component %s",
m->mca_component_name);
/* This component has already been successfully opened. So now query
it. */
/* This component has already been successfully opened. So now
query it. */
if (2 == m->mca_type_major_version &&
0 == m->mca_type_minor_version &&
@ -198,8 +197,8 @@ static int init_query(const mca_base_component_t *m,
/*
* Query a specific component, coll v2.0.0
*/
static int init_query_2_0_0(const mca_base_component_t *component,
mca_base_component_priority_list_item_t *entry,
static int init_query_2_0_0(const mca_base_component_t * component,
mca_base_component_priority_list_item_t * entry,
bool enable_progress_threads,
bool enable_mpi_threads)
{

Просмотреть файл

@ -31,7 +31,6 @@
#include "ompi/mca/coll/coll.h"
#include "ompi/mca/coll/base/base.h"
/*
* The following file was created by configure. It contains extern
* statements and the definition of an array of pointers to each
@ -40,7 +39,6 @@
#include "ompi/mca/coll/base/static-components.h"
/*
* Global variables; most of which are loaded by back-ends of MCA
* variables

Просмотреть файл

@ -40,6 +40,4 @@
#define MCA_COLL_BASE_TAG_SCAN -23
#define MCA_COLL_BASE_TAG_SCATTER -24
#define MCA_COLL_BASE_TAG_SCATTERV -25
#endif /* MCA_COLL_BASE_TAGS_H */