2014-07-10 16:31:15 +00:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2005-06-27 21:21:15 +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.
|
|
|
|
* 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-06-27 21:21:15 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2014-07-10 16:31:15 +00:00
|
|
|
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2005-06-27 21:21:15 +00:00
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2005-06-27 21:21:15 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2005-06-27 21:21:15 +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"
|
|
|
|
#include "opal/constants.h"
|
Update libevent to the 2.0 series, currently at 2.0.7rc. We will update to their final release when it becomes available. Currently known errors exist in unused portions of the libevent code. This revision passes the IBM test suite on a Linux machine and on a standalone Mac.
This is a fairly intrusive change, but outside of the moving of opal/event to opal/mca/event, the only changes involved (a) changing all calls to opal_event functions to reflect the new framework instead, and (b) ensuring that all opal_event_t objects are properly constructed since they are now true opal_objects.
Note: Shiqing has just returned from vacation and has not yet had a chance to complete the Windows integration. Thus, this commit almost certainly breaks Windows support on the trunk. However, I want this to have a chance to soak for as long as possible before I become less available a week from today (going to be at a class for 5 days, and thus will only be sparingly available) so we can find and fix any problems.
Biggest change is moving the libevent code from opal/event to a new opal/mca/event framework. This was done to make it much easier to update libevent in the future. New versions can be inserted as a new component and tested in parallel with the current version until validated, then we can remove the earlier version if we so choose. This is a statically built framework ala installdirs, so only one component will build at a time. There is no selection logic - the sole compiled component simply loads its function pointers into the opal_event struct.
I have gone thru the code base and converted all the libevent calls I could find. However, I cannot compile nor test every environment. It is therefore quite likely that errors remain in the system. Please keep an eye open for two things:
1. compile-time errors: these will be obvious as calls to the old functions (e.g., opal_evtimer_new) must be replaced by the new framework APIs (e.g., opal_event.evtimer_new)
2. run-time errors: these will likely show up as segfaults due to missing constructors on opal_event_t objects. It appears that it became a typical practice for people to "init" an opal_event_t by simply using memset to zero it out. This will no longer work - you must either OBJ_NEW or OBJ_CONSTRUCT an opal_event_t. I tried to catch these cases, but may have missed some. Believe me, you'll know when you hit it.
There is also the issue of the new libevent "no recursion" behavior. As I described on a recent email, we will have to discuss this and figure out what, if anything, we need to do.
This commit was SVN r23925.
2010-10-24 18:35:54 +00:00
|
|
|
#include "opal/mca/event/event.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/btl.h"
|
2015-06-23 20:59:57 -07:00
|
|
|
#include "opal/mca/mpool/base/base.h"
|
|
|
|
#include "opal/mca/btl/base/base.h"
|
2005-06-27 21:21:15 +00:00
|
|
|
|
2005-06-30 05:50:55 +00:00
|
|
|
#include "btl_template.h"
|
|
|
|
#include "btl_template_frag.h"
|
2015-06-23 20:59:57 -07:00
|
|
|
#include "btl_template_endpoint.h"
|
2011-06-20 17:59:37 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Register any MCA parameters associated with this component
|
|
|
|
*/
|
|
|
|
static int mca_btl_template_component_register(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Make initial determination whether this component can run or not
|
|
|
|
*/
|
|
|
|
static int mca_btl_template_component_open(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Any final cleanup before being unloaded.
|
|
|
|
*/
|
|
|
|
static int mca_btl_template_component_close(void);
|
|
|
|
|
|
|
|
|
2005-06-30 05:50:55 +00:00
|
|
|
mca_btl_template_component_t mca_btl_template_component = {
|
2014-07-10 16:31:15 +00:00
|
|
|
.super = {
|
2005-06-27 21:21:15 +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("template"),
|
|
|
|
.mca_open_component = mca_btl_template_component_open,
|
|
|
|
.mca_close_component = mca_btl_template_component_close,
|
|
|
|
.mca_register_component_params = mca_btl_template_component_register,
|
2005-06-27 21:21:15 +00:00
|
|
|
},
|
2014-07-10 16:31:15 +00:00
|
|
|
.btl_data = {
|
2007-03-16 23:11:45 +00:00
|
|
|
/* The component is not checkpoint ready */
|
2014-07-10 16:31:15 +00:00
|
|
|
.param_field = MCA_BASE_METADATA_PARAM_NONE
|
2005-06-27 21:21:15 +00:00
|
|
|
},
|
|
|
|
|
2014-07-10 16:31:15 +00:00
|
|
|
.btl_init = mca_btl_template_component_init,
|
|
|
|
.btl_progress = mca_btl_template_component_progress,
|
2005-06-27 21:21:15 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-06-20 17:59:37 +00:00
|
|
|
static int mca_btl_template_component_open(void)
|
2005-06-27 21:21:15 +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;
|
2011-06-20 17:59:37 +00:00
|
|
|
}
|
2005-06-27 21:21:15 +00:00
|
|
|
|
2011-06-20 17:59:37 +00:00
|
|
|
static int mca_btl_template_component_register(void)
|
2015-06-23 20:59:57 -07:00
|
|
|
{
|
2005-06-27 21:21:15 +00:00
|
|
|
/* initialize state */
|
2005-06-30 05:50:55 +00:00
|
|
|
mca_btl_template_component.template_num_btls=0;
|
|
|
|
mca_btl_template_component.template_btls=NULL;
|
2015-06-23 20:59:57 -07:00
|
|
|
|
|
|
|
/* initialize objects */
|
2005-07-03 16:22:16 +00:00
|
|
|
OBJ_CONSTRUCT(&mca_btl_template_component.template_procs, opal_list_t);
|
2005-06-27 21:21:15 +00:00
|
|
|
|
|
|
|
/* register TEMPLATE component parameters */
|
2013-03-27 21:09:41 +00:00
|
|
|
mca_btl_template_component.template_free_list_num = 8;
|
|
|
|
(void) mca_base_component_var_register(&mca_btl_template_component.super.btl_version,
|
|
|
|
"free_list_num", NULL, MCA_BASE_VAR_TYPE_INT,
|
|
|
|
NULL, 0, 0, OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_btl_template_component.template_free_list_num);
|
|
|
|
(void) mca_base_component_var_register(&mca_btl_template_component.super.btl_version,
|
|
|
|
"free_list_max", NULL, MCA_BASE_VAR_TYPE_INT,
|
|
|
|
NULL, 0, 0, OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_btl_template_component.template_free_list_max);
|
|
|
|
(void) mca_base_component_var_register(&mca_btl_template_component.super.btl_version,
|
|
|
|
"free_list_inc", NULL, MCA_BASE_VAR_TYPE_INT,
|
|
|
|
NULL, 0, 0, OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_btl_template_component.template_free_list_inc);
|
|
|
|
|
|
|
|
mca_btl_template_component.template_mpool_name = "grdma";
|
|
|
|
(void) mca_base_component_var_register(&mca_btl_template_component.super.btl_version,
|
|
|
|
"mpool", NULL, MCA_BASE_VAR_TYPE_STRING,
|
|
|
|
NULL, 0, 0, OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_btl_template_component.template_mpool_name);
|
|
|
|
|
|
|
|
mca_btl_template_module.super.btl_exclusivity = 0;
|
|
|
|
mca_btl_template_module.super.btl_eager_limit = 64*1024;
|
|
|
|
mca_btl_template_module.super.btl_rndv_eager_limit = 64*1024;
|
|
|
|
mca_btl_template_module.super.btl_max_send_size = 128*1024;
|
|
|
|
mca_btl_template_module.super.btl_min_rdma_pipeline_size = 1024*1024;
|
|
|
|
mca_btl_template_module.super.btl_rdma_pipeline_frag_size = 1024*1024;
|
|
|
|
mca_btl_template_module.super.btl_rdma_pipeline_send_length = 1024*1024;
|
|
|
|
mca_btl_template_module.super.btl_flags = MCA_BTL_FLAGS_PUT;
|
|
|
|
|
|
|
|
return mca_btl_base_param_register(&mca_btl_template_component.super.btl_version,
|
|
|
|
&mca_btl_template_module.super);
|
2005-06-27 21:21:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* component cleanup - sanity checking of queue lengths
|
|
|
|
*/
|
|
|
|
|
2011-06-20 17:59:37 +00:00
|
|
|
static int mca_btl_template_component_close(void)
|
2005-06-27 21:21:15 +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-27 21:21:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TEMPLATE component initialization:
|
|
|
|
* (1) read interface list from kernel and compare against component parameters
|
2005-06-30 05:50:55 +00:00
|
|
|
* then create a BTL instance for selected interfaces
|
2005-06-27 21:21:15 +00:00
|
|
|
* (2) setup TEMPLATE listen socket for incoming connection attempts
|
2005-06-30 05:50:55 +00:00
|
|
|
* (3) register BTL parameters with the MCA
|
2005-06-27 21:21:15 +00:00
|
|
|
*/
|
|
|
|
|
2015-06-23 20:59:57 -07:00
|
|
|
mca_btl_base_module_t** mca_btl_template_component_init(int *num_btl_modules,
|
2005-06-27 21:21:15 +00:00
|
|
|
bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TEMPLATE component progress.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2005-06-30 05:50:55 +00:00
|
|
|
int mca_btl_template_component_progress()
|
2005-06-27 21:21:15 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|