2014-04-14 23:29:26 +04:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2005-08-02 17:20:50 +04: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.
|
2014-05-14 17:47:57 +04:00
|
|
|
* Copyright (c) 2004-2014 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-08-02 17:20:50 +04:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2014-04-14 23:29:26 +04:00
|
|
|
* Copyright (c) 2006-2014 Los Alamos National Security, LLC. All rights
|
2006-11-22 05:06:52 +03:00
|
|
|
* reserved.
|
|
|
|
*
|
2005-08-02 17:20:50 +04:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $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"
|
2005-08-02 17:20:50 +04:00
|
|
|
#include <string.h>
|
2009-03-04 01:25:13 +03:00
|
|
|
#include "opal/class/opal_bitmap.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 04:47:28 +04:00
|
|
|
#include "opal/mca/btl/btl.h"
|
|
|
|
#include "opal/datatype/opal_convertor.h"
|
|
|
|
#include "opal/mca/mpool/base/base.h"
|
|
|
|
#include "opal/mca/mpool/mpool.h"
|
2005-08-02 17:20:50 +04:00
|
|
|
|
|
|
|
#include "btl_tcp.h"
|
|
|
|
#include "btl_tcp_frag.h"
|
|
|
|
#include "btl_tcp_proc.h"
|
|
|
|
#include "btl_tcp_endpoint.h"
|
|
|
|
|
|
|
|
mca_btl_tcp_module_t mca_btl_tcp_module = {
|
2014-04-14 23:29:26 +04:00
|
|
|
.super = {
|
|
|
|
.btl_component = &mca_btl_tcp_component.super,
|
|
|
|
.btl_add_procs = mca_btl_tcp_add_procs,
|
|
|
|
.btl_del_procs = mca_btl_tcp_del_procs,
|
|
|
|
.btl_finalize = mca_btl_tcp_finalize,
|
|
|
|
.btl_alloc = mca_btl_tcp_alloc,
|
|
|
|
.btl_free = mca_btl_tcp_free,
|
|
|
|
.btl_prepare_src = mca_btl_tcp_prepare_src,
|
2014-11-20 09:22:43 +03:00
|
|
|
.btl_prepare_dst = mca_btl_tcp_prepare_dst,
|
2014-04-14 23:29:26 +04:00
|
|
|
.btl_send = mca_btl_tcp_send,
|
|
|
|
.btl_put = mca_btl_tcp_put,
|
|
|
|
.btl_dump = mca_btl_base_dump,
|
|
|
|
.btl_ft_event = mca_btl_tcp_ft_event
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2007-04-28 23:13:47 +04:00
|
|
|
int mca_btl_tcp_add_procs( struct mca_btl_base_module_t* btl,
|
|
|
|
size_t nprocs,
|
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
|
|
|
struct opal_proc_t **procs,
|
2007-04-28 23:13:47 +04:00
|
|
|
struct mca_btl_base_endpoint_t** peers,
|
2009-03-04 01:25:13 +03:00
|
|
|
opal_bitmap_t* reachable )
|
2005-08-02 17:20:50 +04:00
|
|
|
{
|
|
|
|
mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*)btl;
|
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
|
|
|
const opal_proc_t* my_proc; /* pointer to caller's proc structure */
|
2005-08-02 17:20:50 +04:00
|
|
|
int i, rc;
|
|
|
|
|
2006-05-23 07:06:32 +04:00
|
|
|
/* get pointer to my proc structure */
|
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
|
|
|
if( NULL == (my_proc = opal_proc_local_get()) )
|
|
|
|
return OPAL_ERR_OUT_OF_RESOURCE;
|
|
|
|
|
2005-08-02 17:20:50 +04:00
|
|
|
for(i = 0; i < (int) nprocs; i++) {
|
|
|
|
|
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
|
|
|
struct opal_proc_t* opal_proc = procs[i];
|
2005-08-02 17:20:50 +04:00
|
|
|
mca_btl_tcp_proc_t* tcp_proc;
|
|
|
|
mca_btl_base_endpoint_t* tcp_endpoint;
|
|
|
|
|
2006-05-23 07:06:32 +04:00
|
|
|
/* Do not create loopback TCP connections */
|
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
|
|
|
if( my_proc == opal_proc ) {
|
2007-04-25 05:55:40 +04:00
|
|
|
continue;
|
|
|
|
}
|
2006-05-23 07:06:32 +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
|
|
|
if(NULL == (tcp_proc = mca_btl_tcp_proc_create(opal_proc))) {
|
2014-05-14 17:47:57 +04:00
|
|
|
continue;
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Check to make sure that the peer has at least as many interface
|
|
|
|
* addresses exported as we are trying to use. If not, then
|
|
|
|
* don't bind this BTL instance to the proc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
OPAL_THREAD_LOCK(&tcp_proc->proc_lock);
|
|
|
|
|
|
|
|
/* The btl_proc datastructure is shared by all TCP BTL
|
|
|
|
* instances that are trying to reach this destination.
|
|
|
|
* Cache the peer instance on the btl_proc.
|
|
|
|
*/
|
|
|
|
tcp_endpoint = OBJ_NEW(mca_btl_tcp_endpoint_t);
|
|
|
|
if(NULL == tcp_endpoint) {
|
2005-08-02 21:36:01 +04:00
|
|
|
OPAL_THREAD_UNLOCK(&tcp_proc->proc_lock);
|
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_ERR_OUT_OF_RESOURCE;
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
tcp_endpoint->endpoint_btl = tcp_btl;
|
|
|
|
rc = mca_btl_tcp_proc_insert(tcp_proc, tcp_endpoint);
|
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
|
|
|
if(rc != OPAL_SUCCESS) {
|
2005-08-02 21:36:01 +04:00
|
|
|
OPAL_THREAD_UNLOCK(&tcp_proc->proc_lock);
|
2007-03-20 14:50:17 +03:00
|
|
|
OBJ_RELEASE(tcp_endpoint);
|
2005-08-02 17:20:50 +04:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2009-03-04 01:25:13 +03:00
|
|
|
opal_bitmap_set_bit(reachable, i);
|
2005-08-02 21:36:01 +04:00
|
|
|
OPAL_THREAD_UNLOCK(&tcp_proc->proc_lock);
|
2005-08-02 17:20:50 +04:00
|
|
|
peers[i] = tcp_endpoint;
|
|
|
|
opal_list_append(&tcp_btl->tcp_endpoints, (opal_list_item_t*)tcp_endpoint);
|
|
|
|
|
|
|
|
/* we increase the count of MPI users of the event library
|
|
|
|
once per peer, so that we are used until we aren't
|
|
|
|
connected to a peer */
|
2006-11-22 05:06:52 +03:00
|
|
|
opal_progress_event_users_increment();
|
2005-08-02 17:20:50 +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;
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
int mca_btl_tcp_del_procs(struct mca_btl_base_module_t* btl,
|
|
|
|
size_t nprocs,
|
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
|
|
|
struct opal_proc_t **procs,
|
2005-08-29 21:29:58 +04:00
|
|
|
struct mca_btl_base_endpoint_t ** endpoints)
|
2005-08-02 17:20:50 +04:00
|
|
|
{
|
2005-08-29 21:29:58 +04:00
|
|
|
mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*)btl;
|
|
|
|
size_t i;
|
|
|
|
for(i=0; i<nprocs; i++) {
|
|
|
|
mca_btl_tcp_endpoint_t* tcp_endpoint = endpoints[i];
|
|
|
|
if(tcp_endpoint->endpoint_proc != mca_btl_tcp_proc_local()) {
|
|
|
|
opal_list_remove_item(&tcp_btl->tcp_endpoints, (opal_list_item_t*)tcp_endpoint);
|
|
|
|
OBJ_RELEASE(tcp_endpoint);
|
|
|
|
}
|
2006-11-22 05:06:52 +03:00
|
|
|
opal_progress_event_users_decrement();
|
2005-08-29 21:29:58 +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;
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allocate a segment.
|
|
|
|
*
|
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param size (IN) Request segment size.
|
|
|
|
*/
|
|
|
|
|
|
|
|
mca_btl_base_descriptor_t* mca_btl_tcp_alloc(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
2007-12-09 17:00:42 +03:00
|
|
|
struct mca_btl_base_endpoint_t* endpoint,
|
2007-05-24 23:51:26 +04:00
|
|
|
uint8_t order,
|
2007-12-09 17:08:01 +03:00
|
|
|
size_t size,
|
|
|
|
uint32_t flags)
|
2005-08-02 17:20:50 +04:00
|
|
|
{
|
2008-12-18 01:15:12 +03:00
|
|
|
mca_btl_tcp_frag_t* frag = NULL;
|
2005-08-02 17:20:50 +04:00
|
|
|
|
2005-08-27 00:19:11 +04:00
|
|
|
if(size <= btl->btl_eager_limit) {
|
2013-07-04 12:34:37 +04:00
|
|
|
MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag);
|
2006-02-22 20:37:59 +03:00
|
|
|
} else if (size <= btl->btl_max_send_size) {
|
2013-07-04 12:34:37 +04:00
|
|
|
MCA_BTL_TCP_FRAG_ALLOC_MAX(frag);
|
2008-12-18 01:15:12 +03:00
|
|
|
}
|
|
|
|
if( OPAL_UNLIKELY(NULL == frag) ) {
|
2006-02-22 20:37:59 +03:00
|
|
|
return NULL;
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
2006-02-22 20:37:59 +03:00
|
|
|
|
2008-12-18 01:15:12 +03:00
|
|
|
frag->segments[0].seg_len = size;
|
2007-01-05 01:07:37 +03:00
|
|
|
frag->segments[0].seg_addr.pval = frag+1;
|
2005-08-02 17:20:50 +04:00
|
|
|
|
2014-11-20 09:22:43 +03:00
|
|
|
frag->base.des_local = frag->segments;
|
|
|
|
frag->base.des_local_count = 1;
|
2008-02-18 20:39:30 +03:00
|
|
|
frag->base.des_flags = flags;
|
2007-05-24 23:51:26 +04:00
|
|
|
frag->base.order = MCA_BTL_NO_ORDER;
|
2005-08-02 17:20:50 +04:00
|
|
|
frag->btl = (mca_btl_tcp_module_t*)btl;
|
|
|
|
return (mca_btl_base_descriptor_t*)frag;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return a segment
|
|
|
|
*/
|
|
|
|
|
|
|
|
int mca_btl_tcp_free(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
mca_btl_base_descriptor_t* des)
|
|
|
|
{
|
|
|
|
mca_btl_tcp_frag_t* frag = (mca_btl_tcp_frag_t*)des;
|
2006-05-25 20:57:14 +04:00
|
|
|
MCA_BTL_TCP_FRAG_RETURN(frag);
|
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;
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Pack data and return a descriptor that can be
|
|
|
|
* used for send/put.
|
|
|
|
*
|
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param peer (IN) BTL peer addressing
|
|
|
|
*/
|
|
|
|
mca_btl_base_descriptor_t* mca_btl_tcp_prepare_src(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* endpoint,
|
2014-11-20 09:22:43 +03:00
|
|
|
struct mca_mpool_base_registration_t* registration,
|
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
|
|
|
struct opal_convertor_t* convertor,
|
2007-05-24 23:51:26 +04:00
|
|
|
uint8_t order,
|
2005-08-02 17:20:50 +04:00
|
|
|
size_t reserve,
|
2007-12-09 17:08:01 +03:00
|
|
|
size_t* size,
|
|
|
|
uint32_t flags)
|
2005-08-02 17:20:50 +04:00
|
|
|
{
|
|
|
|
mca_btl_tcp_frag_t* frag;
|
|
|
|
struct iovec iov;
|
|
|
|
uint32_t iov_count = 1;
|
|
|
|
size_t max_data = *size;
|
|
|
|
int rc;
|
|
|
|
|
2007-05-24 20:40:49 +04:00
|
|
|
if( OPAL_UNLIKELY(max_data > UINT32_MAX) ) { /* limit the size to what we support */
|
|
|
|
max_data = (size_t)UINT32_MAX;
|
|
|
|
}
|
2005-08-02 17:20:50 +04:00
|
|
|
/*
|
|
|
|
* if we aren't pinning the data and the requested size is less
|
|
|
|
* than the eager limit pack into a fragment from the eager pool
|
2007-05-24 20:40:49 +04:00
|
|
|
*/
|
2005-08-02 17:20:50 +04:00
|
|
|
if (max_data+reserve <= btl->btl_eager_limit) {
|
2013-07-04 12:34:37 +04:00
|
|
|
MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag);
|
2007-05-24 20:40:49 +04:00
|
|
|
} else {
|
|
|
|
/*
|
|
|
|
* otherwise pack as much data as we can into a fragment
|
|
|
|
* that is the max send size.
|
|
|
|
*/
|
2013-07-04 12:34:37 +04:00
|
|
|
MCA_BTL_TCP_FRAG_ALLOC_MAX(frag);
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
2007-05-24 20:40:49 +04:00
|
|
|
if( OPAL_UNLIKELY(NULL == frag) ) {
|
2005-08-02 17:20:50 +04:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2007-04-03 20:05:51 +04:00
|
|
|
frag->segments[0].seg_addr.pval = (frag + 1);
|
|
|
|
frag->segments[0].seg_len = reserve;
|
|
|
|
|
2014-11-20 09:22:43 +03:00
|
|
|
frag->base.des_local_count = 1;
|
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
|
|
|
if(opal_convertor_need_buffers(convertor)) {
|
2005-08-02 17:20:50 +04:00
|
|
|
|
|
|
|
if (max_data + reserve > frag->size) {
|
|
|
|
max_data = frag->size - reserve;
|
|
|
|
}
|
|
|
|
iov.iov_len = max_data;
|
2007-04-03 20:05:51 +04:00
|
|
|
iov.iov_base = (IOVBASE_TYPE*)(((unsigned char*)(frag->segments[0].seg_addr.pval)) + reserve);
|
2007-05-24 20:40:49 +04:00
|
|
|
|
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
|
|
|
rc = opal_convertor_pack(convertor, &iov, &iov_count, &max_data );
|
2007-05-24 20:40:49 +04:00
|
|
|
if( OPAL_UNLIKELY(rc < 0) ) {
|
2005-08-27 00:19:11 +04:00
|
|
|
mca_btl_tcp_free(btl, &frag->base);
|
2005-08-02 17:20:50 +04:00
|
|
|
return NULL;
|
|
|
|
}
|
2007-05-24 20:40:49 +04:00
|
|
|
|
2007-04-03 20:05:51 +04:00
|
|
|
frag->segments[0].seg_len += max_data;
|
2005-08-02 17:20:50 +04:00
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iov.iov_len = max_data;
|
|
|
|
iov.iov_base = NULL;
|
|
|
|
|
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
|
|
|
rc = opal_convertor_pack(convertor, &iov, &iov_count, &max_data );
|
2007-05-24 20:40:49 +04:00
|
|
|
if( OPAL_UNLIKELY(rc < 0) ) {
|
2005-08-27 00:19:11 +04:00
|
|
|
mca_btl_tcp_free(btl, &frag->base);
|
2005-08-02 17:20:50 +04:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2007-01-05 01:07:37 +03:00
|
|
|
frag->segments[1].seg_addr.pval = iov.iov_base;
|
2005-08-02 17:20:50 +04:00
|
|
|
frag->segments[1].seg_len = max_data;
|
2014-11-20 09:22:43 +03:00
|
|
|
frag->base.des_local_count = 2;
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
|
|
|
|
2014-11-20 09:22:43 +03:00
|
|
|
frag->base.des_local = frag->segments;
|
|
|
|
frag->base.des_remote = NULL;
|
|
|
|
frag->base.des_remote_count = 0;
|
2008-02-18 20:39:30 +03:00
|
|
|
frag->base.des_flags = flags;
|
2007-05-24 23:51:26 +04:00
|
|
|
frag->base.order = MCA_BTL_NO_ORDER;
|
2005-08-16 01:30:47 +04:00
|
|
|
*size = max_data;
|
2005-08-02 17:20:50 +04:00
|
|
|
return &frag->base;
|
|
|
|
}
|
|
|
|
|
2014-11-20 09:22:43 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Prepare a descriptor for send/rdma using the supplied
|
|
|
|
* convertor. If the convertor references data that is contigous,
|
|
|
|
* the descriptor may simply point to the user buffer. Otherwise,
|
|
|
|
* this routine is responsible for allocating buffer space and
|
|
|
|
* packing if required.
|
|
|
|
*
|
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param endpoint (IN) BTL peer addressing
|
|
|
|
* @param convertor (IN) Data type convertor
|
|
|
|
* @param reserve (IN) Additional bytes requested by upper layer to precede user data
|
|
|
|
* @param size (IN/OUT) Number of bytes to prepare (IN), number of bytes actually prepared (OUT)
|
|
|
|
*/
|
|
|
|
|
|
|
|
mca_btl_base_descriptor_t* mca_btl_tcp_prepare_dst(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* endpoint,
|
|
|
|
struct mca_mpool_base_registration_t* registration,
|
|
|
|
struct opal_convertor_t* convertor,
|
|
|
|
uint8_t order,
|
|
|
|
size_t reserve,
|
|
|
|
size_t* size,
|
|
|
|
uint32_t flags)
|
|
|
|
{
|
|
|
|
mca_btl_tcp_frag_t* frag;
|
|
|
|
|
|
|
|
if( OPAL_UNLIKELY((*size) > UINT32_MAX) ) { /* limit the size to what we support */
|
|
|
|
*size = (size_t)UINT32_MAX;
|
|
|
|
}
|
|
|
|
MCA_BTL_TCP_FRAG_ALLOC_USER(frag);
|
|
|
|
if( OPAL_UNLIKELY(NULL == frag) ) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
frag->segments->seg_len = *size;
|
|
|
|
opal_convertor_get_current_pointer( convertor, (void**)&(frag->segments->seg_addr.pval) );
|
|
|
|
|
|
|
|
frag->base.des_remote = NULL;
|
|
|
|
frag->base.des_remote_count = 0;
|
|
|
|
frag->base.des_local = frag->segments;
|
|
|
|
frag->base.des_local_count = 1;
|
|
|
|
frag->base.des_flags = flags;
|
|
|
|
frag->base.order = MCA_BTL_NO_ORDER;
|
|
|
|
return &frag->base;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-08-02 17:20:50 +04:00
|
|
|
/**
|
|
|
|
* Initiate an asynchronous send.
|
|
|
|
*
|
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param endpoint (IN) BTL addressing information
|
|
|
|
* @param descriptor (IN) Description of the data to be transfered
|
|
|
|
* @param tag (IN) The tag value used to notify the peer.
|
|
|
|
*/
|
|
|
|
|
2008-04-02 10:37:42 +04:00
|
|
|
int mca_btl_tcp_send( struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* endpoint,
|
|
|
|
struct mca_btl_base_descriptor_t* descriptor,
|
|
|
|
mca_btl_base_tag_t tag )
|
2005-08-02 17:20:50 +04:00
|
|
|
{
|
|
|
|
mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl;
|
|
|
|
mca_btl_tcp_frag_t* frag = (mca_btl_tcp_frag_t*)descriptor;
|
2008-06-20 21:50:19 +04:00
|
|
|
int i;
|
2005-08-09 18:10:17 +04:00
|
|
|
|
2005-08-02 17:20:50 +04:00
|
|
|
frag->btl = tcp_btl;
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->endpoint = endpoint;
|
|
|
|
frag->rc = 0;
|
|
|
|
frag->iov_idx = 0;
|
|
|
|
frag->iov_cnt = 1;
|
|
|
|
frag->iov_ptr = frag->iov;
|
2006-08-24 20:38:08 +04:00
|
|
|
frag->iov[0].iov_base = (IOVBASE_TYPE*)&frag->hdr;
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->iov[0].iov_len = sizeof(frag->hdr);
|
|
|
|
frag->hdr.size = 0;
|
2014-11-20 09:22:43 +03:00
|
|
|
for( i = 0; i < (int)frag->base.des_local_count; i++) {
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->hdr.size += frag->segments[i].seg_len;
|
|
|
|
frag->iov[i+1].iov_len = frag->segments[i].seg_len;
|
2007-01-05 01:07:37 +03:00
|
|
|
frag->iov[i+1].iov_base = (IOVBASE_TYPE*)frag->segments[i].seg_addr.pval;
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->iov_cnt++;
|
|
|
|
}
|
2005-08-02 17:20:50 +04:00
|
|
|
frag->hdr.base.tag = tag;
|
|
|
|
frag->hdr.type = MCA_BTL_TCP_HDR_TYPE_SEND;
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->hdr.count = 0;
|
2006-02-26 03:45:54 +03:00
|
|
|
if (endpoint->endpoint_nbo) MCA_BTL_TCP_HDR_HTON(frag->hdr);
|
2005-08-02 17:20:50 +04:00
|
|
|
return mca_btl_tcp_endpoint_send(endpoint,frag);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiate an asynchronous put.
|
2014-11-20 09:22:43 +03:00
|
|
|
*
|
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param endpoint (IN) BTL addressing information
|
|
|
|
* @param descriptor (IN) Description of the data to be transferred
|
2005-08-02 17:20:50 +04:00
|
|
|
*/
|
|
|
|
|
2014-11-20 09:22:43 +03:00
|
|
|
int mca_btl_tcp_put( mca_btl_base_module_t* btl,
|
|
|
|
mca_btl_base_endpoint_t* endpoint,
|
|
|
|
mca_btl_base_descriptor_t* descriptor )
|
2005-08-02 17:20:50 +04:00
|
|
|
{
|
2005-08-09 18:10:17 +04:00
|
|
|
mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl;
|
2014-11-20 09:22:43 +03:00
|
|
|
mca_btl_tcp_frag_t* frag = (mca_btl_tcp_frag_t*)descriptor;
|
2008-06-24 18:23:02 +04:00
|
|
|
int i;
|
2005-08-09 18:10:17 +04:00
|
|
|
|
2005-08-02 17:20:50 +04:00
|
|
|
frag->btl = tcp_btl;
|
|
|
|
frag->endpoint = endpoint;
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->rc = 0;
|
|
|
|
frag->iov_idx = 0;
|
|
|
|
frag->hdr.size = 0;
|
|
|
|
frag->iov_cnt = 2;
|
|
|
|
frag->iov_ptr = frag->iov;
|
2006-08-24 20:38:08 +04:00
|
|
|
frag->iov[0].iov_base = (IOVBASE_TYPE*)&frag->hdr;
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->iov[0].iov_len = sizeof(frag->hdr);
|
2014-11-20 09:22:43 +03:00
|
|
|
frag->iov[1].iov_base = (IOVBASE_TYPE*)frag->base.des_remote;
|
|
|
|
frag->iov[1].iov_len = frag->base.des_remote_count * sizeof(mca_btl_base_segment_t);
|
|
|
|
for( i = 0; i < (int)frag->base.des_local_count; i++ ) {
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->hdr.size += frag->segments[i].seg_len;
|
|
|
|
frag->iov[i+2].iov_len = frag->segments[i].seg_len;
|
2007-01-05 01:07:37 +03:00
|
|
|
frag->iov[i+2].iov_base = (IOVBASE_TYPE*)frag->segments[i].seg_addr.pval;
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->iov_cnt++;
|
|
|
|
}
|
|
|
|
frag->hdr.base.tag = MCA_BTL_TAG_BTL;
|
|
|
|
frag->hdr.type = MCA_BTL_TCP_HDR_TYPE_PUT;
|
2014-11-20 09:22:43 +03:00
|
|
|
frag->hdr.count = frag->base.des_remote_count;
|
2006-02-26 03:45:54 +03:00
|
|
|
if (endpoint->endpoint_nbo) MCA_BTL_TCP_HDR_HTON(frag->hdr);
|
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 ((i = mca_btl_tcp_endpoint_send(endpoint,frag)) >= 0 ? OPAL_SUCCESS : i);
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiate an asynchronous get.
|
2014-11-20 09:22:43 +03:00
|
|
|
*
|
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param endpoint (IN) BTL addressing information
|
|
|
|
* @param descriptor (IN) Description of the data to be transferred
|
|
|
|
*
|
2005-08-02 17:20:50 +04:00
|
|
|
*/
|
|
|
|
|
2014-11-20 09:22:43 +03:00
|
|
|
int mca_btl_tcp_get(
|
|
|
|
mca_btl_base_module_t* btl,
|
|
|
|
mca_btl_base_endpoint_t* endpoint,
|
|
|
|
mca_btl_base_descriptor_t* descriptor)
|
2005-08-02 17:20:50 +04:00
|
|
|
{
|
2005-08-09 18:10:17 +04:00
|
|
|
mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl;
|
2014-11-20 09:22:43 +03:00
|
|
|
mca_btl_tcp_frag_t* frag = (mca_btl_tcp_frag_t*)descriptor;
|
2008-05-30 07:58:39 +04:00
|
|
|
int rc;
|
2005-08-09 18:10:17 +04:00
|
|
|
|
2005-08-02 17:20:50 +04:00
|
|
|
frag->btl = tcp_btl;
|
|
|
|
frag->endpoint = endpoint;
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->rc = 0;
|
|
|
|
frag->iov_idx = 0;
|
|
|
|
frag->hdr.size = 0;
|
|
|
|
frag->iov_cnt = 2;
|
|
|
|
frag->iov_ptr = frag->iov;
|
2006-08-24 20:38:08 +04:00
|
|
|
frag->iov[0].iov_base = (IOVBASE_TYPE*)&frag->hdr;
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->iov[0].iov_len = sizeof(frag->hdr);
|
2014-11-20 09:22:43 +03:00
|
|
|
frag->iov[1].iov_base = (IOVBASE_TYPE*)frag->base.des_remote;
|
|
|
|
frag->iov[1].iov_len = frag->base.des_remote_count * sizeof(mca_btl_base_segment_t);
|
2005-08-09 18:10:17 +04:00
|
|
|
frag->hdr.base.tag = MCA_BTL_TAG_BTL;
|
|
|
|
frag->hdr.type = MCA_BTL_TCP_HDR_TYPE_GET;
|
2014-11-20 09:22:43 +03:00
|
|
|
frag->hdr.count = frag->base.des_remote_count;
|
2006-02-26 03:45:54 +03:00
|
|
|
if (endpoint->endpoint_nbo) MCA_BTL_TCP_HDR_HTON(frag->hdr);
|
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 ((rc = mca_btl_tcp_endpoint_send(endpoint,frag)) >= 0 ? OPAL_SUCCESS : rc);
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Cleanup/release module resources.
|
|
|
|
*/
|
|
|
|
|
|
|
|
int mca_btl_tcp_finalize(struct mca_btl_base_module_t* btl)
|
|
|
|
{
|
|
|
|
mca_btl_tcp_module_t* tcp_btl = (mca_btl_tcp_module_t*) btl;
|
|
|
|
opal_list_item_t* item;
|
|
|
|
for( item = opal_list_remove_first(&tcp_btl->tcp_endpoints);
|
|
|
|
item != NULL;
|
|
|
|
item = opal_list_remove_first(&tcp_btl->tcp_endpoints)) {
|
|
|
|
mca_btl_tcp_endpoint_t *endpoint = (mca_btl_tcp_endpoint_t*)item;
|
|
|
|
OBJ_RELEASE(endpoint);
|
2006-11-22 05:06:52 +03:00
|
|
|
opal_progress_event_users_decrement();
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|
|
|
|
free(tcp_btl);
|
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;
|
2005-08-02 17:20:50 +04:00
|
|
|
}
|