Skip to content

Commit c097e6a

Browse files
authored
Merge pull request #5832 from jsquyres/pr/v3.0.x/2-more-vader-fixes
v3.0.x: 2 more vader fixes
2 parents b5f1e64 + c59d58a commit c097e6a

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

opal/mca/btl/vader/btl_vader_fbox.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ static inline void mca_btl_vader_fbox_set_header (mca_btl_vader_fbox_hdr_t *hdr,
5656
hdr->data.tag = tag;
5757
}
5858

59+
static inline mca_btl_vader_fbox_hdr_t mca_btl_vader_fbox_read_header (mca_btl_vader_fbox_hdr_t *hdr)
60+
{
61+
mca_btl_vader_fbox_hdr_t tmp;
62+
uint16_t tag = hdr->data.tag;
63+
opal_atomic_rmb ();
64+
tmp.ival = hdr->ival;
65+
tmp.data.tag = tag;
66+
return tmp;
67+
}
68+
5969
/* attempt to reserve a contiguous segment from the remote ep */
6070
static inline bool mca_btl_vader_fbox_sendi (mca_btl_base_endpoint_t *ep, unsigned char tag,
6171
void * restrict header, const size_t header_size,
@@ -175,7 +185,7 @@ static inline bool mca_btl_vader_check_fboxes (void)
175185
int poll_count;
176186

177187
for (poll_count = 0 ; poll_count <= MCA_BTL_VADER_POLL_COUNT ; ++poll_count) {
178-
const mca_btl_vader_fbox_hdr_t hdr = {.ival = MCA_BTL_VADER_FBOX_HDR(ep->fbox_in.buffer + start)->ival};
188+
const mca_btl_vader_fbox_hdr_t hdr = mca_btl_vader_fbox_read_header (MCA_BTL_VADER_FBOX_HDR(ep->fbox_in.buffer + start));
179189

180190
/* check for a valid tag a sequence number */
181191
if (0 == hdr.data.tag || hdr.data.seq != ep->fbox_in.seq) {

opal/mca/btl/vader/btl_vader_fifo.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2006-2007 Voltaire. All rights reserved.
1414
* Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
15-
* Copyright (c) 2010-2014 Los Alamos National Security, LLC.
15+
* Copyright (c) 2010-2018 Los Alamos National Security, LLC.
1616
* All rights reserved.
1717
* $COPYRIGHT$
1818
*
@@ -155,7 +155,11 @@ static inline mca_btl_vader_hdr_t *vader_fifo_read (vader_fifo_t *fifo, struct m
155155

156156
static inline void vader_fifo_init (vader_fifo_t *fifo)
157157
{
158-
fifo->fifo_head = fifo->fifo_tail = VADER_FIFO_FREE;
158+
/* due to a compiler bug in Oracle C 5.15 the following line was broken into two. Not
159+
* ideal but oh well. See #5814 */
160+
/* fifo->fifo_head = fifo->fifo_tail = VADER_FIFO_FREE; */
161+
fifo->fifo_head = VADER_FIFO_FREE;
162+
fifo->fifo_tail = VADER_FIFO_FREE;
159163
fifo->fbox_available = mca_btl_vader_component.fbox_max;
160164
mca_btl_vader_component.my_fifo = fifo;
161165
}

0 commit comments

Comments
 (0)