552c9ca5a0
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic. This commit was SVN r32317.
103 строки
2.7 KiB
C
103 строки
2.7 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-2005 The Regents of the University of California.
|
|
* All rights reserved.
|
|
* Copyright (c) 2006 Voltaire. All rights reserved.
|
|
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
|
|
* Copyright (c) 2012 NVIDIA Corporation. All rights reserved.
|
|
*
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#define OPAL_DISABLE_ENABLE_MEM_DEBUG 1
|
|
#include "opal_config.h"
|
|
#include "opal/mca/base/base.h"
|
|
#include "mpool_gpusm.h"
|
|
#ifdef HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
#endif
|
|
#ifdef HAVE_MALLOC_H
|
|
#include <malloc.h>
|
|
#endif
|
|
|
|
/*
|
|
* Local functions
|
|
*/
|
|
static int gpusm_open(void);
|
|
static int gpusm_close(void);
|
|
static int gpusm_register(void);
|
|
static mca_mpool_base_module_t* gpusm_init(struct mca_mpool_base_resources_t* resources);
|
|
|
|
mca_mpool_gpusm_component_t mca_mpool_gpusm_component = {
|
|
{
|
|
/* First, the mca_base_component_t struct containing meta
|
|
information about the component itself */
|
|
|
|
{
|
|
MCA_MPOOL_BASE_VERSION_2_0_0,
|
|
|
|
"gpusm", /* MCA component name */
|
|
OPAL_MAJOR_VERSION, /* MCA component major version */
|
|
OPAL_MINOR_VERSION, /* MCA component minor version */
|
|
OPAL_RELEASE_VERSION, /* MCA component release version */
|
|
gpusm_open, /* component open */
|
|
gpusm_close,
|
|
NULL,
|
|
gpusm_register
|
|
},
|
|
{
|
|
/* The component is checkpoint ready */
|
|
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
|
},
|
|
|
|
gpusm_init
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Component open/close/init/register functions. Most do not do anything,
|
|
* but keep around for placeholders.
|
|
*/
|
|
static int gpusm_open(void)
|
|
{
|
|
return OPAL_SUCCESS;
|
|
}
|
|
|
|
|
|
static int gpusm_register(void)
|
|
{
|
|
return OPAL_SUCCESS;
|
|
}
|
|
|
|
|
|
static int gpusm_close(void)
|
|
{
|
|
return OPAL_SUCCESS;
|
|
}
|
|
|
|
|
|
static mca_mpool_base_module_t* gpusm_init(struct mca_mpool_base_resources_t *resources)
|
|
{
|
|
mca_mpool_gpusm_module_t* mpool_module;
|
|
|
|
mpool_module =
|
|
(mca_mpool_gpusm_module_t*)malloc(sizeof(mca_mpool_gpusm_module_t));
|
|
|
|
mpool_module->resources = *resources;
|
|
|
|
mca_mpool_gpusm_module_init(mpool_module);
|
|
|
|
return &mpool_module->super;
|
|
}
|