2013-07-20 02:13:58 +04:00
|
|
|
/*
|
2014-02-26 11:40:10 +04:00
|
|
|
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
2013-07-20 02:13:58 +04:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BTL_USNIC_RECV_H
|
|
|
|
#define BTL_USNIC_RECV_H
|
|
|
|
|
|
|
|
#include <infiniband/verbs.h>
|
|
|
|
|
|
|
|
#include "btl_usnic.h"
|
2014-02-26 11:47:19 +04:00
|
|
|
#include "btl_usnic_util.h"
|
2013-07-20 02:13:58 +04:00
|
|
|
#include "btl_usnic_frag.h"
|
2013-09-06 07:18:57 +04:00
|
|
|
#include "btl_usnic_proc.h"
|
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
|
|
|
void opal_btl_usnic_recv_call(opal_btl_usnic_module_t *module,
|
|
|
|
opal_btl_usnic_recv_segment_t *rseg,
|
|
|
|
opal_btl_usnic_channel_t *channel,
|
2014-02-26 11:47:19 +04:00
|
|
|
uint32_t l2_bytes_rcvd);
|
2013-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Given an incoming segment, lookup the endpoint that sent it
|
|
|
|
*/
|
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
|
|
|
static inline opal_btl_usnic_endpoint_t *
|
|
|
|
lookup_sender(opal_btl_usnic_module_t *module, opal_btl_usnic_segment_t *seg)
|
2013-09-06 07:18:57 +04:00
|
|
|
{
|
|
|
|
int ret;
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
opal_btl_usnic_endpoint_t *sender;
|
2013-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
/* Use the hashed ORTE process name in the BTL header to uniquely
|
|
|
|
identify the sending process (using the MAC/hardware address
|
|
|
|
only identifies the sending server -- not the sending ORTE
|
|
|
|
process). */
|
|
|
|
/* JMS We've experimented with using a handshake before sending
|
|
|
|
any data so that instead of looking up a hash on the
|
|
|
|
btl_header->sender, echo back the ptr to the sender's
|
|
|
|
ompi_proc. There was limited speedup with this scheme; more
|
|
|
|
investigation is required. */
|
2014-07-31 00:56:15 +04:00
|
|
|
ret = opal_hash_table_get_value_uint64(&module->senders,
|
2013-09-06 07:18:57 +04:00
|
|
|
seg->us_btl_header->sender,
|
|
|
|
(void**) &sender);
|
|
|
|
if (OPAL_LIKELY(OPAL_SUCCESS == ret)) {
|
|
|
|
return sender;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* The sender wasn't in the hash table, so do a slow lookup and
|
|
|
|
put the result in the hash table */
|
2014-07-31 00:56:15 +04:00
|
|
|
sender = opal_btl_usnic_proc_lookup_endpoint(module,
|
2013-09-06 07:18:57 +04:00
|
|
|
seg->us_btl_header->sender);
|
|
|
|
if (NULL != sender) {
|
2014-07-31 00:56:15 +04:00
|
|
|
opal_hash_table_set_value_uint64(&module->senders,
|
2013-09-06 07:18:57 +04:00
|
|
|
seg->us_btl_header->sender, sender);
|
|
|
|
return sender;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Whoa -- not found at all! */
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Packet has been fully processed, update the receive window
|
|
|
|
* to indicate that it and possible following contiguous sequence
|
|
|
|
* numbers have been received.
|
|
|
|
*/
|
|
|
|
static inline void
|
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(
|
|
|
|
opal_btl_usnic_endpoint_t *endpoint,
|
2013-09-06 07:18:57 +04:00
|
|
|
uint32_t window_index)
|
|
|
|
{
|
|
|
|
uint32_t i;
|
|
|
|
|
|
|
|
/* Enable ACK reply if not enabled */
|
|
|
|
#if MSGDEBUG1
|
|
|
|
opal_output(0, "ep: %p, ack_needed = %s\n", (void*)endpoint, endpoint->endpoint_ack_needed?"true":"false");
|
|
|
|
#endif
|
|
|
|
if (!endpoint->endpoint_ack_needed) {
|
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_add_to_endpoints_needing_ack(endpoint);
|
2013-09-06 07:18:57 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/* give this process a chance to send something before ACKing */
|
|
|
|
if (0 == endpoint->endpoint_acktime) {
|
|
|
|
endpoint->endpoint_acktime = get_nsec() + 50000; /* 50 usec */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Save this incoming segment in the received segmentss array on the
|
|
|
|
endpoint. */
|
|
|
|
/* JMS Another optimization: make rcvd_segs be a bitmask (i.e.,
|
|
|
|
more cache friendly) */
|
|
|
|
endpoint->endpoint_rcvd_segs[window_index] = true;
|
|
|
|
|
|
|
|
/* See if the leftmost segment in the receiver window is
|
|
|
|
occupied. If so, advance the window. Repeat until we hit
|
|
|
|
an unoccupied position in the window. */
|
|
|
|
i = endpoint->endpoint_rfstart;
|
|
|
|
while (endpoint->endpoint_rcvd_segs[i]) {
|
|
|
|
endpoint->endpoint_rcvd_segs[i] = false;
|
|
|
|
endpoint->endpoint_next_contig_seq_to_recv++;
|
|
|
|
i = WINDOW_SIZE_MOD(i + 1);
|
|
|
|
|
2013-09-17 11:29:40 +04:00
|
|
|
#if MSGDEBUG1
|
2013-09-06 07:18:57 +04:00
|
|
|
opal_output(0, "Advance window to %d; next seq to send %" UDSEQ, i,
|
|
|
|
endpoint->endpoint_next_contig_seq_to_recv);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
endpoint->endpoint_rfstart = i;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int
|
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_check_rx_seq(
|
|
|
|
opal_btl_usnic_endpoint_t *endpoint,
|
|
|
|
opal_btl_usnic_recv_segment_t *seg,
|
2013-09-06 07:18:57 +04:00
|
|
|
uint32_t *window_index)
|
|
|
|
{
|
|
|
|
uint32_t i;
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
opal_btl_usnic_seq_t seq;
|
2014-02-26 11:40:10 +04:00
|
|
|
int delta;
|
2013-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Handle piggy-backed ACK if present
|
|
|
|
*/
|
2014-02-26 11:40:10 +04:00
|
|
|
if (seg->rs_base.us_btl_header->ack_present) {
|
2013-09-06 07:18:57 +04:00
|
|
|
#if MSGDEBUG1
|
|
|
|
opal_output(0, "Handle piggy-packed ACK seq %"UDSEQ"\n", seg->rs_base.us_btl_header->ack_seq);
|
|
|
|
#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,
|
2013-09-06 07:18:57 +04:00
|
|
|
seg->rs_base.us_btl_header->ack_seq);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Do we have room in the endpoint's receiver window?
|
2014-07-31 00:56:15 +04:00
|
|
|
|
2013-09-06 07:18:57 +04:00
|
|
|
Receiver window:
|
|
|
|
|
|
|
|
|-------- WINDOW_SIZE ----------|
|
|
|
|
+---------------------------------+
|
|
|
|
| highest_seq_rcvd |
|
|
|
|
| somewhere in this range |
|
|
|
|
+^--------------------------------+
|
|
|
|
|
|
|
|
|
+-- next_contig_seq_to_recv: the window left edge;
|
|
|
|
will always be less than highest_seq_rcvd
|
|
|
|
|
2014-07-31 00:56:15 +04:00
|
|
|
The good condition is
|
2013-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
next_contig_seq_to_recv <= seq < next_contig_seq_to_recv + WINDOW_SIZE
|
|
|
|
|
|
|
|
And the bad condition is
|
|
|
|
|
|
|
|
seq < next_contig_seq_to_recv
|
|
|
|
or
|
|
|
|
seq >= next_contig_seg_to_recv + WINDOW_SIZE
|
|
|
|
*/
|
2014-02-26 11:40:10 +04:00
|
|
|
seq = seg->rs_base.us_btl_header->pkt_seq;
|
|
|
|
delta = SEQ_DIFF(seq, endpoint->endpoint_next_contig_seq_to_recv);
|
|
|
|
if (delta < 0 || delta >= WINDOW_SIZE) {
|
2013-09-17 11:29:40 +04:00
|
|
|
#if MSGDEBUG1
|
2013-09-06 07:18:57 +04:00
|
|
|
opal_output(0, "<-- Received FRAG/CHUNK ep %p, seq %" UDSEQ " outside of window (%" UDSEQ " - %" UDSEQ "), %p, module %p -- DROPPED\n",
|
2014-07-31 00:56:15 +04:00
|
|
|
(void*)endpoint, seg->rs_base.us_btl_header->pkt_seq,
|
2013-09-06 07:18:57 +04:00
|
|
|
endpoint->endpoint_next_contig_seq_to_recv,
|
2014-07-31 00:56:15 +04:00
|
|
|
(endpoint->endpoint_next_contig_seq_to_recv +
|
2013-09-06 07:18:57 +04:00
|
|
|
WINDOW_SIZE - 1),
|
|
|
|
(void*) seg,
|
|
|
|
(void*) endpoint->endpoint_module);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Stats */
|
2014-02-26 11:40:10 +04:00
|
|
|
if (delta < 0) {
|
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
|
|
|
++endpoint->endpoint_module->stats.num_oow_low_recvs;
|
2013-09-06 07:18:57 +04:00
|
|
|
} 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
|
|
|
++endpoint->endpoint_module->stats.num_oow_high_recvs;
|
2013-09-06 07:18:57 +04:00
|
|
|
}
|
|
|
|
goto dup_needs_ack;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Ok, this segment is within the receiver window. Have we
|
|
|
|
already received it? It's possible that the sender has
|
|
|
|
re-sent a segment that we've already received (but not yet
|
|
|
|
ACKed).
|
|
|
|
|
|
|
|
We have saved all un-ACKed segment in an array on the
|
|
|
|
endpoint that is the same legnth as the receiver's window
|
|
|
|
(i.e., WINDOW_SIZE). We can use the incoming segment sequence
|
|
|
|
number to find its position in the array. It's a little
|
|
|
|
tricky because the left edge of the receiver window keeps
|
|
|
|
moving, so we use a starting reference point in the array
|
|
|
|
that is updated when we sent ACKs (and therefore move the
|
|
|
|
left edge of the receiver's window).
|
|
|
|
|
|
|
|
So this segment's index into the endpoint array is:
|
|
|
|
|
|
|
|
rel_posn_in_recv_win = seq - next_contig_seq_to_recv
|
|
|
|
array_posn = (rel_posn_in_recv_win + rfstart) % WINDOW_SIZE
|
2014-07-31 00:56:15 +04:00
|
|
|
|
2013-09-06 07:18:57 +04:00
|
|
|
rfstart is then updated when we send ACKs:
|
|
|
|
|
|
|
|
rfstart = (rfstart + num_acks_sent) % WINDOW_SIZE
|
|
|
|
*/
|
2014-02-26 11:40:10 +04:00
|
|
|
i = SEQ_DIFF(seq, endpoint->endpoint_next_contig_seq_to_recv);
|
2013-09-06 07:18:57 +04:00
|
|
|
i = WINDOW_SIZE_MOD(i + endpoint->endpoint_rfstart);
|
|
|
|
if (endpoint->endpoint_rcvd_segs[i]) {
|
2013-09-17 11:29:40 +04:00
|
|
|
#if MSGDEBUG1
|
2013-09-17 11:25:05 +04:00
|
|
|
opal_output(0, "<-- Received FRAG/CHUNK ep %p, seq %" UDSEQ ", seg %p: duplicate -- DROPPED\n",
|
2014-02-26 11:40:10 +04:00
|
|
|
(void*) endpoint, seg->rs_base.us_btl_header->pkt_seq, (void*) seg);
|
2013-09-06 07:18:57 +04:00
|
|
|
#endif
|
|
|
|
/* highest_seq_rcvd is for debug stats only; it's not used
|
|
|
|
in any window calculations */
|
2014-02-26 11:40:10 +04:00
|
|
|
assert(SEQ_LE(seq, endpoint->endpoint_highest_seq_rcvd));
|
2013-09-06 07:18:57 +04:00
|
|
|
/* next_contig_seq_to_recv-1 is the ack number we'll
|
|
|
|
send */
|
2014-02-26 11:40:10 +04:00
|
|
|
assert (SEQ_GT(seq, endpoint->endpoint_next_contig_seq_to_recv - 1));
|
2013-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
/* 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
|
|
|
++endpoint->endpoint_module->stats.num_dup_recvs;
|
2013-09-06 07:18:57 +04:00
|
|
|
goto dup_needs_ack;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Stats: is this the highest sequence number we've received? */
|
2014-02-26 11:40:10 +04:00
|
|
|
if (SEQ_GT(seq, endpoint->endpoint_highest_seq_rcvd)) {
|
2013-09-06 07:18:57 +04:00
|
|
|
endpoint->endpoint_highest_seq_rcvd = seq;
|
|
|
|
}
|
|
|
|
|
|
|
|
*window_index = i;
|
2013-09-06 07:19:32 +04:00
|
|
|
return 0;
|
2013-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
dup_needs_ack:
|
|
|
|
if (!endpoint->endpoint_ack_needed) {
|
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_add_to_endpoints_needing_ack(endpoint);
|
2013-09-06 07:18:57 +04:00
|
|
|
}
|
2013-09-06 07:19:32 +04:00
|
|
|
return -1;
|
2013-09-06 07:18:57 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2014-07-31 00:56:15 +04:00
|
|
|
* We have received a segment, take action based on the
|
2013-09-06 07:18:57 +04:00
|
|
|
* packet type in the BTL header.
|
|
|
|
* Try to be fast here - defer as much bookkeeping until later as
|
|
|
|
* possible.
|
|
|
|
* See README.txt for a discussion of receive fastpath
|
|
|
|
*/
|
|
|
|
static inline void
|
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_recv_fast(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-09-06 07:18:57 +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-09-06 07:18:57 +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_seq_t seq;
|
|
|
|
opal_btl_usnic_endpoint_t *endpoint;
|
2014-02-26 11:40:10 +04:00
|
|
|
int delta;
|
2013-09-06 07:18:57 +04:00
|
|
|
int i;
|
|
|
|
|
|
|
|
bseg = &seg->rs_base;
|
|
|
|
|
|
|
|
/* Find out who sent this segment */
|
|
|
|
endpoint = lookup_sender(module, bseg);
|
|
|
|
seg->rs_endpoint = endpoint;
|
|
|
|
|
|
|
|
if (endpoint != NULL && !endpoint->endpoint_exiting &&
|
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_PAYLOAD_TYPE_FRAG ==
|
2013-09-06 07:18:57 +04:00
|
|
|
bseg->us_btl_header->payload_type) &&
|
|
|
|
seg->rs_base.us_btl_header->put_addr == NULL) {
|
|
|
|
|
|
|
|
/* Valgrind help */
|
|
|
|
opal_memchecker_base_mem_defined(
|
|
|
|
(void*)(seg->rs_recv_desc.sg_list[0].addr),
|
|
|
|
seg->rs_recv_desc.sg_list[0].length);
|
|
|
|
|
2014-02-26 11:40:10 +04:00
|
|
|
seq = seg->rs_base.us_btl_header->pkt_seq;
|
|
|
|
delta = SEQ_DIFF(seq, endpoint->endpoint_next_contig_seq_to_recv);
|
|
|
|
if (delta < 0 || delta >= WINDOW_SIZE) {
|
2013-09-06 07:18:57 +04:00
|
|
|
goto drop;
|
|
|
|
}
|
|
|
|
|
|
|
|
i = seq - endpoint->endpoint_next_contig_seq_to_recv;
|
|
|
|
i = WINDOW_SIZE_MOD(i + endpoint->endpoint_rfstart);
|
|
|
|
if (endpoint->endpoint_rcvd_segs[i]) {
|
|
|
|
goto drop;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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
|
|
|
reg = mca_btl_base_active_message_trigger + bseg->us_btl_header->tag;
|
2013-09-06 07:18:57 +04:00
|
|
|
seg->rs_segment.seg_len = bseg->us_btl_header->payload_len;
|
2014-07-31 00:56:15 +04:00
|
|
|
reg->cbfunc(&module->super, bseg->us_btl_header->tag,
|
2013-09-06 07:18:57 +04:00
|
|
|
&seg->rs_desc, reg->cbdata);
|
|
|
|
|
|
|
|
drop:
|
|
|
|
channel->chan_deferred_recv = seg;
|
|
|
|
|
|
|
|
} else {
|
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_recv_call(module, seg, channel, l2_bytes_rcvd);
|
2013-09-06 07:18:57 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*/
|
2013-09-06 07:19:32 +04:00
|
|
|
static inline int
|
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_recv_frag_bookkeeping(
|
|
|
|
opal_btl_usnic_module_t* module,
|
|
|
|
opal_btl_usnic_recv_segment_t *seg,
|
|
|
|
opal_btl_usnic_channel_t *channel)
|
2013-09-06 07:18:57 +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_endpoint_t* endpoint;
|
2013-09-06 07:18:57 +04:00
|
|
|
uint32_t window_index;
|
2013-09-06 07:19:32 +04:00
|
|
|
int rc;
|
2013-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
endpoint = seg->rs_endpoint;
|
|
|
|
|
|
|
|
/* Valgrind help */
|
|
|
|
opal_memchecker_base_mem_defined(
|
|
|
|
(void*)(seg->rs_recv_desc.sg_list[0].addr),
|
|
|
|
seg->rs_recv_desc.sg_list[0].length);
|
|
|
|
|
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-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
/* Do late processing of incoming sequence # */
|
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_check_rx_seq(endpoint, seg, &window_index);
|
2013-09-06 07:19:32 +04:00
|
|
|
if (OPAL_UNLIKELY(rc != 0)) {
|
2013-09-06 07:18:57 +04:00
|
|
|
goto repost;
|
|
|
|
}
|
|
|
|
|
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_frag_recvs;
|
2013-09-06 07:18:57 +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_update_window(endpoint, window_index);
|
2013-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
repost:
|
2013-09-06 07:19:32 +04:00
|
|
|
/* 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-09-06 07:19:32 +04:00
|
|
|
}
|
|
|
|
|
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-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
/* Add recv to linked list for reposting */
|
|
|
|
seg->rs_recv_desc.next = channel->repost_recv_head;
|
|
|
|
channel->repost_recv_head = &seg->rs_recv_desc;
|
2013-09-06 07:19:32 +04:00
|
|
|
|
|
|
|
return rc;
|
2013-09-06 07:18:57 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2014-07-31 00:56:15 +04:00
|
|
|
* We have received a segment, take action based on the
|
2013-09-06 07:18:57 +04:00
|
|
|
* packet type in the BTL header
|
|
|
|
*/
|
|
|
|
static inline void
|
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_recv(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-09-06 07:18:57 +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-09-06 07:18:57 +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;
|
2013-09-06 07:19:32 +04:00
|
|
|
int rc;
|
2013-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
bseg = &seg->rs_base;
|
|
|
|
|
|
|
|
/* Find out who sent this segment */
|
|
|
|
endpoint = lookup_sender(module, bseg);
|
|
|
|
seg->rs_endpoint = endpoint;
|
|
|
|
|
|
|
|
if (endpoint != NULL && !endpoint->endpoint_exiting &&
|
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_PAYLOAD_TYPE_FRAG ==
|
2013-09-06 07:18:57 +04:00
|
|
|
bseg->us_btl_header->payload_type) &&
|
|
|
|
seg->rs_base.us_btl_header->put_addr == NULL) {
|
|
|
|
|
2014-02-26 11:47:05 +04:00
|
|
|
MSGDEBUG1_OUT("<-- Received FRAG (fastpath) ep %p, seq %" UDSEQ ", len=%" PRIu16 "\n",
|
|
|
|
(void*) endpoint, bseg->us_btl_header->pkt_seq,
|
|
|
|
bseg->us_btl_header->payload_len);
|
|
|
|
|
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-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-09-06 07:18:57 +04:00
|
|
|
|
|
|
|
/* 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
|
|
|
reg = mca_btl_base_active_message_trigger + bseg->us_btl_header->tag;
|
2013-09-06 07:18:57 +04:00
|
|
|
seg->rs_segment.seg_len = bseg->us_btl_header->payload_len;
|
2013-09-17 11:20:44 +04:00
|
|
|
reg->cbfunc(&module->super, bseg->us_btl_header->tag,
|
2013-09-06 07:18:57 +04:00
|
|
|
&seg->rs_desc, reg->cbdata);
|
|
|
|
|
|
|
|
} else {
|
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_recv_call(module, seg, channel, l2_bytes_rcvd);
|
2013-09-06 07:18:57 +04:00
|
|
|
}
|
|
|
|
}
|
2013-07-20 02:13:58 +04:00
|
|
|
|
|
|
|
#endif /* BTL_USNIC_RECV_H */
|