2005-05-31 17:08:41 +00:00
|
|
|
/*
|
2007-03-16 23:11:45 +00:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 19:57:48 +00: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.
|
2005-05-31 17:08:41 +00: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.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
2005-07-03 23:31:27 +00:00
|
|
|
#include "opal/util/output.h"
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "opal/mca/base/mca_base_param.h"
|
|
|
|
#include "orte/util/proc_info.h"
|
|
|
|
#include "orte/util/sys_info.h"
|
2006-03-12 04:45:28 +00:00
|
|
|
#include "mpool_mvapi.h"
|
2005-05-31 17:08:41 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Local functions
|
|
|
|
*/
|
2005-06-30 21:28:35 +00:00
|
|
|
static int mca_mpool_mvapi_open(void);
|
|
|
|
static mca_mpool_base_module_t* mca_mpool_mvapi_init(
|
2005-06-23 15:53:51 +00:00
|
|
|
struct mca_mpool_base_resources_t* resources);
|
2005-05-31 17:08:41 +00:00
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
mca_mpool_mvapi_component_t mca_mpool_mvapi_component = {
|
2005-05-31 17:08:41 +00:00
|
|
|
{
|
|
|
|
/* First, the mca_base_component_t struct containing meta
|
|
|
|
information about the component itself */
|
|
|
|
|
|
|
|
{
|
|
|
|
/* Indicate that we are a mpool v1.0.0 component (which also
|
|
|
|
implies a specific MCA version) */
|
|
|
|
|
2005-07-13 21:13:30 +00:00
|
|
|
MCA_MPOOL_BASE_VERSION_1_0_0,
|
|
|
|
|
|
|
|
"mvapi", /* MCA component name */
|
|
|
|
OMPI_MAJOR_VERSION, /* MCA component major version */
|
|
|
|
OMPI_MINOR_VERSION, /* MCA component minor version */
|
|
|
|
OMPI_RELEASE_VERSION, /* MCA component release version */
|
|
|
|
mca_mpool_mvapi_open, /* component open */
|
|
|
|
NULL
|
2005-05-31 17:08:41 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/* Next the MCA v1.0.0 component meta data */
|
|
|
|
|
|
|
|
{
|
2007-03-16 23:11:45 +00:00
|
|
|
/* The component is not checkpoint ready */
|
|
|
|
MCA_BASE_METADATA_PARAM_NONE
|
2005-05-31 17:08:41 +00:00
|
|
|
},
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
mca_mpool_mvapi_init
|
2005-05-31 17:08:41 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2005-06-24 21:12:38 +00:00
|
|
|
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
static void mca_mpool_mvapi_registration_constructor( mca_mpool_mvapi_registration_t * registration )
|
2005-06-24 21:12:38 +00:00
|
|
|
{
|
2005-09-12 22:28:23 +00:00
|
|
|
registration->base_reg.base = NULL;
|
|
|
|
registration->base_reg.bound = NULL;
|
|
|
|
registration->base_reg.flags = 0;
|
|
|
|
|
2005-06-24 21:12:38 +00:00
|
|
|
}
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
static void mca_mpool_mvapi_registration_destructor( mca_mpool_mvapi_registration_t * registration )
|
2005-06-24 21:12:38 +00:00
|
|
|
{
|
2005-06-30 05:50:55 +00:00
|
|
|
registration->base_reg.base = NULL;
|
|
|
|
registration->base_reg.bound = NULL;
|
2005-09-12 22:28:23 +00:00
|
|
|
registration->base_reg.flags = 0;
|
2005-06-30 21:28:35 +00:00
|
|
|
|
2005-06-24 21:12:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
OBJ_CLASS_INSTANCE(
|
2005-06-30 21:28:35 +00:00
|
|
|
mca_mpool_mvapi_registration_t,
|
2005-06-24 21:12:38 +00:00
|
|
|
mca_mpool_base_registration_t,
|
2005-06-30 21:28:35 +00:00
|
|
|
mca_mpool_mvapi_registration_constructor,
|
|
|
|
mca_mpool_mvapi_registration_destructor
|
2005-06-24 21:12:38 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-05-31 17:08:41 +00:00
|
|
|
/**
|
|
|
|
* component open/close/init function
|
|
|
|
*/
|
2005-06-30 21:28:35 +00:00
|
|
|
static int mca_mpool_mvapi_open(void)
|
2005-05-31 17:08:41 +00:00
|
|
|
{
|
|
|
|
/* register VAPI component parameters */
|
2005-06-06 20:18:56 +00:00
|
|
|
|
2005-09-27 02:01:21 +00:00
|
|
|
|
|
|
|
|
2005-05-31 17:08:41 +00:00
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
static mca_mpool_base_module_t* mca_mpool_mvapi_init(
|
2005-06-23 15:53:51 +00:00
|
|
|
struct mca_mpool_base_resources_t* resources)
|
2005-05-31 17:08:41 +00:00
|
|
|
{
|
2005-06-30 21:28:35 +00:00
|
|
|
mca_mpool_mvapi_module_t* mpool_module;
|
2005-09-12 22:28:23 +00:00
|
|
|
mca_base_param_reg_string(&mca_mpool_mvapi_component.super.mpool_version,
|
|
|
|
"rcache_name",
|
|
|
|
"The name of the registration cache the mpool should use",
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
"rb",
|
|
|
|
&(mca_mpool_mvapi_component.rcache_name));
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
mpool_module = (mca_mpool_mvapi_module_t*)malloc(sizeof(mca_mpool_mvapi_module_t));
|
|
|
|
mca_mpool_mvapi_module_init(mpool_module);
|
2005-05-31 17:08:41 +00:00
|
|
|
|
2005-06-21 17:10:28 +00:00
|
|
|
mpool_module->hca_pd = *resources;
|
2005-05-31 17:08:41 +00:00
|
|
|
return &mpool_module->super;
|
|
|
|
}
|
|
|
|
|
|
|
|
|