2013-07-16 20:02:25 +04:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2005-05-24 02:06:50 +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.
|
2009-02-12 00:48:11 +03:00
|
|
|
* Copyright (c) 2004-2009 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-05-24 02:06:50 +04:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2010-07-06 18:33:36 +04:00
|
|
|
* Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved.
|
2010-09-18 03:04:06 +04:00
|
|
|
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved
|
2013-07-16 20:02:25 +04:00
|
|
|
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2005-05-24 02:06:50 +04:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
Update libevent to the 2.0 series, currently at 2.0.7rc. We will update to their final release when it becomes available. Currently known errors exist in unused portions of the libevent code. This revision passes the IBM test suite on a Linux machine and on a standalone Mac.
This is a fairly intrusive change, but outside of the moving of opal/event to opal/mca/event, the only changes involved (a) changing all calls to opal_event functions to reflect the new framework instead, and (b) ensuring that all opal_event_t objects are properly constructed since they are now true opal_objects.
Note: Shiqing has just returned from vacation and has not yet had a chance to complete the Windows integration. Thus, this commit almost certainly breaks Windows support on the trunk. However, I want this to have a chance to soak for as long as possible before I become less available a week from today (going to be at a class for 5 days, and thus will only be sparingly available) so we can find and fix any problems.
Biggest change is moving the libevent code from opal/event to a new opal/mca/event framework. This was done to make it much easier to update libevent in the future. New versions can be inserted as a new component and tested in parallel with the current version until validated, then we can remove the earlier version if we so choose. This is a statically built framework ala installdirs, so only one component will build at a time. There is no selection logic - the sole compiled component simply loads its function pointers into the opal_event struct.
I have gone thru the code base and converted all the libevent calls I could find. However, I cannot compile nor test every environment. It is therefore quite likely that errors remain in the system. Please keep an eye open for two things:
1. compile-time errors: these will be obvious as calls to the old functions (e.g., opal_evtimer_new) must be replaced by the new framework APIs (e.g., opal_event.evtimer_new)
2. run-time errors: these will likely show up as segfaults due to missing constructors on opal_event_t objects. It appears that it became a typical practice for people to "init" an opal_event_t by simply using memset to zero it out. This will no longer work - you must either OBJ_NEW or OBJ_CONSTRUCT an opal_event_t. I tried to catch these cases, but may have missed some. Believe me, you'll know when you hit it.
There is also the issue of the new libevent "no recursion" behavior. As I described on a recent email, we will have to discuss this and figure out what, if anything, we need to do.
This commit was SVN r23925.
2010-10-24 22:35:54 +04:00
|
|
|
#include "opal/mca/event/event.h"
|
2005-05-24 02:06:50 +04:00
|
|
|
#include "mpi.h"
|
2007-01-21 17:02:06 +03:00
|
|
|
#include "ompi/runtime/params.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/mca/pml/pml.h"
|
|
|
|
#include "ompi/mca/pml/base/pml_base_bsend.h"
|
2005-05-24 02:06:50 +04:00
|
|
|
#include "pml_ob1.h"
|
|
|
|
#include "pml_ob1_hdr.h"
|
|
|
|
#include "pml_ob1_sendreq.h"
|
|
|
|
#include "pml_ob1_recvreq.h"
|
2005-06-10 00:16:33 +04:00
|
|
|
#include "pml_ob1_rdmafrag.h"
|
2005-06-07 18:12:47 +04:00
|
|
|
#include "pml_ob1_recvfrag.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/mca/bml/base/base.h"
|
2006-08-24 20:38:08 +04:00
|
|
|
#include "pml_ob1_component.h"
|
2007-03-22 04:00:34 +03:00
|
|
|
#include "ompi/mca/allocator/base/base.h"
|
2013-07-16 20:03:33 +04:00
|
|
|
#include "opal/mca/base/mca_base_pvar.h"
|
2013-07-16 20:02:25 +04:00
|
|
|
|
2007-07-11 03:45:23 +04:00
|
|
|
OBJ_CLASS_INSTANCE( mca_pml_ob1_pckt_pending_t,
|
|
|
|
ompi_free_list_item_t,
|
|
|
|
NULL,
|
|
|
|
NULL );
|
|
|
|
|
2013-03-28 01:09:41 +04:00
|
|
|
static int mca_pml_ob1_component_register(void);
|
2007-07-11 03:45:23 +04:00
|
|
|
static int mca_pml_ob1_component_open(void);
|
|
|
|
static int mca_pml_ob1_component_close(void);
|
|
|
|
static mca_pml_base_module_t*
|
|
|
|
mca_pml_ob1_component_init( int* priority, bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads );
|
|
|
|
static int mca_pml_ob1_component_fini(void);
|
2010-04-07 17:51:42 +04:00
|
|
|
int mca_pml_ob1_output = 0;
|
2013-03-28 01:09:41 +04:00
|
|
|
static int mca_pml_ob1_verbose = 0;
|
2006-07-20 18:44:35 +04:00
|
|
|
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_pml_base_component_2_0_0_t mca_pml_ob1_component = {
|
2005-05-24 02:06:50 +04:00
|
|
|
|
|
|
|
/* First, the mca_base_component_t struct containing meta
|
|
|
|
information about the component itself */
|
|
|
|
|
|
|
|
{
|
2008-07-29 02:40:57 +04:00
|
|
|
MCA_PML_BASE_VERSION_2_0_0,
|
2005-05-24 02:06:50 +04:00
|
|
|
|
|
|
|
"ob1", /* MCA component name */
|
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, /* MCA component major version */
|
|
|
|
OMPI_MINOR_VERSION, /* MCA component minor version */
|
|
|
|
OMPI_RELEASE_VERSION, /* MCA component release version */
|
2005-05-24 02:06:50 +04:00
|
|
|
mca_pml_ob1_component_open, /* component open */
|
2013-03-28 01:09:41 +04:00
|
|
|
mca_pml_ob1_component_close, /* component close */
|
|
|
|
NULL,
|
|
|
|
mca_pml_ob1_component_register
|
2005-05-24 02:06:50 +04:00
|
|
|
},
|
|
|
|
{
|
2007-03-17 02:11:45 +03:00
|
|
|
/* The component is checkpoint ready */
|
|
|
|
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
2005-05-24 02:06:50 +04:00
|
|
|
},
|
|
|
|
|
|
|
|
mca_pml_ob1_component_init, /* component init */
|
|
|
|
mca_pml_ob1_component_fini /* component finalize */
|
2007-03-22 04:00:34 +03:00
|
|
|
|
2005-05-24 02:06:50 +04:00
|
|
|
};
|
|
|
|
|
2007-03-22 04:00:34 +03:00
|
|
|
void *mca_pml_ob1_seg_alloc( struct mca_mpool_base_module_t* mpool,
|
|
|
|
size_t* size,
|
|
|
|
mca_mpool_base_registration_t** registration);
|
|
|
|
|
|
|
|
void mca_pml_ob1_seg_free( struct mca_mpool_base_module_t* mpool,
|
|
|
|
void* segment );
|
2005-05-24 02:06:50 +04:00
|
|
|
|
|
|
|
static inline int mca_pml_ob1_param_register_int(
|
|
|
|
const char* param_name,
|
2013-03-28 01:09:41 +04:00
|
|
|
int default_value,
|
|
|
|
int *storage)
|
2005-05-24 02:06:50 +04:00
|
|
|
{
|
2013-03-28 01:09:41 +04:00
|
|
|
*storage = default_value;
|
|
|
|
(void) mca_base_component_var_register(&mca_pml_ob1_component.pmlm_version, param_name,
|
|
|
|
NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY, storage);
|
|
|
|
return *storage;
|
|
|
|
}
|
2012-10-30 23:45:18 +04:00
|
|
|
|
2013-03-28 01:09:41 +04:00
|
|
|
static inline unsigned int mca_pml_ob1_param_register_uint(
|
|
|
|
const char* param_name,
|
|
|
|
unsigned int default_value,
|
|
|
|
unsigned int *storage)
|
|
|
|
{
|
|
|
|
*storage = default_value;
|
|
|
|
(void) mca_base_component_var_register(&mca_pml_ob1_component.pmlm_version, param_name,
|
|
|
|
NULL, MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY, storage);
|
|
|
|
return *storage;
|
|
|
|
}
|
2012-10-30 23:45:18 +04:00
|
|
|
|
2013-03-28 01:09:41 +04:00
|
|
|
static inline size_t mca_pml_ob1_param_register_sizet(
|
|
|
|
const char* param_name,
|
|
|
|
size_t default_value,
|
|
|
|
size_t *storage)
|
|
|
|
{
|
|
|
|
*storage = default_value;
|
|
|
|
(void) mca_base_component_var_register(&mca_pml_ob1_component.pmlm_version, param_name,
|
|
|
|
NULL, MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY, storage);
|
|
|
|
return *storage;
|
2005-05-24 02:06:50 +04:00
|
|
|
}
|
|
|
|
|
2013-07-16 20:02:25 +04:00
|
|
|
static int mca_pml_ob1_comm_size_notify (mca_base_pvar_t *pvar, mca_base_pvar_event_t event, void *obj_handle, int *count)
|
|
|
|
{
|
|
|
|
if (MCA_BASE_PVAR_HANDLE_BIND == event) {
|
|
|
|
/* Return the size of the communicator as the number of values */
|
|
|
|
*count = ompi_comm_size ((ompi_communicator_t *) obj_handle);
|
|
|
|
}
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2013-07-17 07:41:05 +04:00
|
|
|
static int mca_pml_ob1_get_unex_msgq_size (const struct mca_base_pvar_t *pvar, void *value, void *obj_handle)
|
2013-07-16 20:02:25 +04:00
|
|
|
{
|
|
|
|
ompi_communicator_t *comm = (ompi_communicator_t *) obj_handle;
|
|
|
|
mca_pml_ob1_comm_t *pml_comm = comm->c_pml_comm;
|
|
|
|
int comm_size = ompi_comm_size (comm);
|
|
|
|
unsigned *values = (unsigned *) value;
|
|
|
|
mca_pml_ob1_comm_proc_t *pml_proc;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0 ; i < comm_size ; ++i) {
|
|
|
|
pml_proc = pml_comm->procs + i;
|
|
|
|
|
|
|
|
values[i] = opal_list_get_size (&pml_proc->unexpected_frags);
|
|
|
|
}
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2013-07-17 07:41:05 +04:00
|
|
|
static int mca_pml_ob1_get_posted_recvq_size (const struct mca_base_pvar_t *pvar, void *value, void *obj_handle)
|
2013-07-16 20:02:25 +04:00
|
|
|
{
|
|
|
|
ompi_communicator_t *comm = (ompi_communicator_t *) obj_handle;
|
|
|
|
mca_pml_ob1_comm_t *pml_comm = comm->c_pml_comm;
|
|
|
|
int comm_size = ompi_comm_size (comm);
|
|
|
|
unsigned *values = (unsigned *) value;
|
|
|
|
mca_pml_ob1_comm_proc_t *pml_proc;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0 ; i < comm_size ; ++i) {
|
|
|
|
pml_proc = pml_comm->procs + i;
|
|
|
|
|
|
|
|
values[i] = opal_list_get_size (&pml_proc->specific_receives);
|
|
|
|
}
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2013-03-28 01:09:41 +04:00
|
|
|
static int mca_pml_ob1_component_register(void)
|
2005-05-24 02:06:50 +04:00
|
|
|
{
|
2013-03-28 01:09:41 +04:00
|
|
|
mca_pml_ob1_param_register_int("verbose", 0, &mca_pml_ob1_verbose);
|
2007-07-11 03:45:23 +04:00
|
|
|
|
2013-03-28 01:09:41 +04:00
|
|
|
mca_pml_ob1_param_register_int("free_list_num", 4, &mca_pml_ob1.free_list_num);
|
|
|
|
mca_pml_ob1_param_register_int("free_list_max", -1, &mca_pml_ob1.free_list_max);
|
|
|
|
mca_pml_ob1_param_register_int("free_list_inc", 64, &mca_pml_ob1.free_list_inc);
|
|
|
|
mca_pml_ob1_param_register_int("priority", 20, &mca_pml_ob1.priority);
|
|
|
|
mca_pml_ob1_param_register_sizet("send_pipeline_depth", 3, &mca_pml_ob1.send_pipeline_depth);
|
|
|
|
mca_pml_ob1_param_register_sizet("recv_pipeline_depth", 4, &mca_pml_ob1.recv_pipeline_depth);
|
2012-06-08 03:31:20 +04:00
|
|
|
|
|
|
|
/* NTH: we can get into a live-lock situation in the RDMA failure path so disable
|
|
|
|
RDMA retries for now. Falling back to send may suck but it is better than
|
|
|
|
hanging */
|
|
|
|
mca_pml_ob1.rdma_retries_limit = 0;
|
2013-03-28 01:09:41 +04:00
|
|
|
/* mca_pml_ob1_param_register_sizet("rdma_retries_limit", 5, &mca_pml_ob1.rdma_retries_limit); */
|
2012-06-08 03:31:20 +04:00
|
|
|
|
2013-03-28 01:09:41 +04:00
|
|
|
mca_pml_ob1_param_register_int("max_rdma_per_request", 4, &mca_pml_ob1.max_rdma_per_request);
|
|
|
|
mca_pml_ob1_param_register_int("max_send_per_range", 4, &mca_pml_ob1.max_send_per_range);
|
2007-06-03 12:31:58 +04:00
|
|
|
|
2013-03-28 01:09:41 +04:00
|
|
|
mca_pml_ob1_param_register_uint("unexpected_limit", 128, &mca_pml_ob1.unexpected_limit);
|
2007-03-22 04:00:34 +03:00
|
|
|
|
2013-03-28 01:09:41 +04:00
|
|
|
mca_pml_ob1.allocator_name = "bucket";
|
|
|
|
(void) mca_base_component_var_register(&mca_pml_ob1_component.pmlm_version, "allocator",
|
|
|
|
"Name of allocator component for unexpected messages",
|
2013-07-16 20:02:25 +04:00
|
|
|
MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY, &mca_pml_ob1.allocator_name);
|
|
|
|
|
|
|
|
(void) mca_base_pvar_register ("ompi", "pml", "ob1", "unexpected_msgq_length", "Number of unexpected messages "
|
|
|
|
"received by each peer in a communicator", OPAL_INFO_LVL_4, MPI_T_PVAR_CLASS_SIZE,
|
|
|
|
MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, MPI_T_BIND_MPI_COMM,
|
|
|
|
MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_CONTINUOUS,
|
|
|
|
mca_pml_ob1_get_unex_msgq_size, NULL, mca_pml_ob1_comm_size_notify, NULL);
|
|
|
|
|
|
|
|
(void) mca_base_pvar_register ("ompi", "pml", "ob1", "posted_recvq_length", "Number of unmatched receives "
|
|
|
|
"posted for each peer in a communicator", OPAL_INFO_LVL_4, MPI_T_PVAR_CLASS_SIZE,
|
|
|
|
MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, MPI_T_BIND_MPI_COMM,
|
|
|
|
MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_CONTINUOUS,
|
|
|
|
mca_pml_ob1_get_posted_recvq_size, NULL, mca_pml_ob1_comm_size_notify, NULL);
|
2013-03-28 01:09:41 +04:00
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int mca_pml_ob1_component_open(void)
|
|
|
|
{
|
|
|
|
mca_allocator_base_component_t* allocator_component;
|
|
|
|
|
|
|
|
mca_pml_ob1_output = opal_output_open(NULL);
|
|
|
|
opal_output_set_verbosity(mca_pml_ob1_output, mca_pml_ob1_verbose);
|
2007-03-22 04:00:34 +03:00
|
|
|
|
|
|
|
allocator_component = mca_allocator_component_lookup( mca_pml_ob1.allocator_name );
|
|
|
|
if(NULL == allocator_component) {
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output(0, "mca_pml_ob1_component_open: can't find allocator: %s\n", mca_pml_ob1.allocator_name);
|
2007-03-22 04:00:34 +03:00
|
|
|
return OMPI_ERROR;
|
|
|
|
}
|
2009-02-12 00:48:11 +03:00
|
|
|
|
2007-03-22 04:00:34 +03:00
|
|
|
mca_pml_ob1.allocator = allocator_component->allocator_init(true,
|
2007-07-11 03:45:23 +04:00
|
|
|
mca_pml_ob1_seg_alloc,
|
|
|
|
mca_pml_ob1_seg_free, NULL);
|
2007-03-22 04:00:34 +03:00
|
|
|
if(NULL == mca_pml_ob1.allocator) {
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output(0, "mca_pml_ob1_component_open: unable to initialize allocator\n");
|
2007-03-22 04:00:34 +03:00
|
|
|
return OMPI_ERROR;
|
|
|
|
}
|
|
|
|
|
2005-08-12 06:41:14 +04:00
|
|
|
mca_pml_ob1.enabled = false;
|
2013-03-28 01:17:31 +04:00
|
|
|
return mca_base_framework_open(&ompi_bml_base_framework, 0);
|
2005-05-24 02:06:50 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-07-11 03:45:23 +04:00
|
|
|
static int mca_pml_ob1_component_close(void)
|
2005-05-24 02:06:50 +04:00
|
|
|
{
|
|
|
|
int rc;
|
2005-07-12 09:40:56 +04:00
|
|
|
|
2013-03-28 01:17:31 +04:00
|
|
|
if (OMPI_SUCCESS != (rc = mca_base_framework_close(&ompi_bml_base_framework))) {
|
2009-02-13 06:45:11 +03:00
|
|
|
return rc;
|
|
|
|
}
|
2011-07-08 20:39:58 +04:00
|
|
|
opal_output_close(mca_pml_ob1_output);
|
2005-05-24 02:06:50 +04:00
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-07-11 03:45:23 +04:00
|
|
|
static mca_pml_base_module_t*
|
|
|
|
mca_pml_ob1_component_init( int* priority,
|
|
|
|
bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads )
|
2005-05-24 02:06:50 +04:00
|
|
|
{
|
2010-09-22 17:48:22 +04:00
|
|
|
opal_output_verbose( 10, mca_pml_ob1_output,
|
2007-02-03 05:01:18 +03:00
|
|
|
"in ob1, my priority is %d\n", mca_pml_ob1.priority);
|
2010-09-22 17:48:22 +04:00
|
|
|
|
2007-02-03 05:01:18 +03:00
|
|
|
if((*priority) > mca_pml_ob1.priority) {
|
|
|
|
*priority = mca_pml_ob1.priority;
|
|
|
|
return NULL;
|
|
|
|
}
|
2005-05-24 02:06:50 +04:00
|
|
|
*priority = mca_pml_ob1.priority;
|
|
|
|
|
2006-03-29 20:19:17 +04:00
|
|
|
if(OMPI_SUCCESS != mca_bml_base_init( enable_progress_threads,
|
2006-07-04 05:20:20 +04:00
|
|
|
enable_mpi_threads)) {
|
2006-02-13 19:28:25 +03:00
|
|
|
return NULL;
|
2006-03-29 20:19:17 +04:00
|
|
|
}
|
2007-07-11 02:16:38 +04:00
|
|
|
|
2008-07-25 02:51:26 +04:00
|
|
|
/* Set this here (vs in component_open()) because
|
|
|
|
ompi_mpi_leave_pinned* may have been set after MCA params were
|
|
|
|
read (e.g., by the openib btl) */
|
2008-09-17 02:06:14 +04:00
|
|
|
mca_pml_ob1.leave_pinned = (1 == ompi_mpi_leave_pinned);
|
2008-07-25 02:51:26 +04:00
|
|
|
mca_pml_ob1.leave_pinned_pipeline = (int) ompi_mpi_leave_pinned_pipeline;
|
|
|
|
|
2005-05-24 02:06:50 +04:00
|
|
|
return &mca_pml_ob1.super;
|
|
|
|
}
|
|
|
|
|
2007-07-11 03:45:23 +04:00
|
|
|
int mca_pml_ob1_component_fini(void)
|
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
/* Shutdown BML */
|
|
|
|
if(OMPI_SUCCESS != (rc = mca_bml.bml_finalize()))
|
|
|
|
return rc;
|
|
|
|
|
|
|
|
if(!mca_pml_ob1.enabled)
|
|
|
|
return OMPI_SUCCESS; /* never selected.. return success.. */
|
|
|
|
mca_pml_ob1.enabled = false; /* not anymore */
|
|
|
|
|
|
|
|
OBJ_DESTRUCT(&mca_pml_ob1.rdma_pending);
|
|
|
|
OBJ_DESTRUCT(&mca_pml_ob1.pckt_pending);
|
|
|
|
OBJ_DESTRUCT(&mca_pml_ob1.recv_pending);
|
|
|
|
OBJ_DESTRUCT(&mca_pml_ob1.send_pending);
|
2008-09-16 03:04:18 +04:00
|
|
|
OBJ_DESTRUCT(&mca_pml_ob1.non_existing_communicator_pending);
|
2007-07-11 03:45:23 +04:00
|
|
|
OBJ_DESTRUCT(&mca_pml_ob1.buffers);
|
|
|
|
OBJ_DESTRUCT(&mca_pml_ob1.pending_pckts);
|
|
|
|
OBJ_DESTRUCT(&mca_pml_ob1.recv_frags);
|
|
|
|
OBJ_DESTRUCT(&mca_pml_ob1.rdma_frags);
|
|
|
|
OBJ_DESTRUCT(&mca_pml_ob1.lock);
|
|
|
|
|
|
|
|
if(OMPI_SUCCESS != (rc = mca_pml_ob1.allocator->alc_finalize(mca_pml_ob1.allocator))) {
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
if (mca_pml_base_send_requests.fl_num_allocated !=
|
|
|
|
mca_pml_base_send_requests.super.opal_list_length) {
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output(0, "ob1 send requests: %d allocated %d returned\n",
|
2007-07-11 03:45:23 +04:00
|
|
|
mca_pml_base_send_requests.fl_num_allocated,
|
|
|
|
mca_pml_base_send_requests.super.opal_list_length);
|
|
|
|
}
|
|
|
|
if (mca_pml_base_recv_requests.fl_num_allocated !=
|
|
|
|
mca_pml_base_recv_requests.super.opal_list_length) {
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output(0, "ob1 recv requests: %d allocated %d returned\n",
|
2007-07-11 03:45:23 +04:00
|
|
|
mca_pml_base_recv_requests.fl_num_allocated,
|
|
|
|
mca_pml_base_recv_requests.super.opal_list_length);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2007-03-22 04:00:34 +03:00
|
|
|
void *mca_pml_ob1_seg_alloc( struct mca_mpool_base_module_t* mpool,
|
|
|
|
size_t* size,
|
|
|
|
mca_mpool_base_registration_t** registration) {
|
|
|
|
return malloc(*size);
|
|
|
|
}
|
|
|
|
|
|
|
|
void mca_pml_ob1_seg_free( struct mca_mpool_base_module_t* mpool,
|
|
|
|
void* segment ) {
|
|
|
|
free(segment);
|
|
|
|
}
|