1
1
openmpi/ompi/mca/bml/base/bml_base_init.c
Galen Shipman 5271948ec0 --- opal object changes
add object size to opal class
no longer need the size when allocating a new object as this is stored in
the class structure

--- dr changes 
Previous rev. maintained state on the communicator used for acking duplicate
fragments, but the communicator may be destroyed prior to successfull
delivery of an ack to the peer. We must therefore maintain this state
globally on a per peer, not a per peer, per communicator basis. 
This requires that we use a global rank on the wire and translate this as
appropriate to a local rank within the communicator. 

This commit was SVN r9454.
2006-03-29 16:19:17 +00:00

90 строки
3.3 KiB
C

/*
* 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.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi/mca/bml/base/base.h"
#include "opal/mca/base/base.h"
#include "opal/mca/mca.h"
int mca_bml_base_output = -1;
OMPI_DECLSPEC mca_bml_base_module_t mca_bml = {
NULL, /* bml_component */
0, /* bml_eager_limit */
0, /* bml_min_send_size */
0, /* bml_max_send_size */
0, /* bml_min_rdma_size */
0, /* bml_max_rdma_size */
NULL, /* bml_add_procs */
NULL, /* bml_del_procs */
NULL, /* bml_register */
NULL, /* bml_finalize*/
NULL /* bml_progress */
};
mca_bml_base_component_t mca_bml_component;
int mca_bml_base_init( bool enable_progress_threads,
bool enable_mpi_threads,
opal_class_t* endpoint_class) {
opal_list_item_t *item = NULL;
mca_bml_base_component_t *component = NULL, *best_component = NULL;
mca_bml_base_module_t *module = NULL, *best_module = NULL;
int priority = 0, best_priority = -1;
mca_base_component_list_item_t *cli = NULL;
for (item = opal_list_get_first(&mca_bml_base_components_available);
opal_list_get_end(&mca_bml_base_components_available) != item;
item = opal_list_get_next(item)) {
cli = (mca_base_component_list_item_t*) item;
component = (mca_bml_base_component_t*) cli->cli_component;
if(NULL == component->bml_init) {
opal_output_verbose( 10, mca_bml_base_output,
"select: no init function; ignoring component %s",
component->bml_version.mca_component_name );
continue;
}
module = component->bml_init(&priority,
enable_progress_threads,
enable_mpi_threads,
endpoint_class);
if(NULL == module) {
continue;
}
if(priority > best_priority) {
best_priority = priority;
best_component = component;
best_module = module;
}
}
if(NULL == best_module) {
return OMPI_SUCCESS;
}
else {
mca_bml_component = *best_component;
mca_bml = *best_module;
return mca_base_components_close(mca_bml_base_output,
&mca_bml_base_components_available,
(mca_base_component_t*) best_component);
}
}