2015-11-02 22:07:08 +03:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2004-06-15 01:05:53 +04:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* 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.
|
2015-06-24 06:59:57 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2004-11-28 23:09:25 +03:00
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
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
|
|
|
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
|
2013-01-29 21:52:18 +04:00
|
|
|
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
|
2016-10-04 09:21:12 +03:00
|
|
|
* Copyright (c) 2014-2017 Research Organization for Information Science
|
2014-08-05 09:30:03 +04:00
|
|
|
* and Technology (RIST). All rights reserved.
|
2015-11-02 22:07:08 +03:00
|
|
|
* Copyright (c) 2015-2016 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2004-11-22 04:38:40 +03:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2004-06-15 01:05:53 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2014-08-04 21:37:08 +04:00
|
|
|
#include "opal_config.h"
|
|
|
|
|
2004-06-15 01:05:53 +04:00
|
|
|
#include <stdio.h>
|
2014-08-04 21:37:12 +04:00
|
|
|
#include <stdlib.h>
|
2007-05-27 07:55:21 +04:00
|
|
|
#ifdef HAVE_UNISTD_H
|
2015-06-24 06:59:57 +03:00
|
|
|
#include <unistd.h>
|
2007-05-27 07:55:21 +04:00
|
|
|
#endif /* HAVE_UNISTD_H */
|
2004-06-15 01:05:53 +04:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#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/mca/mpool/base/base.h"
|
|
|
|
#include "opal/constants.h"
|
2014-08-05 09:30:03 +04:00
|
|
|
#include "opal/util/sys_limits.h"
|
2004-06-15 01:05:53 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The following file was created by configure. It contains extern
|
|
|
|
* statements and the definition of an array of pointers to each
|
2004-08-02 04:24:22 +04:00
|
|
|
* component's public mca_base_component_t struct.
|
2004-06-15 01:05:53 +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
|
|
|
#include "opal/mca/mpool/base/static-components.h"
|
2004-06-15 01:05:53 +04:00
|
|
|
|
2006-06-08 08:29:27 +04:00
|
|
|
#include "mpool_base_tree.h"
|
2004-06-15 01:05:53 +04:00
|
|
|
/*
|
|
|
|
* Global variables
|
|
|
|
*/
|
2006-01-24 01:51:50 +03:00
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
opal_list_t mca_mpool_base_modules = {{0}};
|
|
|
|
static char *mca_mpool_base_default_hints;
|
|
|
|
|
|
|
|
int mca_mpool_base_default_priority = 50;
|
2006-01-24 01:51:50 +03:00
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
OBJ_CLASS_INSTANCE(mca_mpool_base_selected_module_t, opal_list_item_t, NULL, NULL);
|
2005-09-27 06:01:21 +04:00
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
static int mca_mpool_base_register (mca_base_register_flag_t flags)
|
|
|
|
{
|
|
|
|
mca_mpool_base_default_hints = NULL;
|
|
|
|
(void) mca_base_var_register ("opal", "mpool", "base", "default_hints",
|
|
|
|
"Hints to use when selecting the default memory pool",
|
|
|
|
MCA_BASE_VAR_TYPE_STRING, NULL, 0,
|
|
|
|
MCA_BASE_VAR_FLAG_INTERNAL,
|
|
|
|
OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL,
|
|
|
|
&mca_mpool_base_default_hints);
|
|
|
|
|
|
|
|
mca_mpool_base_default_priority = 50;
|
|
|
|
(void) mca_base_var_register ("opal", "mpool", "base", "default_priority",
|
|
|
|
"Priority of the default mpool module",
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0,
|
|
|
|
MCA_BASE_VAR_FLAG_INTERNAL,
|
|
|
|
OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL,
|
|
|
|
&mca_mpool_base_default_priority);
|
|
|
|
|
|
|
|
return OPAL_SUCCESS;
|
|
|
|
}
|
2004-06-15 01:05:53 +04:00
|
|
|
|
|
|
|
/**
|
2004-08-02 04:24:22 +04:00
|
|
|
* Function for finding and opening either all MCA components, or the one
|
2004-06-15 01:05:53 +04:00
|
|
|
* that was specifically requested via a MCA parameter.
|
|
|
|
*/
|
2013-03-28 01:17:31 +04:00
|
|
|
static int mca_mpool_base_open(mca_base_open_flag_t flags)
|
2004-06-15 01:05:53 +04:00
|
|
|
{
|
2005-09-22 21:27:56 +04:00
|
|
|
/* Open up all available components - and populate the
|
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_mpool_base_framework.framework_components list */
|
2015-06-24 06:59:57 +03:00
|
|
|
if (OPAL_SUCCESS !=
|
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
|
|
|
mca_base_framework_components_open(&opal_mpool_base_framework, flags)) {
|
|
|
|
return OPAL_ERROR;
|
2005-09-22 21:27:56 +04:00
|
|
|
}
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
if (mca_mpool_base_default_hints) {
|
|
|
|
mca_mpool_base_default_module = mca_mpool_base_module_lookup (mca_mpool_base_default_hints);
|
|
|
|
}
|
|
|
|
|
2005-09-22 21:27:56 +04:00
|
|
|
/* Initialize the list so that in mca_mpool_base_close(), we can
|
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
|
|
|
iterate over it (even if it's empty, as in the case of opal_info) */
|
2005-09-22 21:27:56 +04:00
|
|
|
OBJ_CONSTRUCT(&mca_mpool_base_modules, opal_list_t);
|
2015-06-24 06:59:57 +03:00
|
|
|
|
|
|
|
/* setup tree for tracking MPI_Alloc_mem */
|
2006-06-08 08:29:27 +04:00
|
|
|
mca_mpool_base_tree_init();
|
2015-06-24 06:59:57 +03: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;
|
2004-06-15 01:05:53 +04:00
|
|
|
}
|
2005-09-14 06:17:04 +04:00
|
|
|
|
2013-03-28 01:17:31 +04:00
|
|
|
static int mca_mpool_base_close(void)
|
|
|
|
{
|
|
|
|
opal_list_item_t *item;
|
|
|
|
mca_mpool_base_selected_module_t *sm;
|
|
|
|
|
|
|
|
/* Finalize all the mpool components and free their list items */
|
|
|
|
|
|
|
|
while(NULL != (item = opal_list_remove_first(&mca_mpool_base_modules))) {
|
|
|
|
sm = (mca_mpool_base_selected_module_t *) item;
|
|
|
|
|
|
|
|
/* Blatently ignore the return code (what would we do to recover,
|
|
|
|
anyway? This component is going away, so errors don't matter
|
|
|
|
anymore). Note that it's legal for the module to have NULL for
|
|
|
|
the finalize function. */
|
|
|
|
|
|
|
|
if (NULL != sm->mpool_module->mpool_finalize) {
|
|
|
|
sm->mpool_module->mpool_finalize(sm->mpool_module);
|
|
|
|
}
|
|
|
|
OBJ_RELEASE(sm);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Close all remaining available components (may be one if this is a
|
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
|
|
|
OMPI RTE program, or [possibly] multiple if this is opal_info) */
|
|
|
|
(void) mca_base_framework_components_close(&opal_mpool_base_framework, NULL);
|
2013-03-28 01:17:31 +04:00
|
|
|
|
2016-10-04 09:21:12 +03:00
|
|
|
mca_mpool_base_tree_fini();
|
|
|
|
|
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;
|
2013-03-28 01:17:31 +04:00
|
|
|
}
|
|
|
|
|
2015-11-02 22:07:08 +03:00
|
|
|
MCA_BASE_FRAMEWORK_DECLARE(opal, mpool, "Memory pools", mca_mpool_base_register, mca_mpool_base_open,
|
2013-03-28 01:17:31 +04:00
|
|
|
mca_mpool_base_close, mca_mpool_base_static_components, 0);
|