2014-07-10 16:31:15 +00:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2005-06-15 19:10:26 +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.
|
2006-08-24 16:38:08 +00:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 19:57:48 +00:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-06-23 20:59:57 -07:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-06-15 19:10:26 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2010-07-06 14:33:36 +00:00
|
|
|
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
2016-10-27 10:34:54 -06:00
|
|
|
* Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
|
2015-02-19 13:41:41 -07:00
|
|
|
* reserved.
|
2005-06-15 19:10:26 +00:00
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2005-06-15 19:10:26 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2005-06-15 19:10:26 +00: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 00:47:28 +00:00
|
|
|
#include "opal_config.h"
|
2016-10-27 10:34:54 -06:00
|
|
|
|
2005-06-30 05:50:55 +00:00
|
|
|
#include "btl_self.h"
|
|
|
|
#include "btl_self_frag.h"
|
2005-06-15 19:10:26 +00:00
|
|
|
|
2013-03-27 21:09:41 +00:00
|
|
|
static int mca_btl_self_component_register(void);
|
2016-10-27 10:34:54 -06:00
|
|
|
static int mca_btl_self_component_open(void);
|
|
|
|
static int mca_btl_self_component_close(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SELF module initialization.
|
|
|
|
*
|
|
|
|
* @param num_btls (OUT) Number of BTLs returned in BTL array.
|
|
|
|
* @param enable_progress_threads (IN) Flag indicating whether BTL is allowed to have progress threads
|
|
|
|
* @param enable_mpi_threads (IN) Flag indicating whether BTL must support multilple simultaneous invocations from different threads
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static mca_btl_base_module_t **mca_btl_self_component_init (int *num_btls,
|
|
|
|
bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads);
|
2005-06-15 19:10:26 +00:00
|
|
|
|
|
|
|
/*
|
2015-06-23 20:59:57 -07:00
|
|
|
* Shared Memory (SELF) component instance.
|
2005-06-15 19:10:26 +00:00
|
|
|
*/
|
|
|
|
|
2005-06-30 05:50:55 +00:00
|
|
|
mca_btl_self_component_t mca_btl_self_component = {
|
2014-07-10 16:31:15 +00:00
|
|
|
.super = {
|
2005-06-15 19:10:26 +00:00
|
|
|
/* First, the mca_base_component_t struct containing meta information
|
|
|
|
about the component itself */
|
2014-07-10 16:31:15 +00:00
|
|
|
.btl_version = {
|
|
|
|
MCA_BTL_DEFAULT_VERSION("self"),
|
|
|
|
.mca_open_component = mca_btl_self_component_open,
|
|
|
|
.mca_close_component = mca_btl_self_component_close,
|
|
|
|
.mca_register_component_params = mca_btl_self_component_register,
|
2005-06-15 19:10:26 +00:00
|
|
|
},
|
2014-07-10 16:31:15 +00:00
|
|
|
.btl_data = {
|
2007-03-16 23:11:45 +00:00
|
|
|
/* The component is checkpoint ready */
|
2014-07-10 16:31:15 +00:00
|
|
|
.param_field = MCA_BASE_METADATA_PARAM_CHECKPOINT,
|
2005-06-15 19:10:26 +00:00
|
|
|
},
|
|
|
|
|
2014-07-10 16:31:15 +00:00
|
|
|
.btl_init = mca_btl_self_component_init,
|
2005-06-15 19:10:26 +00:00
|
|
|
} /* end super */
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Called by MCA framework to open the component, registers
|
|
|
|
* component parameters.
|
|
|
|
*/
|
|
|
|
|
2013-03-27 21:09:41 +00:00
|
|
|
static int mca_btl_self_component_register(void)
|
2005-06-15 19:10:26 +00:00
|
|
|
{
|
2013-03-27 21:09:41 +00:00
|
|
|
mca_base_var_group_component_register(&mca_btl_self_component.super.btl_version,
|
|
|
|
"BTL for self communication");
|
|
|
|
|
2005-06-15 19:10:26 +00:00
|
|
|
/* register SELF component parameters */
|
2013-03-27 21:09:41 +00:00
|
|
|
mca_btl_self_component.free_list_num = 0;
|
|
|
|
(void) mca_base_component_var_register(&mca_btl_self_component.super.btl_version, "free_list_num",
|
|
|
|
"Number of fragments by default",
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_btl_self_component.free_list_num);
|
2016-10-27 10:34:54 -06:00
|
|
|
/* NTH: free list buffers are not released until we tear down so DO NOT make them unlimited here */
|
|
|
|
mca_btl_self_component.free_list_max = 64;
|
2013-03-27 21:09:41 +00:00
|
|
|
(void) mca_base_component_var_register(&mca_btl_self_component.super.btl_version, "free_list_max",
|
|
|
|
"Maximum number of fragments",
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_btl_self_component.free_list_max);
|
2016-10-27 10:34:54 -06:00
|
|
|
mca_btl_self_component.free_list_inc = 8;
|
2013-03-27 21:09:41 +00:00
|
|
|
(void) mca_base_component_var_register(&mca_btl_self_component.super.btl_version, "free_list_inc",
|
|
|
|
"Increment by this number of fragments",
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_btl_self_component.free_list_inc);
|
2007-05-17 07:54:27 +00:00
|
|
|
|
|
|
|
mca_btl_self.btl_exclusivity = MCA_BTL_EXCLUSIVITY_HIGH;
|
2016-10-27 10:34:54 -06:00
|
|
|
mca_btl_self.btl_eager_limit = 1024;
|
2007-12-16 08:35:17 +00:00
|
|
|
mca_btl_self.btl_rndv_eager_limit = 128 * 1024;
|
2016-10-27 10:34:54 -06:00
|
|
|
mca_btl_self.btl_max_send_size = 16 * 1024;
|
2007-06-21 07:12:40 +00:00
|
|
|
mca_btl_self.btl_rdma_pipeline_send_length = INT_MAX;
|
2007-05-17 07:54:27 +00:00
|
|
|
mca_btl_self.btl_rdma_pipeline_frag_size = INT_MAX;
|
|
|
|
mca_btl_self.btl_min_rdma_pipeline_size = 0;
|
2016-10-27 10:34:54 -06:00
|
|
|
mca_btl_self.btl_flags = MCA_BTL_FLAGS_RDMA | MCA_BTL_FLAGS_SEND_INPLACE | MCA_BTL_FLAGS_SEND;
|
2007-05-17 07:54:27 +00:00
|
|
|
mca_btl_self.btl_bandwidth = 100;
|
|
|
|
mca_btl_self.btl_latency = 0;
|
2016-10-27 10:34:54 -06:00
|
|
|
mca_btl_base_param_register (&mca_btl_self_component.super.btl_version, &mca_btl_self);
|
2005-06-15 19:10:26 +00: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 00:47:28 +00:00
|
|
|
return OPAL_SUCCESS;
|
2013-03-27 21:09:41 +00:00
|
|
|
}
|
|
|
|
|
2016-10-27 10:34:54 -06:00
|
|
|
static int mca_btl_self_component_open(void)
|
2013-03-27 21:09:41 +00:00
|
|
|
{
|
2005-06-15 19:10:26 +00:00
|
|
|
/* initialize objects */
|
2015-02-19 13:41:41 -07:00
|
|
|
OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_eager, opal_free_list_t);
|
|
|
|
OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_send, opal_free_list_t);
|
|
|
|
OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_rdma, opal_free_list_t);
|
2013-03-27 21:09:41 +00: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 00:47:28 +00:00
|
|
|
return OPAL_SUCCESS;
|
2005-06-15 19:10:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* component cleanup - sanity checking of queue lengths
|
|
|
|
*/
|
|
|
|
|
2016-10-27 10:34:54 -06:00
|
|
|
static int mca_btl_self_component_close(void)
|
2005-06-15 19:10:26 +00:00
|
|
|
{
|
2005-06-30 05:50:55 +00:00
|
|
|
OBJ_DESTRUCT(&mca_btl_self_component.self_frags_eager);
|
|
|
|
OBJ_DESTRUCT(&mca_btl_self_component.self_frags_send);
|
|
|
|
OBJ_DESTRUCT(&mca_btl_self_component.self_frags_rdma);
|
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 00:47:28 +00:00
|
|
|
return OPAL_SUCCESS;
|
2005-06-15 19:10:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* SELF component initialization
|
|
|
|
*/
|
2016-10-27 10:34:54 -06:00
|
|
|
static mca_btl_base_module_t **mca_btl_self_component_init (int *num_btls,
|
|
|
|
bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads)
|
2005-06-15 19:10:26 +00:00
|
|
|
{
|
2005-07-18 20:55:42 +00:00
|
|
|
mca_btl_base_module_t **btls = NULL;
|
2016-10-27 10:34:54 -06:00
|
|
|
int ret;
|
2005-06-15 19:10:26 +00:00
|
|
|
|
2016-10-27 10:34:54 -06:00
|
|
|
/* initialize free lists */
|
|
|
|
ret = opal_free_list_init (&mca_btl_self_component.self_frags_eager,
|
|
|
|
sizeof (mca_btl_self_frag_eager_t) + mca_btl_self.btl_eager_limit,
|
|
|
|
opal_cache_line_size, OBJ_CLASS(mca_btl_self_frag_eager_t), 0,
|
|
|
|
opal_cache_line_size, mca_btl_self_component.free_list_num,
|
|
|
|
mca_btl_self_component.free_list_max,
|
|
|
|
mca_btl_self_component.free_list_inc,
|
|
|
|
NULL, 0, NULL, NULL, NULL);
|
|
|
|
if (OPAL_SUCCESS != ret) {
|
2005-06-15 19:10:26 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-10-27 10:34:54 -06:00
|
|
|
ret = opal_free_list_init (&mca_btl_self_component.self_frags_send,
|
|
|
|
sizeof (mca_btl_self_frag_send_t) + mca_btl_self.btl_max_send_size,
|
|
|
|
opal_cache_line_size, OBJ_CLASS(mca_btl_self_frag_send_t), 0,
|
|
|
|
opal_cache_line_size, mca_btl_self_component.free_list_num,
|
|
|
|
mca_btl_self_component.free_list_max,
|
|
|
|
mca_btl_self_component.free_list_inc,
|
|
|
|
NULL, 0, NULL, NULL, NULL);
|
|
|
|
if (OPAL_SUCCESS != ret) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = opal_free_list_init (&mca_btl_self_component.self_frags_rdma,
|
|
|
|
sizeof (mca_btl_self_frag_rdma_t) + MCA_BTL_SELF_MAX_INLINE_SIZE,
|
|
|
|
opal_cache_line_size, OBJ_CLASS(mca_btl_self_frag_rdma_t), 0,
|
|
|
|
opal_cache_line_size, mca_btl_self_component.free_list_num,
|
|
|
|
mca_btl_self_component.free_list_max,
|
|
|
|
mca_btl_self_component.free_list_inc,
|
|
|
|
NULL, 0, NULL, NULL, NULL);
|
|
|
|
if (OPAL_SUCCESS != ret) {
|
|
|
|
return NULL;
|
|
|
|
}
|
2005-06-15 19:10:26 +00:00
|
|
|
|
2005-07-18 20:55:42 +00:00
|
|
|
/* get pointer to the btls */
|
2016-10-27 10:34:54 -06:00
|
|
|
btls = (mca_btl_base_module_t **) malloc (sizeof (mca_btl_base_module_t *));
|
|
|
|
if (NULL == btls) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
btls[0] = &mca_btl_self;
|
|
|
|
*num_btls = 1;
|
|
|
|
|
2005-07-18 20:55:42 +00:00
|
|
|
return btls;
|
2005-06-15 19:10:26 +00:00
|
|
|
}
|
|
|
|
|