2014-05-13 23:04:40 +00:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2005-08-12 02:41:14 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +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,
|
2005-08-12 02:41:14 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
2006-03-27 22:48:12 +00:00
|
|
|
* Copyright (c) 2004-2006 The Regents of the University of California.
|
2005-08-12 02:41:14 +00:00
|
|
|
* All rights reserved.
|
2009-02-19 13:17:01 +00:00
|
|
|
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
2014-05-13 23:04:40 +00:00
|
|
|
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2005-08-12 02:41:14 +00:00
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2005-08-12 02:41:14 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2005-08-12 02:41:14 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
#include <stdio.h>
|
2006-07-11 05:38:12 +00:00
|
|
|
#ifdef HAVE_UNISTD_H
|
2006-03-23 17:00:20 +00:00
|
|
|
#include <unistd.h>
|
2006-07-11 05:38:12 +00:00
|
|
|
#endif /* HAVE_UNISTD_H */
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "ompi/mca/bml/base/base.h"
|
2005-08-12 02:41:14 +00:00
|
|
|
#include "ompi/mca/bml/base/static-components.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/mca/btl/base/base.h"
|
2005-09-12 20:22:59 +00:00
|
|
|
#include "opal/mca/base/base.h"
|
2014-02-23 21:41:38 +00:00
|
|
|
#if OPAL_ENABLE_DEBUG_RELIABILITY
|
|
|
|
#include "opal/util/alfg.h"
|
|
|
|
#endif /* OPAL_ENABLE_DEBUG_RELIABILITY */
|
2005-08-12 02:41:14 +00:00
|
|
|
|
2013-03-27 21:17:31 +00:00
|
|
|
static int mca_bml_base_register(mca_base_register_flag_t flags);
|
|
|
|
static int mca_bml_base_open(mca_base_open_flag_t flags);
|
|
|
|
static int mca_bml_base_close(void);
|
|
|
|
|
|
|
|
MCA_BASE_FRAMEWORK_DECLARE(ompi, bml, "BTL Multiplexing Layer", mca_bml_base_register,
|
|
|
|
mca_bml_base_open, mca_bml_base_close, mca_bml_base_static_components,
|
|
|
|
0);
|
2005-08-12 02:41:14 +00:00
|
|
|
|
2009-05-06 20:11:28 +00:00
|
|
|
#if OPAL_ENABLE_DEBUG_RELIABILITY
|
2013-03-27 21:09:41 +00:00
|
|
|
int mca_bml_base_error_rate_floor;
|
|
|
|
int mca_bml_base_error_rate_ceiling;
|
|
|
|
int mca_bml_base_error_count;
|
|
|
|
static bool mca_bml_base_srand;
|
2014-02-24 23:18:35 +00:00
|
|
|
opal_rng_buff_t mca_bml_base_rand_buff;
|
2006-03-23 17:00:20 +00:00
|
|
|
#endif
|
2005-08-12 02:41:14 +00:00
|
|
|
|
2015-10-21 16:13:41 -06:00
|
|
|
opal_mutex_t mca_bml_lock = OPAL_MUTEX_STATIC_INIT;
|
|
|
|
|
2013-03-27 21:17:31 +00:00
|
|
|
static int mca_bml_base_register(mca_base_register_flag_t flags)
|
2013-03-27 21:09:41 +00:00
|
|
|
{
|
|
|
|
#if OPAL_ENABLE_DEBUG_RELIABILITY
|
|
|
|
do {
|
|
|
|
int var_id;
|
|
|
|
|
|
|
|
mca_bml_base_error_rate_floor = 0;
|
|
|
|
var_id = mca_base_var_register("ompi", "bml", "base", "error_rate_floor", NULL,
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_bml_base_error_rate_floor);
|
|
|
|
(void) mca_base_var_register_synonym(var_id, "ompi", "bml", NULL, "error_rate_floor",
|
|
|
|
MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
|
|
|
|
|
|
|
|
mca_bml_base_error_rate_ceiling = 0;
|
|
|
|
var_id = mca_base_var_register("ompi", "bml", "base", "error_rate_ceiling", NULL,
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_bml_base_error_rate_ceiling);
|
|
|
|
(void) mca_base_var_register_synonym(var_id, "ompi", "bml", NULL, "error_rate_ceiling",
|
|
|
|
MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
|
|
|
|
|
|
|
|
|
|
|
|
mca_bml_base_srand = true;
|
|
|
|
var_id = mca_base_var_register("ompi", "bml", "base", "srand", NULL,
|
|
|
|
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_bml_base_srand);
|
|
|
|
(void) mca_base_var_register_synonym(var_id, "ompi", "bml", NULL, "srand",
|
|
|
|
MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
|
|
|
|
} while (0);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2015-06-23 20:59:57 -07:00
|
|
|
static int mca_bml_base_open(mca_base_open_flag_t flags)
|
2009-02-19 13:17:01 +00:00
|
|
|
{
|
2013-03-27 21:17:31 +00:00
|
|
|
int ret;
|
2013-03-27 21:09:41 +00:00
|
|
|
|
2005-08-12 02:41:14 +00:00
|
|
|
if(OMPI_SUCCESS !=
|
2013-03-27 21:17:31 +00:00
|
|
|
(ret = mca_base_framework_components_open(&ompi_bml_base_framework, flags))) {
|
|
|
|
return ret;
|
2005-08-12 02:41:14 +00:00
|
|
|
}
|
2006-03-23 17:00:20 +00:00
|
|
|
|
2009-05-06 20:11:28 +00:00
|
|
|
#if OPAL_ENABLE_DEBUG_RELIABILITY
|
2013-03-27 21:09:41 +00:00
|
|
|
/* seed random number generator */
|
|
|
|
struct timeval tv;
|
|
|
|
gettimeofday(&tv, NULL);
|
2014-02-24 23:18:35 +00:00
|
|
|
opal_srand(&mca_bml_base_rand_buff,(uint32_t)(getpid() * tv.tv_usec));
|
2013-03-27 21:09:41 +00:00
|
|
|
|
|
|
|
/* initialize count */
|
2015-06-23 20:59:57 -07:00
|
|
|
if(mca_bml_base_error_rate_ceiling > 0
|
2013-03-27 21:09:41 +00:00
|
|
|
&& mca_bml_base_error_rate_floor <= mca_bml_base_error_rate_ceiling) {
|
2015-06-23 20:59:57 -07:00
|
|
|
mca_bml_base_error_count = (int) (((double) mca_bml_base_error_rate_ceiling *
|
2014-02-24 23:18:35 +00:00
|
|
|
opal_rand(&mca_bml_base_rand_buff))/(UINT32_MAX+1.0));
|
2013-03-27 21:09:41 +00:00
|
|
|
}
|
2006-03-23 17:00:20 +00:00
|
|
|
#endif
|
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 mca_base_framework_open(&opal_btl_base_framework, 0);
|
2005-08-12 02:41:14 +00:00
|
|
|
}
|
|
|
|
|
2013-03-27 21:17:31 +00:00
|
|
|
static int mca_bml_base_close( void )
|
|
|
|
{
|
2014-05-13 23:04:40 +00:00
|
|
|
int ret;
|
|
|
|
|
|
|
|
/* close any open components (including the selected one) */
|
|
|
|
ret = mca_base_framework_components_close(&ompi_bml_base_framework, NULL);
|
|
|
|
if (OMPI_SUCCESS != ret) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
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 mca_base_framework_close(&opal_btl_base_framework);
|
2013-03-27 21:17:31 +00:00
|
|
|
}
|