2014-05-15 01:15:39 +04:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2004-11-22 03:37:56 +03: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.
|
|
|
|
* 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.
|
2008-07-22 00:05:29 +04:00
|
|
|
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
2014-05-15 01:15:39 +04:00
|
|
|
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
|
|
|
|
* reseved.
|
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-11-22 03:37:56 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
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"
|
|
|
|
#include "opal/mca/allocator/allocator.h"
|
|
|
|
#include "opal/constants.h"
|
|
|
|
#include "opal/mca/allocator/bucket/allocator_bucket_alloc.h"
|
2015-11-02 22:07:08 +03:00
|
|
|
#include "opal/mca/base/mca_base_var.h"
|
2004-06-16 19:53:55 +04:00
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
struct mca_allocator_base_module_t* mca_allocator_bucket_module_init(
|
2005-03-27 17:05:23 +04:00
|
|
|
bool enable_mpi_threads,
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_allocator_base_component_segment_alloc_fn_t segment_alloc,
|
2015-06-24 06:59:57 +03:00
|
|
|
mca_allocator_base_component_segment_free_fn_t segment_free,
|
2015-11-02 22:07:08 +03:00
|
|
|
void *context);
|
2004-06-16 19:53:55 +04:00
|
|
|
|
|
|
|
int mca_allocator_bucket_module_open(void);
|
|
|
|
|
|
|
|
int mca_allocator_bucket_module_close(void);
|
|
|
|
|
2005-06-21 21:10:28 +04:00
|
|
|
void * mca_allocator_bucket_alloc_wrapper(
|
|
|
|
struct mca_allocator_base_module_t* allocator,
|
2015-11-02 22:07:08 +03:00
|
|
|
size_t size, size_t align);
|
2005-06-21 21:10:28 +04:00
|
|
|
|
2004-06-17 00:59:06 +04:00
|
|
|
static int mca_allocator_num_buckets;
|
|
|
|
|
|
|
|
|
2004-06-16 19:53:55 +04:00
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
int mca_allocator_bucket_finalize(struct mca_allocator_base_module_t* allocator)
|
2004-06-24 20:47:00 +04:00
|
|
|
{
|
2014-05-15 01:15:39 +04:00
|
|
|
mca_allocator_bucket_t *bucket = (mca_allocator_bucket_t *) allocator;
|
|
|
|
|
2004-06-24 20:47:00 +04:00
|
|
|
mca_allocator_bucket_cleanup(allocator);
|
2014-05-15 01:15:39 +04:00
|
|
|
|
|
|
|
for (int i = 0 ; i < bucket->num_buckets ; ++i) {
|
|
|
|
OBJ_DESTRUCT(&bucket->buckets[i].lock);
|
|
|
|
}
|
|
|
|
|
|
|
|
free (bucket->buckets);
|
2004-06-24 20:47:00 +04:00
|
|
|
free(allocator);
|
2014-05-15 01:15:39 +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);
|
2004-06-24 20:47:00 +04:00
|
|
|
}
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
struct mca_allocator_base_module_t* mca_allocator_bucket_module_init(
|
2005-03-27 17:05:23 +04:00
|
|
|
bool enable_mpi_threads,
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_allocator_base_component_segment_alloc_fn_t segment_alloc,
|
2015-06-24 06:59:57 +03:00
|
|
|
mca_allocator_base_component_segment_free_fn_t segment_free,
|
2015-11-02 22:07:08 +03:00
|
|
|
void *context)
|
2004-06-16 19:53:55 +04:00
|
|
|
{
|
|
|
|
size_t alloc_size = sizeof(mca_allocator_bucket_t);
|
|
|
|
mca_allocator_bucket_t * retval;
|
2005-05-09 20:23:00 +04:00
|
|
|
mca_allocator_bucket_t * allocator = (mca_allocator_bucket_t *) malloc(alloc_size);
|
2004-06-16 19:53:55 +04:00
|
|
|
if(NULL == allocator) {
|
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 NULL;
|
2004-06-16 19:53:55 +04:00
|
|
|
}
|
2015-06-24 06:59:57 +03:00
|
|
|
retval = mca_allocator_bucket_init((mca_allocator_base_module_t *) allocator,
|
|
|
|
mca_allocator_num_buckets,
|
|
|
|
segment_alloc,
|
2005-06-21 21:10:28 +04:00
|
|
|
segment_free);
|
2004-06-16 19:53:55 +04:00
|
|
|
if(NULL == retval) {
|
2004-06-18 00:33:52 +04:00
|
|
|
free(allocator);
|
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 NULL;
|
2004-06-16 19:53:55 +04:00
|
|
|
}
|
|
|
|
allocator->super.alc_alloc = mca_allocator_bucket_alloc_wrapper;
|
|
|
|
allocator->super.alc_realloc = mca_allocator_bucket_realloc;
|
|
|
|
allocator->super.alc_free = mca_allocator_bucket_free;
|
2004-10-20 02:00:19 +04:00
|
|
|
allocator->super.alc_compact = mca_allocator_bucket_cleanup;
|
2004-06-24 20:47:00 +04:00
|
|
|
allocator->super.alc_finalize = mca_allocator_bucket_finalize;
|
2015-11-02 22:07:08 +03:00
|
|
|
allocator->super.alc_context = context;
|
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 (mca_allocator_base_module_t *) allocator;
|
2004-06-16 19:53:55 +04:00
|
|
|
}
|
|
|
|
|
2013-03-28 01:09:41 +04:00
|
|
|
static int mca_allocator_bucket_module_register(void) {
|
|
|
|
mca_allocator_num_buckets = 30;
|
|
|
|
(void) mca_base_component_var_register(&mca_allocator_bucket_component.allocator_version,
|
|
|
|
"num_buckets", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0,
|
|
|
|
MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_LOCAL, &mca_allocator_num_buckets);
|
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:09:41 +04:00
|
|
|
}
|
|
|
|
|
2004-06-16 19:53:55 +04:00
|
|
|
int mca_allocator_bucket_module_open(void) {
|
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-16 19:53:55 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
int mca_allocator_bucket_module_close(void) {
|
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-16 19:53:55 +04:00
|
|
|
}
|
|
|
|
|
2005-06-21 21:10:28 +04:00
|
|
|
void * mca_allocator_bucket_alloc_wrapper(
|
|
|
|
struct mca_allocator_base_module_t* allocator,
|
2015-06-24 06:59:57 +03:00
|
|
|
size_t size,
|
2015-11-02 22:07:08 +03:00
|
|
|
size_t align)
|
2004-06-16 19:53:55 +04:00
|
|
|
{
|
|
|
|
if(0 == align){
|
2015-11-02 22:07:08 +03:00
|
|
|
return mca_allocator_bucket_alloc(allocator, size);
|
2004-06-16 19:53:55 +04:00
|
|
|
}
|
2015-11-02 22:07:08 +03:00
|
|
|
return mca_allocator_bucket_alloc_align(allocator, size, align);
|
2015-06-24 06:59:57 +03:00
|
|
|
}
|
2004-06-16 19:53:55 +04:00
|
|
|
|
|
|
|
|
2015-06-24 06:59:57 +03:00
|
|
|
mca_allocator_base_component_t mca_allocator_bucket_component = {
|
2004-08-02 04:24:22 +04:00
|
|
|
|
|
|
|
/* First, the mca_base_module_t struct containing meta information
|
|
|
|
about the module itself */
|
|
|
|
|
|
|
|
{
|
2008-07-29 02:40:57 +04:00
|
|
|
MCA_ALLOCATOR_BASE_VERSION_2_0_0,
|
2004-06-16 19:53:55 +04:00
|
|
|
|
|
|
|
"bucket", /* MCA module name */
|
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_MAJOR_VERSION,
|
|
|
|
OPAL_MINOR_VERSION,
|
|
|
|
OPAL_RELEASE_VERSION,
|
2004-06-16 19:53:55 +04:00
|
|
|
mca_allocator_bucket_module_open, /* module open */
|
2013-03-28 01:09:41 +04:00
|
|
|
mca_allocator_bucket_module_close, /* module close */
|
|
|
|
NULL,
|
|
|
|
mca_allocator_bucket_module_register
|
2004-08-02 04:24:22 +04:00
|
|
|
},
|
|
|
|
{
|
2007-03-17 02:11:45 +03:00
|
|
|
/* The component is checkpoint ready */
|
|
|
|
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
2004-08-02 04:24:22 +04:00
|
|
|
},
|
|
|
|
mca_allocator_bucket_module_init
|
2004-06-16 19:53:55 +04:00
|
|
|
};
|
|
|
|
|