2011-12-10 01:24:07 +04:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
|
|
|
/*
|
2014-11-20 09:22:43 +03:00
|
|
|
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
|
2011-12-10 01:24:07 +04:00
|
|
|
* reserved.
|
2013-07-04 12:34:37 +04:00
|
|
|
* Copyright (c) 2011-2013 UT-Battelle, LLC. All rights reserved.
|
2011-12-10 01:24:07 +04:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2014-11-20 09:22:43 +03:00
|
|
|
#include "btl_ugni.h"
|
|
|
|
|
2011-12-10 01:24:07 +04:00
|
|
|
#include "btl_ugni_endpoint.h"
|
2012-02-10 04:47:29 +04:00
|
|
|
#include "btl_ugni_smsg.h"
|
2011-12-10 01:24:07 +04:00
|
|
|
|
|
|
|
static void mca_btl_ugni_ep_construct (mca_btl_base_endpoint_t *ep)
|
|
|
|
{
|
2012-04-20 01:51:55 +04:00
|
|
|
memset ((char *) ep + sizeof(ep->super), 0, sizeof (*ep) - sizeof (ep->super));
|
2012-06-01 00:02:41 +04:00
|
|
|
OBJ_CONSTRUCT(&ep->frag_wait_list, opal_list_t);
|
2012-04-20 01:51:55 +04:00
|
|
|
OBJ_CONSTRUCT(&ep->lock, opal_mutex_t);
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static void mca_btl_ugni_ep_destruct (mca_btl_base_endpoint_t *ep)
|
|
|
|
{
|
2012-06-01 00:02:41 +04:00
|
|
|
OBJ_DESTRUCT(&ep->frag_wait_list);
|
2012-04-20 01:51:55 +04:00
|
|
|
OBJ_DESTRUCT(&ep->lock);
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
2014-07-09 23:33:58 +04:00
|
|
|
OBJ_CLASS_INSTANCE(mca_btl_ugni_endpoint_t, opal_list_item_t,
|
2012-06-01 00:02:41 +04:00
|
|
|
mca_btl_ugni_ep_construct, mca_btl_ugni_ep_destruct);
|
2011-12-10 01:24:07 +04:00
|
|
|
|
|
|
|
static inline int mca_btl_ugni_ep_smsg_get_mbox (mca_btl_base_endpoint_t *ep) {
|
|
|
|
mca_btl_ugni_module_t *ugni_module = ep->btl;
|
|
|
|
ompi_free_list_item_t *mbox;
|
|
|
|
|
2014-08-08 22:02:46 +04:00
|
|
|
OMPI_FREE_LIST_GET_MT(&ugni_module->smsg_mboxes, mbox);
|
2011-12-10 01:24:07 +04:00
|
|
|
if (OPAL_UNLIKELY(NULL == mbox)) {
|
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;
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
ep->mailbox = (mca_btl_ugni_smsg_mbox_t *) mbox;
|
2013-11-18 08:58:37 +04:00
|
|
|
ep->mailbox->attr.index = ep->index;
|
2011-12-10 01:24:07 +04:00
|
|
|
|
|
|
|
/* per ugni spec we need to zero mailbox data before connecting */
|
2013-11-18 08:58:37 +04:00
|
|
|
memset ((char *)ep->mailbox->attr.smsg_attr.msg_buffer + ep->mailbox->attr.smsg_attr.mbox_offset, 0,
|
|
|
|
ep->mailbox->attr.smsg_attr.buff_size);
|
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;
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
int mca_btl_ugni_ep_disconnect (mca_btl_base_endpoint_t *ep, bool send_disconnect) {
|
2012-06-01 00:02:41 +04:00
|
|
|
gni_return_t rc;
|
2011-12-10 01:24:07 +04:00
|
|
|
|
2013-11-18 08:58:37 +04:00
|
|
|
if (MCA_BTL_UGNI_EP_STATE_INIT == ep->state) {
|
|
|
|
/* nothing to do */
|
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;
|
2013-11-18 08:58:37 +04:00
|
|
|
}
|
2011-12-10 01:24:07 +04:00
|
|
|
|
2013-11-18 08:58:37 +04:00
|
|
|
if (MCA_BTL_UGNI_EP_STATE_CONNECTED == ep->state && send_disconnect) {
|
2014-10-08 20:10:19 +04:00
|
|
|
OPAL_THREAD_LOCK(&ep->common->dev->dev_lock);
|
2013-11-18 08:58:37 +04:00
|
|
|
rc = GNI_SmsgSendWTag (ep->smsg_ep_handle, NULL, 0, NULL, 0, -1,
|
|
|
|
MCA_BTL_UGNI_TAG_DISCONNECT);
|
2014-10-08 20:10:19 +04:00
|
|
|
OPAL_THREAD_UNLOCK(&ep->common->dev->dev_lock);
|
2013-11-18 08:58:37 +04:00
|
|
|
if (GNI_RC_SUCCESS != rc) {
|
|
|
|
BTL_VERBOSE(("btl/ugni could not send close message"));
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
2014-10-08 20:10:19 +04:00
|
|
|
/* we might want to wait for local completion here (do we even care), yes we do */
|
|
|
|
/* TODO: FIX FIX FIX */
|
|
|
|
|
2013-11-18 08:58:37 +04:00
|
|
|
}
|
|
|
|
|
2014-10-08 20:10:19 +04:00
|
|
|
/* TODO: FIX GROSS */
|
|
|
|
OPAL_THREAD_LOCK(&ep->common->dev->dev_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
|
|
|
(void) opal_common_ugni_ep_destroy (&ep->smsg_ep_handle);
|
|
|
|
(void) opal_common_ugni_ep_destroy (&ep->rdma_ep_handle);
|
2014-10-08 20:10:19 +04:00
|
|
|
OPAL_THREAD_UNLOCK(&ep->common->dev->dev_lock);
|
2011-12-10 01:24:07 +04:00
|
|
|
|
2015-01-07 23:48:17 +03:00
|
|
|
if (ep->mailbox) {
|
|
|
|
OMPI_FREE_LIST_RETURN_MT(&ep->btl->smsg_mboxes, ((ompi_free_list_item_t *) ep->mailbox));
|
|
|
|
ep->mailbox = NULL;
|
|
|
|
}
|
2012-06-01 00:02:41 +04:00
|
|
|
|
2013-11-18 08:58:37 +04:00
|
|
|
ep->state = MCA_BTL_UGNI_EP_STATE_INIT;
|
2011-12-10 01:24:07 +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;
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline int mca_btl_ugni_ep_connect_start (mca_btl_base_endpoint_t *ep) {
|
|
|
|
int rc;
|
|
|
|
|
2014-11-20 09:22:43 +03:00
|
|
|
/* get the modex info for this endpoint and setup a ugni endpoint */
|
|
|
|
rc = opal_common_ugni_endpoint_for_proc (ep->btl->device, ep->peer_proc, &ep->common);
|
|
|
|
if (OPAL_SUCCESS != rc) {
|
|
|
|
assert (0);
|
2011-12-10 01:24:07 +04:00
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2014-11-13 18:26:25 +03:00
|
|
|
BTL_VERBOSE(("initiaiting connection to remote peer with address: %u id: %u proc: %p",
|
|
|
|
ep->common->ep_rem_addr, ep->common->ep_rem_id, (void *)ep->peer_proc));
|
|
|
|
|
2014-11-05 18:32:23 +03:00
|
|
|
/* bind endpoint to remote address */
|
|
|
|
/* we bind two endpoints to seperate out local smsg completion and local fma completion */
|
|
|
|
rc = opal_common_ugni_ep_create (ep->common, ep->btl->smsg_local_cq, &ep->smsg_ep_handle);
|
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 (OPAL_UNLIKELY(OPAL_SUCCESS != rc)) {
|
2012-04-20 01:51:55 +04:00
|
|
|
return rc;
|
|
|
|
}
|
2011-12-10 01:24:07 +04:00
|
|
|
|
2014-11-20 09:22:43 +03:00
|
|
|
rc = opal_common_ugni_ep_create (ep->common, ep->btl->rdma_local_cq, &ep->rdma_ep_handle);
|
|
|
|
if (OPAL_UNLIKELY(OPAL_SUCCESS != rc)) {
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2011-12-10 01:24:07 +04:00
|
|
|
/* build connection data */
|
|
|
|
rc = mca_btl_ugni_ep_smsg_get_mbox (ep);
|
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 (OPAL_UNLIKELY(OPAL_SUCCESS != rc)) {
|
2011-12-10 01:24:07 +04:00
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2012-04-20 01:51:55 +04:00
|
|
|
ep->state = MCA_BTL_UGNI_EP_STATE_CONNECTING;
|
|
|
|
|
2013-11-18 08:58:37 +04:00
|
|
|
memset (&ep->remote_attr, 0, sizeof (ep->remote_attr));
|
2011-12-10 01:24:07 +04:00
|
|
|
|
|
|
|
BTL_VERBOSE(("btl/ugni connection to remote peer initiated"));
|
|
|
|
|
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;
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline int mca_btl_ugni_ep_connect_finish (mca_btl_base_endpoint_t *ep) {
|
2012-06-01 00:02:41 +04:00
|
|
|
gni_return_t grc;
|
2011-12-10 01:24:07 +04:00
|
|
|
int rc;
|
|
|
|
|
|
|
|
BTL_VERBOSE(("finishing connection. remote attributes: msg_type = %d, msg_buffer = %p, buff_size = %d, "
|
|
|
|
"mem_hndl = {qword1 = %" PRIu64 ", qword2 = %" PRIu64 "}, mbox = %d, mbox_maxcredit = %d, "
|
2013-11-18 08:58:37 +04:00
|
|
|
"msg_maxsize = %d", ep->remote_attr.smsg_attr.msg_type, ep->remote_attr.smsg_attr.msg_buffer,
|
|
|
|
ep->remote_attr.smsg_attr.buff_size, ep->remote_attr.smsg_attr.mem_hndl.qword1,
|
|
|
|
ep->remote_attr.smsg_attr.mem_hndl.qword2, ep->remote_attr.smsg_attr.mbox_offset,
|
|
|
|
ep->remote_attr.smsg_attr.mbox_maxcredit, ep->remote_attr.smsg_attr.msg_maxsize));
|
2011-12-10 01:24:07 +04:00
|
|
|
|
|
|
|
BTL_VERBOSE(("finishing connection. local attributes: msg_type = %d, msg_buffer = %p, buff_size = %d, "
|
|
|
|
"mem_hndl = {qword1 = %" PRIu64 ", qword2 = %" PRIu64 "}, mbox = %d, mbox_maxcredit = %d, "
|
2013-11-18 08:58:37 +04:00
|
|
|
"msg_maxsize = %d", ep->mailbox->attr.smsg_attr.msg_type, ep->mailbox->attr.smsg_attr.msg_buffer,
|
|
|
|
ep->mailbox->attr.smsg_attr.buff_size, ep->mailbox->attr.smsg_attr.mem_hndl.qword1,
|
|
|
|
ep->mailbox->attr.smsg_attr.mem_hndl.qword2, ep->mailbox->attr.smsg_attr.mbox_offset,
|
|
|
|
ep->mailbox->attr.smsg_attr.mbox_maxcredit, ep->mailbox->attr.smsg_attr.msg_maxsize));
|
2011-12-10 01:24:07 +04:00
|
|
|
|
2013-11-18 08:58:37 +04:00
|
|
|
grc = GNI_SmsgInit (ep->smsg_ep_handle, &ep->mailbox->attr.smsg_attr, &ep->remote_attr.smsg_attr);
|
2012-06-01 00:02:41 +04:00
|
|
|
if (OPAL_UNLIKELY(GNI_RC_SUCCESS != grc)) {
|
|
|
|
BTL_ERROR(("error initializing SMSG protocol. rc = %d", grc));
|
2012-04-20 01:51:55 +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_common_rc_ugni_to_opal (grc);
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
2013-11-18 08:58:37 +04:00
|
|
|
/* set the local event data to the local index and the remote event data to my
|
|
|
|
* index on the remote peer. This makes lookup of endpoints on completion take
|
|
|
|
* a single lookup in the endpoints array. we will not be able to change the
|
|
|
|
* remote peer's index in the endpoint's array after this point. */
|
|
|
|
GNI_EpSetEventData (ep->rdma_ep_handle, ep->index, ep->remote_attr.index);
|
|
|
|
GNI_EpSetEventData (ep->smsg_ep_handle, ep->index, ep->remote_attr.index);
|
|
|
|
|
2014-10-08 20:10:19 +04:00
|
|
|
ep->rmt_irq_mem_hndl = ep->remote_attr.rmt_irq_mem_hndl;
|
2012-04-20 01:51:55 +04:00
|
|
|
ep->state = MCA_BTL_UGNI_EP_STATE_CONNECTED;
|
2011-12-10 01:24:07 +04:00
|
|
|
|
2012-06-01 00:02:41 +04:00
|
|
|
/* send all pending messages */
|
|
|
|
BTL_VERBOSE(("endpoint connected. posting %u sends", (unsigned int) opal_list_get_size (&ep->frag_wait_list)));
|
|
|
|
|
2014-07-09 23:33:58 +04:00
|
|
|
rc = mca_btl_ugni_progress_send_wait_list (ep);
|
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 (OPAL_UNLIKELY(OPAL_SUCCESS != rc)) {
|
2012-06-29 19:43:29 +04:00
|
|
|
ep->wait_listed = true;
|
2014-10-08 20:10:19 +04:00
|
|
|
OPAL_THREAD_LOCK(&ep->btl->ep_wait_list_lock);
|
2012-06-01 00:02:41 +04:00
|
|
|
opal_list_append (&ep->btl->ep_wait_list, &ep->super);
|
2014-10-08 20:10:19 +04:00
|
|
|
OPAL_THREAD_UNLOCK(&ep->btl->ep_wait_list_lock);
|
2011-12-10 01:24:07 +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;
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
2012-06-01 00:02:41 +04:00
|
|
|
static inline int mca_btl_ugni_directed_ep_post (mca_btl_base_endpoint_t *ep) {
|
|
|
|
gni_return_t rc;
|
|
|
|
|
2014-10-08 20:10:19 +04:00
|
|
|
BTL_VERBOSE(("posting directed datagram to remote id: %d for endpoint %p", ep->common->ep_rem_id, (void *)ep));
|
|
|
|
ep->mailbox->attr.rmt_irq_mem_hndl = mca_btl_ugni_component.modules[0].device->smsg_irq_mhndl;
|
2013-11-18 08:58:37 +04:00
|
|
|
|
|
|
|
rc = GNI_EpPostDataWId (ep->smsg_ep_handle, &ep->mailbox->attr, sizeof (ep->mailbox->attr),
|
|
|
|
&ep->remote_attr, sizeof (ep->remote_attr),
|
|
|
|
MCA_BTL_UGNI_CONNECT_DIRECTED_ID | ep->index);
|
2012-06-01 00:02:41 +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_common_rc_ugni_to_opal (rc);
|
2012-06-01 00:02:41 +04:00
|
|
|
}
|
|
|
|
|
2011-12-10 01:24:07 +04:00
|
|
|
int mca_btl_ugni_ep_connect_progress (mca_btl_base_endpoint_t *ep) {
|
|
|
|
int rc;
|
|
|
|
|
2014-10-08 20:10:19 +04:00
|
|
|
BTL_VERBOSE(("progressing connection for endpoint %p with state %d", (void *)ep, ep->state));
|
2013-11-18 08:58:37 +04:00
|
|
|
|
2012-04-20 01:51:55 +04:00
|
|
|
if (MCA_BTL_UGNI_EP_STATE_CONNECTED == ep->state) {
|
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;
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
2012-04-20 01:51:55 +04:00
|
|
|
if (MCA_BTL_UGNI_EP_STATE_INIT == ep->state) {
|
2011-12-10 01:24:07 +04:00
|
|
|
rc = mca_btl_ugni_ep_connect_start (ep);
|
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 (OPAL_SUCCESS != rc) {
|
2011-12-10 01:24:07 +04:00
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-11-18 08:58:37 +04:00
|
|
|
if (GNI_SMSG_TYPE_INVALID == ep->remote_attr.smsg_attr.msg_type) {
|
2012-06-01 00:02:41 +04:00
|
|
|
/* use datagram to exchange connection information with the remote peer */
|
2012-04-20 01:51:55 +04:00
|
|
|
rc = mca_btl_ugni_directed_ep_post (ep);
|
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 (OPAL_SUCCESS == rc) {
|
|
|
|
rc = OPAL_ERR_RESOURCE_BUSY;
|
2012-04-20 01:51:55 +04:00
|
|
|
}
|
|
|
|
return rc;
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
return mca_btl_ugni_ep_connect_finish (ep);
|
|
|
|
}
|