2015-01-05 14:55:15 -07:00
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2007-05-17 08:41:01 +00: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-23 20:59:57 -07:00
* Copyright ( c ) 2004 - 2005 High Performance Computing Center Stuttgart ,
2007-05-17 08:41:01 +00:00
* University of Stuttgart . All rights reserved .
* Copyright ( c ) 2004 - 2005 The Regents of the University of California .
* All rights reserved .
* Copyright ( c ) 2006 - 2007 Voltaire All rights reserved .
2009-01-11 02:30:00 +00:00
* Copyright ( c ) 2007 Cisco Systems , Inc . All rights reserved .
2010-07-13 11:30:43 +00:00
* Copyright ( c ) 2010 Oracle and / or its affiliates . All rights reserved .
2013-11-13 13:22:39 +00:00
* Copyright ( c ) 2013 NVIDIA Corporation . All rights reserved .
2018-02-07 09:49:36 -07:00
* Copyright ( c ) 2016 - 2018 Los Alamos National Security , LLC . All rights
2016-03-21 15:23:37 -06:00
* reserved .
2007-05-17 08:41:01 +00:00
*
* $ COPYRIGHT $
2015-06-23 20:59:57 -07:00
*
2007-05-17 08:41:01 +00:00
* Additional copyrights may follow
2015-06-23 20:59:57 -07:00
*
2007-05-17 08:41:01 +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"
2007-05-17 08:41:01 +00:00
# include <stdio.h>
2009-02-14 02:26:12 +00:00
# include "opal/util/output.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 00:47:28 +00:00
# include "opal/constants.h"
# include "opal/mca/btl/btl.h"
# include "opal/mca/btl/base/base.h"
2007-05-17 08:41:01 +00:00
int mca_btl_base_param_register ( mca_base_component_t * version ,
2012-05-21 13:15:24 +00:00
mca_btl_base_module_t * module )
2007-05-17 08:41:01 +00:00
{
2013-03-27 21:09:41 +00:00
/* If this is ever triggered change the uint32_ts in mca_btl_base_module_t to unsigned ints */
assert ( sizeof ( unsigned int ) = = sizeof ( uint32_t ) ) ;
2007-05-17 08:41:01 +00:00
2013-03-27 21:09:41 +00:00
( void ) mca_base_component_var_register ( version , " exclusivity " ,
" BTL exclusivity (must be >= 0) " ,
MCA_BASE_VAR_TYPE_UNSIGNED_INT , NULL , 0 , 0 ,
2013-07-10 00:47:52 +00:00
OPAL_INFO_LVL_7 ,
2013-03-27 21:09:41 +00:00
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_exclusivity ) ;
2007-05-17 08:41:01 +00:00
2016-03-21 15:23:37 -06:00
( void ) mca_base_component_var_register ( version , " flags " , " BTL bit flags (general flags: send, put, get, in-place, hetero-rdma, "
" atomics, fetching-atomics) " , MCA_BASE_VAR_TYPE_UNSIGNED_INT ,
& mca_btl_base_flag_enum - > super , 0 , 0 , OPAL_INFO_LVL_5 ,
MCA_BASE_VAR_SCOPE_READONLY , & module - > btl_flags ) ;
2007-05-17 08:41:01 +00:00
2016-03-21 15:23:37 -06:00
( void ) mca_base_component_var_register ( version , " atomic_flags " , " BTL atomic support flags " , MCA_BASE_VAR_TYPE_UNSIGNED_INT ,
& mca_btl_base_atomic_enum - > super , 0 , MCA_BASE_VAR_FLAG_DEFAULT_ONLY , OPAL_INFO_LVL_5 ,
2014-11-02 13:56:14 -07:00
MCA_BASE_VAR_SCOPE_CONSTANT , & module - > btl_atomic_flags ) ;
2013-03-27 21:09:41 +00:00
( void ) mca_base_component_var_register ( version , " rndv_eager_limit " , " Size (in bytes, including header) of \" phase 1 \" fragment sent for all large messages (must be >= 0 and <= eager_limit) " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
2013-07-10 00:47:52 +00:00
OPAL_INFO_LVL_4 ,
2013-03-27 21:09:41 +00:00
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_rndv_eager_limit ) ;
( void ) mca_base_component_var_register ( version , " eager_limit " , " Maximum size (in bytes, including header) of \" short \" messages (must be >= 1). " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
2013-07-10 00:47:52 +00:00
OPAL_INFO_LVL_4 ,
2013-03-27 21:09:41 +00:00
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_eager_limit ) ;
2015-01-05 14:55:15 -07:00
if ( ( module - > btl_flags & MCA_BTL_FLAGS_GET ) & & module - > btl_get ) {
if ( 0 = = module - > btl_get_limit ) {
module - > btl_get_limit = SIZE_MAX ;
}
( void ) mca_base_component_var_register ( version , " get_limit " , " Maximum size (in bytes) for btl get " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 , OPAL_INFO_LVL_4 ,
MCA_BASE_VAR_SCOPE_READONLY , & module - > btl_get_limit ) ;
/* Allow the user to set the alignment. The BTL should double-check the alignment in its open
* function . */
( void ) mca_base_component_var_register ( version , " get_alignment " , " Alignment required for btl get " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 , OPAL_INFO_LVL_6 ,
MCA_BASE_VAR_SCOPE_CONSTANT , & module - > btl_get_alignment ) ;
}
if ( ( module - > btl_flags & MCA_BTL_FLAGS_PUT ) & & module - > btl_put ) {
if ( 0 = = module - > btl_put_limit ) {
module - > btl_put_limit = SIZE_MAX ;
}
( void ) mca_base_component_var_register ( version , " put_limit " , " Maximum size (in bytes) for btl put " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 , OPAL_INFO_LVL_4 ,
MCA_BASE_VAR_SCOPE_READONLY , & module - > btl_put_limit ) ;
/* Allow the user to set the alignment. The BTL should double-check the alignment in its open
* function . */
( void ) mca_base_component_var_register ( version , " put_alignment " , " Alignment required for btl put " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 , OPAL_INFO_LVL_6 ,
MCA_BASE_VAR_SCOPE_CONSTANT , & module - > btl_put_alignment ) ;
}
2013-12-06 14:35:10 +00:00
# if OPAL_CUDA_GDR_SUPPORT
2013-11-13 13:22:39 +00:00
/* If no CUDA RDMA support, zero them out */
if ( ! ( MCA_BTL_FLAGS_CUDA_GET & module - > btl_flags ) ) {
module - > btl_cuda_eager_limit = 0 ;
module - > btl_cuda_rdma_limit = SIZE_MAX ;
}
( void ) mca_base_component_var_register ( version , " cuda_eager_limit " , " Maximum size (in bytes, including header) of \" GPU short \" messages (must be >= 1). " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
2013-12-13 21:25:07 +00:00
OPAL_INFO_LVL_5 ,
2013-11-13 13:22:39 +00:00
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_cuda_eager_limit ) ;
( void ) mca_base_component_var_register ( version , " cuda_rdma_limit " , " Size (in bytes, including header) of GPU buffer when switch to rndv protocol and pipeline. " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
2013-12-13 21:25:07 +00:00
OPAL_INFO_LVL_5 ,
2013-11-13 13:22:39 +00:00
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_cuda_rdma_limit ) ;
2013-12-06 14:35:10 +00:00
# endif /* OPAL_CUDA_GDR_SUPPORT */
2015-07-02 11:11:15 -04:00
# if OPAL_CUDA_SUPPORT
module - > btl_cuda_max_send_size = 0 ;
( void ) mca_base_component_var_register ( version , " cuda_max_send_size " , " Maximum size (in bytes) of a single GPU \" phase 2 \" fragment of a long message when using the pipeline protocol (must be >= 1) (only valid on smcuda btl) " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
OPAL_INFO_LVL_4 ,
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_cuda_max_send_size ) ;
# endif /* OPAL_CUDA_SUPPORT */
2013-03-27 21:09:41 +00:00
( void ) mca_base_component_var_register ( version , " max_send_size " , " Maximum size (in bytes) of a single \" phase 2 \" fragment of a long message when using the pipeline protocol (must be >= 1) " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
2013-07-10 00:47:52 +00:00
OPAL_INFO_LVL_4 ,
2013-03-27 21:09:41 +00:00
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_max_send_size ) ;
if ( NULL ! = module - > btl_put ) {
( void ) mca_base_component_var_register ( version , " rdma_pipeline_send_length " , " Length of the \" phase 2 \" portion of a large message (in bytes) when using the pipeline protocol. This part of the message will be split into fragments of size max_send_size and sent using send/receive semantics (must be >= 0; only relevant when the PUT flag is set) " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
2013-07-10 00:47:52 +00:00
OPAL_INFO_LVL_4 ,
2013-03-27 21:09:41 +00:00
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_rdma_pipeline_send_length ) ;
( void ) mca_base_component_var_register ( version , " rdma_pipeline_frag_size " , " Maximum size (in bytes) of a single \" phase 3 \" fragment from a long message when using the pipeline protocol. These fragments will be sent using RDMA semantics (must be >= 1; only relevant when the PUT flag is set) " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
2013-07-10 00:47:52 +00:00
OPAL_INFO_LVL_4 ,
2013-03-27 21:09:41 +00:00
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_rdma_pipeline_frag_size ) ;
( void ) mca_base_component_var_register ( version , " min_rdma_pipeline_size " , " Messages smaller than this size (in bytes) will not use the RDMA pipeline protocol. Instead, they will be split into fragments of max_send_size and sent using send/receive semantics (must be >=0, and is automatically adjusted up to at least (eager_limit+btl_rdma_pipeline_send_length); only relevant when the PUT flag is set) " ,
MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
2013-07-10 00:47:52 +00:00
OPAL_INFO_LVL_4 ,
2013-03-27 21:09:41 +00:00
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_min_rdma_pipeline_size ) ;
2015-02-10 20:32:05 -05:00
( void ) mca_base_component_var_register ( version , " latency " , " Approximate latency of interconnect (0 = auto-detect value at run-time [not supported in all BTL modules], >= 1 = latency in microseconds) " ,
2013-03-27 21:09:41 +00:00
MCA_BASE_VAR_TYPE_UNSIGNED_INT , NULL , 0 , 0 ,
2013-07-10 00:47:52 +00:00
OPAL_INFO_LVL_5 ,
2013-03-27 21:09:41 +00:00
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_latency ) ;
2015-02-10 20:32:05 -05:00
( void ) mca_base_component_var_register ( version , " bandwidth " , " Approximate maximum bandwidth of interconnect (0 = auto-detect value at run-time [not supported in all BTL modules], >= 1 = bandwidth in Mbps) " ,
MCA_BASE_VAR_TYPE_UNSIGNED_INT , NULL , 0 , 0 ,
OPAL_INFO_LVL_5 ,
MCA_BASE_VAR_SCOPE_READONLY ,
& module - > btl_bandwidth ) ;
2007-05-17 08:41:01 +00:00
}
2013-03-27 21:09:41 +00:00
return mca_btl_base_param_verify ( module ) ;
}
/* Verify btl parameters make sense */
int mca_btl_base_param_verify ( mca_btl_base_module_t * module )
{
2015-06-23 20:59:57 -07:00
if ( module - > btl_min_rdma_pipeline_size <
2013-03-27 21:09:41 +00:00
( module - > btl_eager_limit + module - > btl_rdma_pipeline_send_length ) ) {
2015-06-23 20:59:57 -07:00
module - > btl_min_rdma_pipeline_size =
2013-03-27 21:09:41 +00:00
module - > btl_eager_limit + module - > btl_rdma_pipeline_send_length ;
}
2007-05-17 08:41:01 +00:00
2013-03-27 21:09:41 +00:00
if ( NULL = = module - > btl_put ) {
module - > btl_flags & = ~ MCA_BTL_FLAGS_PUT ;
}
if ( NULL = = module - > btl_get ) {
module - > btl_flags & = ~ MCA_BTL_FLAGS_GET ;
}
2007-05-17 08:41:01 +00:00
2018-02-07 09:49:36 -07:00
if ( NULL = = module - > btl_flush ) {
module - > btl_flags & = ~ MCA_BTL_FLAGS_RDMA_FLUSH ;
}
2014-11-02 13:56:14 -07:00
if ( 0 = = module - > btl_atomic_flags ) {
module - > btl_flags & = ~ MCA_BTL_FLAGS_ATOMIC_OPS ;
}
2015-01-05 14:55:15 -07:00
if ( 0 = = module - > btl_get_limit ) {
module - > btl_get_limit = SIZE_MAX ;
}
if ( 0 = = module - > btl_put_limit ) {
module - > btl_put_limit = SIZE_MAX ;
}
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 ;
2007-05-17 08:41:01 +00:00
}