Skip to content

Commit e7ccbde

Browse files
committed
btl/vader: fix compilation on 32-bit systems
This commit fixes a compile/link issue caused by vader. The vader btl was using OPAL_THREAD_ADD64 to increment a counter which may not be available on 32-bit systems. Changed to use OPAL_THREAD_ADD_SIZE_T which will be 64-bit or 32-bit depending on the system. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent f3e3b80 commit e7ccbde

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

opal/mca/btl/vader/btl_vader_endpoint.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2006-2007 Voltaire. All rights reserved.
14-
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
14+
* Copyright (c) 2012-2016 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* $COPYRIGHT$
1717
*
@@ -63,7 +63,7 @@ typedef struct mca_btl_base_endpoint_t {
6363

6464
int32_t peer_smp_rank; /**< my peer's SMP process rank. Used for accessing
6565
* SMP specfic data structures. */
66-
volatile uint64_t send_count; /**< number of fragments sent to this peer */
66+
volatile size_t send_count; /**< number of fragments sent to this peer */
6767
char *segment_base; /**< start of the peer's segment (in the address space
6868
* of this process) */
6969

opal/mca/btl/vader/btl_vader_fbox.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ static inline bool mca_btl_vader_check_fboxes (void)
261261

262262
static inline void mca_btl_vader_try_fbox_setup (mca_btl_base_endpoint_t *ep, mca_btl_vader_hdr_t *hdr)
263263
{
264-
if (OPAL_UNLIKELY(NULL == ep->fbox_out.buffer && mca_btl_vader_component.fbox_threshold == OPAL_THREAD_ADD64 ((volatile int64_t *) &ep->send_count, 1))) {
264+
if (OPAL_UNLIKELY(NULL == ep->fbox_out.buffer && mca_btl_vader_component.fbox_threshold == OPAL_THREAD_ADD_SIZE_T (&ep->send_count, 1))) {
265265
/* protect access to mca_btl_vader_component.segment_offset */
266266
OPAL_THREAD_LOCK(&mca_btl_vader_component.lock);
267267

0 commit comments

Comments
 (0)