2013-07-20 02:13:58 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
|
|
|
* 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.
|
|
|
|
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
|
|
|
* reserved.
|
2014-02-26 11:40:10 +04:00
|
|
|
* Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved.
|
2013-07-20 02:13:58 +04:00
|
|
|
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights
|
2014-07-31 00:56:15 +04:00
|
|
|
* reserved.
|
2013-07-20 02:13:58 +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"
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
#include <infiniband/verbs.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include "opal_stdint.h"
|
|
|
|
#include "opal/mca/memchecker/base/base.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/constants.h"
|
|
|
|
#include "opal/mca/btl/btl.h"
|
|
|
|
#include "opal/mca/btl/base/base.h"
|
|
|
|
#include "opal/mca/common/verbs/common_verbs.h"
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
#include "btl_usnic.h"
|
|
|
|
#include "btl_usnic_frag.h"
|
|
|
|
#include "btl_usnic_endpoint.h"
|
|
|
|
#include "btl_usnic_module.h"
|
|
|
|
#include "btl_usnic_proc.h"
|
|
|
|
#include "btl_usnic_ack.h"
|
|
|
|
#include "btl_usnic_recv.h"
|
|
|
|
#include "btl_usnic_util.h"
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2014-07-31 00:56:15 +04:00
|
|
|
* We have received a segment, take action based on the
|
2013-07-20 02:13:58 +04:00
|
|
|
* packet type in the BTL 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
|
|
|
void opal_btl_usnic_recv_call(opal_btl_usnic_module_t *module,
|
|
|
|
opal_btl_usnic_recv_segment_t *seg,
|
|
|
|
opal_btl_usnic_channel_t *channel,
|
2014-02-26 11:47:19 +04:00
|
|
|
uint32_t l2_bytes_rcvd)
|
2013-07-20 02:13: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
|
|
|
opal_btl_usnic_segment_t *bseg;
|
2013-07-20 02:13:58 +04:00
|
|
|
mca_btl_active_message_callback_t* reg;
|
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
|
|
|
opal_btl_usnic_endpoint_t *endpoint;
|
|
|
|
opal_btl_usnic_btl_chunk_header_t *chunk_hdr;
|
|
|
|
opal_btl_usnic_btl_header_t *hdr;
|
2013-07-20 02:13:58 +04:00
|
|
|
uint32_t window_index;
|
2013-09-06 07:19:32 +04:00
|
|
|
int rc;
|
2013-07-20 02:13:58 +04:00
|
|
|
#if MSGDEBUG1
|
|
|
|
char src_mac[32];
|
|
|
|
char dest_mac[32];
|
|
|
|
#endif
|
|
|
|
|
|
|
|
bseg = &seg->rs_base;
|
|
|
|
|
Move all usNIC stats to _stats.c|h and export them as MPI_T pvars.
This commit moves all the module stats into their own struct so that
the stats only need to appear as a single line in the module_t
definition, and then moves all the logic for reporting the stats into
btl_usnic_stats.c|h.
Further, the stats are now exported as MPI_T_BIND_NO_OBJECT entities
(i.e., not bound to any particular MPI handle), and are marked as
READONLY and CONTINUOUS. They currently all default to verbose level
5 ("Application tuner / detailed", according to
https://svn.open-mpi.org/trac/ompi/wiki/MCAParamLevels).
Most of the statistics are counters, but a small number are high
watermark values. Due to how counters are reported via MPI_T, none of
the counters are exported through MPI_T if the MCA param
btl_usnic_stats_relative=1 (i.e., the module resets the stats back to
zero at a given frequency).
When MPI_T_pvar_handle_alloc() is invoked on any of these pvars, it
will return a count that is equal to the number of active usnic BTL
modules. The values returned for any given pvar (e.g.,
num_total_sends) are an array containing one value for each active
usnic BTL module. The ordering of values in the array is both
consistent across all usnic pvars and stable throughout a single job:
array slot 0 corresponds to module X, array slot 1 corresponds to
module Y, etc.
Mapping which array slot corresponds to which underlying Linux usnic_X
device works as follows:
* The btl_usnic_devices MPI_T state pvar is associated with a
btl_usnic_device MPI_T enum, and be obtained via
MPI_T_pvar_get_info().
* If all usNIC pvars are of length N, the values [0,N) in the
btl_usnic_device enum are associated with strings of the
corresponding underlying Linux device.
For exampe, to look up which Linux device is reported in all usNIC
pvars' array slot 1, look up the int value 1 in the btl_usnic_devices
enum. Its corresponding string value is underlying Linux device name
(e.g., "usnic_1").
cmr=v1.7.4:subject="usnic BTL MPI_T pvars"
This commit was SVN r29545.
2013-10-29 02:23:08 +04:00
|
|
|
++module->stats.num_total_recvs;
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
/* Valgrind help */
|
|
|
|
opal_memchecker_base_mem_defined((void*)(seg->rs_recv_desc.sg_list[0].addr),
|
|
|
|
seg->rs_recv_desc.sg_list[0].length);
|
|
|
|
|
|
|
|
/* Find out who sent this segment */
|
2013-09-06 07:18:57 +04:00
|
|
|
endpoint = seg->rs_endpoint;
|
2013-07-20 02:13:58 +04:00
|
|
|
if (FAKE_RECV_FRAG_DROP || OPAL_UNLIKELY(NULL == endpoint)) {
|
|
|
|
/* No idea who this was from, so drop it */
|
|
|
|
#if MSGDEBUG1
|
|
|
|
opal_output(0, "=== Unknown sender; dropped: from MAC %s to MAC %s, seq %" UDSEQ,
|
2014-07-31 00:56:15 +04:00
|
|
|
src_mac,
|
|
|
|
dest_mac,
|
2014-02-26 11:40:10 +04:00
|
|
|
bseg->us_btl_header->pkt_seq);
|
2013-07-20 02:13:58 +04:00
|
|
|
#endif
|
Move all usNIC stats to _stats.c|h and export them as MPI_T pvars.
This commit moves all the module stats into their own struct so that
the stats only need to appear as a single line in the module_t
definition, and then moves all the logic for reporting the stats into
btl_usnic_stats.c|h.
Further, the stats are now exported as MPI_T_BIND_NO_OBJECT entities
(i.e., not bound to any particular MPI handle), and are marked as
READONLY and CONTINUOUS. They currently all default to verbose level
5 ("Application tuner / detailed", according to
https://svn.open-mpi.org/trac/ompi/wiki/MCAParamLevels).
Most of the statistics are counters, but a small number are high
watermark values. Due to how counters are reported via MPI_T, none of
the counters are exported through MPI_T if the MCA param
btl_usnic_stats_relative=1 (i.e., the module resets the stats back to
zero at a given frequency).
When MPI_T_pvar_handle_alloc() is invoked on any of these pvars, it
will return a count that is equal to the number of active usnic BTL
modules. The values returned for any given pvar (e.g.,
num_total_sends) are an array containing one value for each active
usnic BTL module. The ordering of values in the array is both
consistent across all usnic pvars and stable throughout a single job:
array slot 0 corresponds to module X, array slot 1 corresponds to
module Y, etc.
Mapping which array slot corresponds to which underlying Linux usnic_X
device works as follows:
* The btl_usnic_devices MPI_T state pvar is associated with a
btl_usnic_device MPI_T enum, and be obtained via
MPI_T_pvar_get_info().
* If all usNIC pvars are of length N, the values [0,N) in the
btl_usnic_device enum are associated with strings of the
corresponding underlying Linux device.
For exampe, to look up which Linux device is reported in all usNIC
pvars' array slot 1, look up the int value 1 in the btl_usnic_devices
enum. Its corresponding string value is underlying Linux device name
(e.g., "usnic_1").
cmr=v1.7.4:subject="usnic BTL MPI_T pvars"
This commit was SVN r29545.
2013-10-29 02:23:08 +04:00
|
|
|
++module->stats.num_unk_recvs;
|
2013-07-20 02:13:58 +04:00
|
|
|
goto repost_no_endpoint;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************/
|
|
|
|
/* Segment is an incoming 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
|
|
|
if (OPAL_BTL_USNIC_PAYLOAD_TYPE_FRAG == bseg->us_btl_header->payload_type) {
|
2013-07-20 02:13:58 +04:00
|
|
|
|
2013-09-06 07:19:20 +04:00
|
|
|
/* do the receive bookkeeping */
|
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
|
|
|
rc = opal_btl_usnic_recv_frag_bookkeeping(module, seg, channel);
|
2013-09-06 07:19:32 +04:00
|
|
|
if (rc != 0) {
|
|
|
|
return;
|
|
|
|
}
|
2013-07-20 02:13:58 +04:00
|
|
|
|
2013-09-17 11:20:44 +04:00
|
|
|
hdr = seg->rs_base.us_btl_header;
|
|
|
|
|
2013-07-20 02:13:58 +04:00
|
|
|
#if MSGDEBUG1
|
|
|
|
opal_output(0, "<-- Received FRAG ep %p, seq %" UDSEQ ", len=%d\n",
|
2014-02-26 11:40:10 +04:00
|
|
|
(void*) endpoint, hdr->pkt_seq, hdr->payload_len);
|
2013-07-20 02:13:58 +04:00
|
|
|
#if 0
|
|
|
|
|
|
|
|
opal_output(0, "<-- Received FRAG ep %p, seq %" UDSEQ " from %s to %s: GOOD! (rel seq %d, lowest seq %" UDSEQ ", highest seq: %" UDSEQ ", rwstart %d) seg %p, module %p\n",
|
|
|
|
(void*) endpoint,
|
2014-02-26 11:40:10 +04:00
|
|
|
seg->rs_base.us_btl_header->pkt_seq,
|
2013-07-20 02:13:58 +04:00
|
|
|
src_mac, dest_mac,
|
|
|
|
window_index,
|
|
|
|
endpoint->endpoint_next_contig_seq_to_recv,
|
|
|
|
endpoint->endpoint_highest_seq_rcvd,
|
|
|
|
endpoint->endpoint_rfstart,
|
|
|
|
(void*) seg, (void*) module);
|
2013-09-17 11:20:44 +04:00
|
|
|
if (hdr->put_addr != NULL) {
|
2013-07-20 02:13:58 +04:00
|
|
|
opal_output(0, " put_addr = %p\n",
|
|
|
|
seg->rs_base.us_btl_header->put_addr);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
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_btl_usnic_frag_seg_proto_size(seg) !=
|
2014-02-26 11:47:19 +04:00
|
|
|
l2_bytes_rcvd)) {
|
|
|
|
BTL_ERROR(("L2 packet size and segment payload len do not agree!"
|
|
|
|
" l2_bytes_rcvd=%" PRIu32 " expected=%" PRIu32,
|
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
|
|
|
l2_bytes_rcvd, opal_btl_usnic_frag_seg_proto_size(seg)));
|
2014-02-26 11:47:19 +04:00
|
|
|
abort();
|
|
|
|
}
|
|
|
|
|
2013-07-20 02:13:58 +04:00
|
|
|
/* If this it not a PUT, Pass this segment up to the PML.
|
|
|
|
* Be sure to get the payload length from the BTL header because
|
|
|
|
* the L2 layer may artificially inflate (or otherwise change)
|
|
|
|
* the frame length to meet minimum sizes, add protocol information,
|
|
|
|
* etc.
|
|
|
|
*/
|
2013-09-17 11:20:44 +04:00
|
|
|
if (hdr->put_addr == NULL) {
|
|
|
|
reg = mca_btl_base_active_message_trigger + hdr->tag;
|
|
|
|
seg->rs_segment.seg_len = hdr->payload_len;
|
2013-09-17 11:29:40 +04:00
|
|
|
#if MSGDEBUG2
|
|
|
|
opal_output(0, "small recv complete, pass up %u bytes, tag=%d\n",
|
|
|
|
(unsigned)bseg->us_btl_header->payload_len,
|
|
|
|
(int)bseg->us_btl_header->tag);
|
|
|
|
#endif
|
2013-09-17 11:20:44 +04:00
|
|
|
reg->cbfunc(&module->super, hdr->tag, &seg->rs_desc, reg->cbdata);
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If this is a PUT, need to copy it to user buffer
|
|
|
|
*/
|
|
|
|
} else {
|
|
|
|
#if MSGDEBUG1
|
2014-07-31 00:56:15 +04:00
|
|
|
opal_output(0, "Copy %d PUT bytes to %p\n",
|
2013-07-20 02:13:58 +04:00
|
|
|
seg->rs_base.us_btl_header->payload_len,
|
2013-08-30 03:24:14 +04:00
|
|
|
(void*)seg->rs_base.us_btl_header->put_addr);
|
2013-07-20 02:13:58 +04:00
|
|
|
#endif
|
|
|
|
memcpy(seg->rs_base.us_btl_header->put_addr,
|
|
|
|
seg->rs_base.us_payload.raw,
|
|
|
|
seg->rs_base.us_btl_header->payload_len);
|
|
|
|
}
|
|
|
|
|
2013-09-06 07:19:20 +04:00
|
|
|
/* do not jump to repost, already done by bookkeeping */
|
2013-09-06 07:18:57 +04:00
|
|
|
return;
|
2013-07-20 02:13:58 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************/
|
|
|
|
/* Segment is an incoming chunk */
|
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_BTL_USNIC_PAYLOAD_TYPE_CHUNK == bseg->us_btl_header->payload_type) {
|
2013-07-20 02:13:58 +04:00
|
|
|
int frag_index;
|
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
|
|
|
opal_btl_usnic_rx_frag_info_t *fip;
|
2013-07-20 02:13: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
|
|
|
if (OPAL_UNLIKELY(opal_btl_usnic_chunk_seg_proto_size(seg) !=
|
2014-02-26 11:47:19 +04:00
|
|
|
l2_bytes_rcvd)) {
|
|
|
|
BTL_ERROR(("L2 packet size and segment payload len do not agree!"
|
|
|
|
" l2_bytes_rcvd=%" PRIu32 " expected=%" PRIu32,
|
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
|
|
|
l2_bytes_rcvd, opal_btl_usnic_chunk_seg_proto_size(seg)));
|
2014-02-26 11:47:19 +04:00
|
|
|
abort();
|
|
|
|
}
|
|
|
|
|
2013-07-20 02:13:58 +04:00
|
|
|
/* Is incoming sequence # ok? */
|
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_btl_usnic_check_rx_seq(endpoint, seg,
|
2013-09-06 07:19:32 +04:00
|
|
|
&window_index) != 0)) {
|
2013-07-20 02:13:58 +04:00
|
|
|
goto repost;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if MSGDEBUG1
|
|
|
|
opal_output(0, "<-- Received CHUNK fid %d ep %p, seq %" UDSEQ " from %s to %s: GOOD! (rel seq %d, lowest seq %" UDSEQ ", highest seq: %" UDSEQ ", rwstart %d) seg %p, module %p\n",
|
|
|
|
seg->rs_base.us_btl_chunk_header->ch_frag_id,
|
|
|
|
(void*) endpoint,
|
2014-02-26 11:40:10 +04:00
|
|
|
seg->rs_base.us_btl_chunk_header->ch_hdr.pkt_seq,
|
2013-07-20 02:13:58 +04:00
|
|
|
src_mac, dest_mac,
|
|
|
|
window_index,
|
|
|
|
endpoint->endpoint_next_contig_seq_to_recv,
|
|
|
|
endpoint->endpoint_highest_seq_rcvd,
|
|
|
|
endpoint->endpoint_rfstart,
|
|
|
|
(void*) seg, (void*) module);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* start a new fragment if not one in progress
|
|
|
|
* alloc memory, etc. when last byte arrives, dealloc the
|
|
|
|
* frag_id and pass data to PML
|
|
|
|
*/
|
|
|
|
chunk_hdr = seg->rs_base.us_btl_chunk_header;
|
|
|
|
frag_index = chunk_hdr->ch_frag_id % MAX_ACTIVE_FRAGS;
|
|
|
|
fip = &(endpoint->endpoint_rx_frag_info[frag_index]);
|
|
|
|
|
|
|
|
/* frag_id == 0 means this slot it empty, grab it! */
|
|
|
|
if (0 == fip->rfi_frag_id) {
|
|
|
|
fip->rfi_frag_id = chunk_hdr->ch_frag_id;
|
|
|
|
fip->rfi_frag_size = chunk_hdr->ch_frag_size;
|
|
|
|
if (chunk_hdr->ch_hdr.put_addr == NULL) {
|
|
|
|
int pool;
|
|
|
|
|
|
|
|
fip->rfi_data = NULL;
|
|
|
|
|
|
|
|
/* See which data pool this should come from,
|
|
|
|
* or if it should be malloc()ed
|
|
|
|
*/
|
2013-12-20 21:37:22 +04:00
|
|
|
pool = usnic_fls(chunk_hdr->ch_frag_size-1);
|
2013-07-20 02:13:58 +04:00
|
|
|
if (pool >= module->first_pool &&
|
|
|
|
pool <= module->last_pool) {
|
|
|
|
ompi_free_list_item_t* item;
|
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
|
|
|
opal_btl_usnic_rx_buf_t *rx_buf;
|
2013-07-20 02:13:58 +04:00
|
|
|
OMPI_FREE_LIST_GET_MT(&module->module_recv_buffers[pool],
|
|
|
|
item);
|
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
|
|
|
rx_buf = (opal_btl_usnic_rx_buf_t *)item;
|
2013-11-07 05:27:31 +04:00
|
|
|
if (OPAL_LIKELY(NULL != rx_buf)) {
|
2013-11-05 02:52:14 +04:00
|
|
|
fip->rfi_fl_elt = item;
|
2013-11-07 05:27:31 +04:00
|
|
|
fip->rfi_data = rx_buf->buf;
|
2013-07-20 02:13:58 +04:00
|
|
|
fip->rfi_data_pool = pool;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (fip->rfi_data == NULL) {
|
|
|
|
fip->rfi_data = malloc(chunk_hdr->ch_frag_size);
|
|
|
|
fip->rfi_data_pool = 0;
|
|
|
|
}
|
|
|
|
if (fip->rfi_data == NULL) {
|
|
|
|
abort();
|
|
|
|
}
|
2013-09-17 11:29:40 +04:00
|
|
|
#if MSGDEBUG1
|
2013-09-27 01:48:04 +04:00
|
|
|
opal_output(0, "Start large recv to %p, size=%"PRIu32"\n",
|
|
|
|
(void *)fip->rfi_data, chunk_hdr->ch_frag_size);
|
2013-07-20 02:13:58 +04:00
|
|
|
#endif
|
|
|
|
} else {
|
2013-09-17 11:29:40 +04:00
|
|
|
#if MSGDEBUG1
|
2013-09-27 01:48:04 +04:00
|
|
|
opal_output(0, "Start PUT to %p\n",
|
|
|
|
(void *)chunk_hdr->ch_hdr.put_addr);
|
2013-07-20 02:13:58 +04:00
|
|
|
#endif
|
|
|
|
fip->rfi_data = chunk_hdr->ch_hdr.put_addr;
|
|
|
|
}
|
|
|
|
fip->rfi_bytes_left = chunk_hdr->ch_frag_size;
|
|
|
|
fip->rfi_frag_id = chunk_hdr->ch_frag_id;
|
|
|
|
|
|
|
|
/* frag_id is not 0 - it must match, drop if not */
|
|
|
|
} else if (fip->rfi_frag_id != chunk_hdr->ch_frag_id) {
|
Move all usNIC stats to _stats.c|h and export them as MPI_T pvars.
This commit moves all the module stats into their own struct so that
the stats only need to appear as a single line in the module_t
definition, and then moves all the logic for reporting the stats into
btl_usnic_stats.c|h.
Further, the stats are now exported as MPI_T_BIND_NO_OBJECT entities
(i.e., not bound to any particular MPI handle), and are marked as
READONLY and CONTINUOUS. They currently all default to verbose level
5 ("Application tuner / detailed", according to
https://svn.open-mpi.org/trac/ompi/wiki/MCAParamLevels).
Most of the statistics are counters, but a small number are high
watermark values. Due to how counters are reported via MPI_T, none of
the counters are exported through MPI_T if the MCA param
btl_usnic_stats_relative=1 (i.e., the module resets the stats back to
zero at a given frequency).
When MPI_T_pvar_handle_alloc() is invoked on any of these pvars, it
will return a count that is equal to the number of active usnic BTL
modules. The values returned for any given pvar (e.g.,
num_total_sends) are an array containing one value for each active
usnic BTL module. The ordering of values in the array is both
consistent across all usnic pvars and stable throughout a single job:
array slot 0 corresponds to module X, array slot 1 corresponds to
module Y, etc.
Mapping which array slot corresponds to which underlying Linux usnic_X
device works as follows:
* The btl_usnic_devices MPI_T state pvar is associated with a
btl_usnic_device MPI_T enum, and be obtained via
MPI_T_pvar_get_info().
* If all usNIC pvars are of length N, the values [0,N) in the
btl_usnic_device enum are associated with strings of the
corresponding underlying Linux device.
For exampe, to look up which Linux device is reported in all usNIC
pvars' array slot 1, look up the int value 1 in the btl_usnic_devices
enum. Its corresponding string value is underlying Linux device name
(e.g., "usnic_1").
cmr=v1.7.4:subject="usnic BTL MPI_T pvars"
This commit was SVN r29545.
2013-10-29 02:23:08 +04:00
|
|
|
++module->stats.num_badfrag_recvs;
|
2013-07-20 02:13:58 +04:00
|
|
|
goto repost;
|
|
|
|
}
|
|
|
|
#if MSGDEBUG1
|
|
|
|
opal_output(0, "put_addr=%p, copy_addr=%p, off=%d\n",
|
|
|
|
chunk_hdr->ch_hdr.put_addr,
|
|
|
|
fip->rfi_data+chunk_hdr->ch_frag_offset,
|
|
|
|
chunk_hdr->ch_frag_offset);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Stats */
|
Move all usNIC stats to _stats.c|h and export them as MPI_T pvars.
This commit moves all the module stats into their own struct so that
the stats only need to appear as a single line in the module_t
definition, and then moves all the logic for reporting the stats into
btl_usnic_stats.c|h.
Further, the stats are now exported as MPI_T_BIND_NO_OBJECT entities
(i.e., not bound to any particular MPI handle), and are marked as
READONLY and CONTINUOUS. They currently all default to verbose level
5 ("Application tuner / detailed", according to
https://svn.open-mpi.org/trac/ompi/wiki/MCAParamLevels).
Most of the statistics are counters, but a small number are high
watermark values. Due to how counters are reported via MPI_T, none of
the counters are exported through MPI_T if the MCA param
btl_usnic_stats_relative=1 (i.e., the module resets the stats back to
zero at a given frequency).
When MPI_T_pvar_handle_alloc() is invoked on any of these pvars, it
will return a count that is equal to the number of active usnic BTL
modules. The values returned for any given pvar (e.g.,
num_total_sends) are an array containing one value for each active
usnic BTL module. The ordering of values in the array is both
consistent across all usnic pvars and stable throughout a single job:
array slot 0 corresponds to module X, array slot 1 corresponds to
module Y, etc.
Mapping which array slot corresponds to which underlying Linux usnic_X
device works as follows:
* The btl_usnic_devices MPI_T state pvar is associated with a
btl_usnic_device MPI_T enum, and be obtained via
MPI_T_pvar_get_info().
* If all usNIC pvars are of length N, the values [0,N) in the
btl_usnic_device enum are associated with strings of the
corresponding underlying Linux device.
For exampe, to look up which Linux device is reported in all usNIC
pvars' array slot 1, look up the int value 1 in the btl_usnic_devices
enum. Its corresponding string value is underlying Linux device name
(e.g., "usnic_1").
cmr=v1.7.4:subject="usnic BTL MPI_T pvars"
This commit was SVN r29545.
2013-10-29 02:23:08 +04:00
|
|
|
++module->stats.num_chunk_recvs;
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
/* validate offset and len to be within fragment */
|
|
|
|
assert(chunk_hdr->ch_frag_offset + chunk_hdr->ch_hdr.payload_len <=
|
|
|
|
fip->rfi_frag_size);
|
|
|
|
assert(fip->rfi_frag_size == chunk_hdr->ch_frag_size);
|
|
|
|
|
|
|
|
/* copy the data into place */
|
|
|
|
memcpy(fip->rfi_data + chunk_hdr->ch_frag_offset, (char *)(chunk_hdr+1),
|
|
|
|
chunk_hdr->ch_hdr.payload_len);
|
|
|
|
|
|
|
|
/* update sliding window */
|
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
|
|
|
opal_btl_usnic_update_window(endpoint, window_index);
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
fip->rfi_bytes_left -= chunk_hdr->ch_hdr.payload_len;
|
|
|
|
if (0 == fip->rfi_bytes_left) {
|
|
|
|
mca_btl_base_descriptor_t desc;
|
|
|
|
mca_btl_base_segment_t segment;
|
|
|
|
|
2013-09-17 11:20:44 +04:00
|
|
|
segment.seg_addr.pval = fip->rfi_data;
|
2013-07-20 02:13:58 +04:00
|
|
|
segment.seg_len = fip->rfi_frag_size;
|
2014-07-10 20:31:15 +04:00
|
|
|
desc.des_local = &segment;
|
|
|
|
desc.des_local_count = 1;
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
/* only up to PML if this was not a put */
|
|
|
|
if (chunk_hdr->ch_hdr.put_addr == NULL) {
|
|
|
|
|
|
|
|
/* Pass this segment up to the PML */
|
|
|
|
#if MSGDEBUG2
|
2013-09-17 11:29:40 +04:00
|
|
|
opal_output(0, "large recv complete, pass up %p, %u bytes, tag=%d\n",
|
2014-07-10 20:31:15 +04:00
|
|
|
desc.des_local->seg_addr.pval,
|
|
|
|
(unsigned)desc.des_local->seg_len,
|
2013-09-17 11:25:05 +04:00
|
|
|
(int)chunk_hdr->ch_hdr.tag);
|
2013-07-20 02:13:58 +04:00
|
|
|
#endif
|
2013-09-17 11:20:44 +04:00
|
|
|
reg = mca_btl_base_active_message_trigger +
|
|
|
|
chunk_hdr->ch_hdr.tag;
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
/* mca_pml_ob1_recv_frag_callback_frag() */
|
2013-09-17 11:20:44 +04:00
|
|
|
reg->cbfunc(&module->super, chunk_hdr->ch_hdr.tag,
|
2013-07-20 02:13:58 +04:00
|
|
|
&desc, reg->cbdata);
|
|
|
|
|
|
|
|
/* free temp buffer for non-put */
|
|
|
|
if (0 == fip->rfi_data_pool) {
|
|
|
|
free(fip->rfi_data);
|
|
|
|
} else {
|
|
|
|
OMPI_FREE_LIST_RETURN_MT(
|
|
|
|
&module->module_recv_buffers[fip->rfi_data_pool],
|
2013-11-05 02:52:14 +04:00
|
|
|
fip->rfi_fl_elt);
|
2013-07-20 02:13:58 +04:00
|
|
|
}
|
|
|
|
|
2013-09-17 11:29:40 +04:00
|
|
|
#if MSGDEBUG1
|
2013-07-20 02:13:58 +04:00
|
|
|
} else {
|
2013-09-17 11:29:40 +04:00
|
|
|
opal_output(0, "PUT recv complete, no callback\n");
|
2013-07-20 02:13:58 +04:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/* release the fragment ID */
|
|
|
|
fip->rfi_frag_id = 0;
|
|
|
|
|
|
|
|
/* force immediate ACK */
|
|
|
|
endpoint->endpoint_acktime = 0;
|
|
|
|
}
|
|
|
|
goto repost;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************/
|
|
|
|
/* Frag is an incoming ACK */
|
2014-07-31 00:56:15 +04:00
|
|
|
else if (OPAL_LIKELY(OPAL_BTL_USNIC_PAYLOAD_TYPE_ACK ==
|
2013-07-20 02:13:58 +04:00
|
|
|
bseg->us_btl_header->payload_type)) {
|
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
|
|
|
opal_btl_usnic_seq_t ack_seq;
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
/* sequence being ACKed */
|
|
|
|
ack_seq = bseg->us_btl_header->ack_seq;
|
|
|
|
|
|
|
|
/* Stats */
|
Move all usNIC stats to _stats.c|h and export them as MPI_T pvars.
This commit moves all the module stats into their own struct so that
the stats only need to appear as a single line in the module_t
definition, and then moves all the logic for reporting the stats into
btl_usnic_stats.c|h.
Further, the stats are now exported as MPI_T_BIND_NO_OBJECT entities
(i.e., not bound to any particular MPI handle), and are marked as
READONLY and CONTINUOUS. They currently all default to verbose level
5 ("Application tuner / detailed", according to
https://svn.open-mpi.org/trac/ompi/wiki/MCAParamLevels).
Most of the statistics are counters, but a small number are high
watermark values. Due to how counters are reported via MPI_T, none of
the counters are exported through MPI_T if the MCA param
btl_usnic_stats_relative=1 (i.e., the module resets the stats back to
zero at a given frequency).
When MPI_T_pvar_handle_alloc() is invoked on any of these pvars, it
will return a count that is equal to the number of active usnic BTL
modules. The values returned for any given pvar (e.g.,
num_total_sends) are an array containing one value for each active
usnic BTL module. The ordering of values in the array is both
consistent across all usnic pvars and stable throughout a single job:
array slot 0 corresponds to module X, array slot 1 corresponds to
module Y, etc.
Mapping which array slot corresponds to which underlying Linux usnic_X
device works as follows:
* The btl_usnic_devices MPI_T state pvar is associated with a
btl_usnic_device MPI_T enum, and be obtained via
MPI_T_pvar_get_info().
* If all usNIC pvars are of length N, the values [0,N) in the
btl_usnic_device enum are associated with strings of the
corresponding underlying Linux device.
For exampe, to look up which Linux device is reported in all usNIC
pvars' array slot 1, look up the int value 1 in the btl_usnic_devices
enum. Its corresponding string value is underlying Linux device name
(e.g., "usnic_1").
cmr=v1.7.4:subject="usnic BTL MPI_T pvars"
This commit was SVN r29545.
2013-10-29 02:23:08 +04:00
|
|
|
++module->stats.num_ack_recvs;
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
#if MSGDEBUG1
|
|
|
|
opal_output(0, " Received ACK for sequence number %" UDSEQ " from %s to %s\n",
|
|
|
|
bseg->us_btl_header->ack_seq, src_mac, dest_mac);
|
|
|
|
#endif
|
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
|
|
|
opal_btl_usnic_handle_ack(endpoint, ack_seq);
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
goto repost;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************/
|
|
|
|
/* Have no idea what the frag is; drop it */
|
|
|
|
else {
|
Move all usNIC stats to _stats.c|h and export them as MPI_T pvars.
This commit moves all the module stats into their own struct so that
the stats only need to appear as a single line in the module_t
definition, and then moves all the logic for reporting the stats into
btl_usnic_stats.c|h.
Further, the stats are now exported as MPI_T_BIND_NO_OBJECT entities
(i.e., not bound to any particular MPI handle), and are marked as
READONLY and CONTINUOUS. They currently all default to verbose level
5 ("Application tuner / detailed", according to
https://svn.open-mpi.org/trac/ompi/wiki/MCAParamLevels).
Most of the statistics are counters, but a small number are high
watermark values. Due to how counters are reported via MPI_T, none of
the counters are exported through MPI_T if the MCA param
btl_usnic_stats_relative=1 (i.e., the module resets the stats back to
zero at a given frequency).
When MPI_T_pvar_handle_alloc() is invoked on any of these pvars, it
will return a count that is equal to the number of active usnic BTL
modules. The values returned for any given pvar (e.g.,
num_total_sends) are an array containing one value for each active
usnic BTL module. The ordering of values in the array is both
consistent across all usnic pvars and stable throughout a single job:
array slot 0 corresponds to module X, array slot 1 corresponds to
module Y, etc.
Mapping which array slot corresponds to which underlying Linux usnic_X
device works as follows:
* The btl_usnic_devices MPI_T state pvar is associated with a
btl_usnic_device MPI_T enum, and be obtained via
MPI_T_pvar_get_info().
* If all usNIC pvars are of length N, the values [0,N) in the
btl_usnic_device enum are associated with strings of the
corresponding underlying Linux device.
For exampe, to look up which Linux device is reported in all usNIC
pvars' array slot 1, look up the int value 1 in the btl_usnic_devices
enum. Its corresponding string value is underlying Linux device name
(e.g., "usnic_1").
cmr=v1.7.4:subject="usnic BTL MPI_T pvars"
This commit was SVN r29545.
2013-10-29 02:23:08 +04:00
|
|
|
++module->stats.num_unk_recvs;
|
2013-07-20 02:13:58 +04:00
|
|
|
opal_output(0, "==========================unknown 2");
|
|
|
|
goto repost;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************/
|
|
|
|
repost:
|
|
|
|
|
|
|
|
/* if endpoint exiting, and all ACKs received, release the endpoint */
|
|
|
|
if (endpoint->endpoint_exiting && ENDPOINT_DRAINED(endpoint)) {
|
2014-08-06 02:31:55 +04:00
|
|
|
OBJ_RELEASE(endpoint);
|
2013-07-20 02:13:58 +04:00
|
|
|
}
|
|
|
|
repost_no_endpoint:
|
Move all usNIC stats to _stats.c|h and export them as MPI_T pvars.
This commit moves all the module stats into their own struct so that
the stats only need to appear as a single line in the module_t
definition, and then moves all the logic for reporting the stats into
btl_usnic_stats.c|h.
Further, the stats are now exported as MPI_T_BIND_NO_OBJECT entities
(i.e., not bound to any particular MPI handle), and are marked as
READONLY and CONTINUOUS. They currently all default to verbose level
5 ("Application tuner / detailed", according to
https://svn.open-mpi.org/trac/ompi/wiki/MCAParamLevels).
Most of the statistics are counters, but a small number are high
watermark values. Due to how counters are reported via MPI_T, none of
the counters are exported through MPI_T if the MCA param
btl_usnic_stats_relative=1 (i.e., the module resets the stats back to
zero at a given frequency).
When MPI_T_pvar_handle_alloc() is invoked on any of these pvars, it
will return a count that is equal to the number of active usnic BTL
modules. The values returned for any given pvar (e.g.,
num_total_sends) are an array containing one value for each active
usnic BTL module. The ordering of values in the array is both
consistent across all usnic pvars and stable throughout a single job:
array slot 0 corresponds to module X, array slot 1 corresponds to
module Y, etc.
Mapping which array slot corresponds to which underlying Linux usnic_X
device works as follows:
* The btl_usnic_devices MPI_T state pvar is associated with a
btl_usnic_device MPI_T enum, and be obtained via
MPI_T_pvar_get_info().
* If all usNIC pvars are of length N, the values [0,N) in the
btl_usnic_device enum are associated with strings of the
corresponding underlying Linux device.
For exampe, to look up which Linux device is reported in all usNIC
pvars' array slot 1, look up the int value 1 in the btl_usnic_devices
enum. Its corresponding string value is underlying Linux device name
(e.g., "usnic_1").
cmr=v1.7.4:subject="usnic BTL MPI_T pvars"
This commit was SVN r29545.
2013-10-29 02:23:08 +04:00
|
|
|
++module->stats.num_recv_reposts;
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
/* Add recv to linked list for reposting */
|
2013-09-06 07:18:57 +04:00
|
|
|
seg->rs_recv_desc.next = channel->repost_recv_head;
|
|
|
|
channel->repost_recv_head = &seg->rs_recv_desc;
|
2013-07-20 02:13:58 +04:00
|
|
|
}
|