2012-04-04 03:03:03 +04:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
|
|
|
/*
|
|
|
|
* 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.
|
2014-01-10 21:20:49 +04:00
|
|
|
* Copyright (c) 2007-2014 Cisco Systems, Inc. All rights reserved.
|
2015-04-17 22:45:14 +03:00
|
|
|
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
|
2012-04-04 03:03:03 +04:00
|
|
|
* reserved.
|
2012-06-27 05:28:28 +04:00
|
|
|
*
|
2012-04-04 03:03:03 +04:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define OPAL_DISABLE_ENABLE_MEM_DEBUG 1
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
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.
2014-07-26 04:47:28 +04:00
|
|
|
#include "opal_config.h"
|
2012-04-04 03:03:03 +04:00
|
|
|
#include "opal/mca/base/base.h"
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
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.
2014-07-26 04:47:28 +04:00
|
|
|
#include "opal/runtime/opal_params.h"
|
2015-11-02 22:07:08 +03:00
|
|
|
#include "rcache_grdma.h"
|
2012-04-04 03:03:03 +04:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
2014-01-10 21:20:49 +04:00
|
|
|
#include <stdlib.h>
|
2012-04-04 03:03:03 +04:00
|
|
|
#include <fcntl.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local functions
|
|
|
|
*/
|
|
|
|
static int grdma_open(void);
|
|
|
|
static int grdma_close(void);
|
|
|
|
static int grdma_register(void);
|
2015-11-02 22:07:08 +03:00
|
|
|
static mca_rcache_base_module_t* grdma_init(
|
|
|
|
struct mca_rcache_base_resources_t* resources);
|
2012-04-04 03:03:03 +04:00
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
mca_rcache_grdma_component_t mca_rcache_grdma_component = {
|
2012-04-04 03:03:03 +04:00
|
|
|
{
|
|
|
|
/* First, the mca_base_component_t struct containing meta
|
|
|
|
information about the component itself */
|
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
.rcache_version = {
|
|
|
|
MCA_RCACHE_BASE_VERSION_3_0_0,
|
2012-04-04 03:03:03 +04:00
|
|
|
|
2015-04-17 22:45:14 +03:00
|
|
|
.mca_component_name = "grdma",
|
|
|
|
MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
|
|
|
|
OPAL_RELEASE_VERSION),
|
|
|
|
.mca_open_component = grdma_open,
|
|
|
|
.mca_close_component = grdma_close,
|
|
|
|
.mca_register_component_params = grdma_register,
|
|
|
|
},
|
2015-11-02 22:07:08 +03:00
|
|
|
.rcache_data = {
|
2015-04-17 22:45:14 +03:00
|
|
|
/* The component is checkpoint ready */
|
|
|
|
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
|
|
|
},
|
2012-04-04 03:03:03 +04:00
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
.rcache_init = grdma_init,
|
2012-04-04 03:03:03 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* component open/close/init function
|
|
|
|
*/
|
|
|
|
static int grdma_open(void)
|
|
|
|
{
|
2015-11-02 22:07:08 +03:00
|
|
|
OBJ_CONSTRUCT(&mca_rcache_grdma_component.caches, opal_list_t);
|
2012-04-04 03:03:03 +04:00
|
|
|
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
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.
2014-07-26 04:47:28 +04:00
|
|
|
return OPAL_SUCCESS;
|
2012-04-04 03:03:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int grdma_register(void)
|
|
|
|
{
|
2015-11-02 22:07:08 +03:00
|
|
|
mca_rcache_grdma_component.print_stats = false;
|
|
|
|
(void) mca_base_component_var_register(&mca_rcache_grdma_component.super.rcache_version,
|
|
|
|
"print_stats", "print registration cache usage statistics at the end of the run",
|
2013-03-28 01:09:41 +04:00
|
|
|
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
2015-11-02 22:07:08 +03:00
|
|
|
&mca_rcache_grdma_component.print_stats);
|
2012-04-04 03:03:03 +04:00
|
|
|
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
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.
2014-07-26 04:47:28 +04:00
|
|
|
return OPAL_SUCCESS;
|
2012-04-04 03:03:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int grdma_close(void)
|
|
|
|
{
|
2015-11-02 22:07:08 +03:00
|
|
|
OPAL_LIST_DESTRUCT(&mca_rcache_grdma_component.caches);
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
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.
2014-07-26 04:47:28 +04:00
|
|
|
return OPAL_SUCCESS;
|
2012-04-04 03:03:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
static mca_rcache_base_module_t *
|
|
|
|
grdma_init(struct mca_rcache_base_resources_t *resources)
|
2012-04-04 03:03:03 +04:00
|
|
|
{
|
2015-11-02 22:07:08 +03:00
|
|
|
mca_rcache_grdma_module_t *rcache_module;
|
2016-03-17 02:26:16 +03:00
|
|
|
mca_rcache_grdma_cache_t *cache = NULL, *item;
|
2012-04-04 03:03:03 +04:00
|
|
|
|
|
|
|
/* Set this here (vs in component.c) because
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
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.
2014-07-26 04:47:28 +04:00
|
|
|
opal_leave_pinned* may have been set after MCA params were
|
2012-04-04 03:03:03 +04:00
|
|
|
read (e.g., by the openib btl) */
|
2015-11-02 22:07:08 +03:00
|
|
|
mca_rcache_grdma_component.leave_pinned = (int)
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
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.
2014-07-26 04:47:28 +04:00
|
|
|
(1 == opal_leave_pinned || opal_leave_pinned_pipeline);
|
2012-04-04 03:03:03 +04:00
|
|
|
|
|
|
|
/* find the specified pool */
|
2016-03-17 02:26:16 +03:00
|
|
|
OPAL_LIST_FOREACH(item, &mca_rcache_grdma_component.caches, mca_rcache_grdma_cache_t) {
|
|
|
|
if (0 == strcmp (item->cache_name, resources->cache_name)) {
|
2015-11-02 22:07:08 +03:00
|
|
|
cache = item;
|
2012-04-04 03:03:03 +04:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
if (NULL == cache) {
|
|
|
|
/* create new cache */
|
|
|
|
cache = OBJ_NEW(mca_rcache_grdma_cache_t);
|
|
|
|
if (NULL == cache) {
|
2012-04-04 03:03:03 +04:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
cache->cache_name = strdup (resources->cache_name);
|
2012-04-04 03:03:03 +04:00
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
opal_list_append (&mca_rcache_grdma_component.caches, &cache->super);
|
2012-04-04 03:03:03 +04:00
|
|
|
}
|
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
rcache_module = (mca_rcache_grdma_module_t *) malloc (sizeof (*rcache_module));
|
2012-04-04 03:03:03 +04:00
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
rcache_module->resources = *resources;
|
2012-04-04 03:03:03 +04:00
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
mca_rcache_grdma_module_init (rcache_module, cache);
|
2012-04-04 03:03:03 +04:00
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
return &rcache_module->super;
|
2012-04-04 03:03:03 +04:00
|
|
|
}
|