From e7ccbdee2727439fd2c5e1b4b00bef0f5b30eb1a Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 3 May 2016 10:09:23 -0600 Subject: [PATCH] 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 --- opal/mca/btl/vader/btl_vader_endpoint.h | 4 ++-- opal/mca/btl/vader/btl_vader_fbox.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opal/mca/btl/vader/btl_vader_endpoint.h b/opal/mca/btl/vader/btl_vader_endpoint.h index 9a90feb2c6..3de9d6e477 100644 --- a/opal/mca/btl/vader/btl_vader_endpoint.h +++ b/opal/mca/btl/vader/btl_vader_endpoint.h @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2007 Voltaire. All rights reserved. - * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights + * Copyright (c) 2012-2016 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ * @@ -63,7 +63,7 @@ typedef struct mca_btl_base_endpoint_t { int32_t peer_smp_rank; /**< my peer's SMP process rank. Used for accessing * SMP specfic data structures. */ - volatile uint64_t send_count; /**< number of fragments sent to this peer */ + volatile size_t send_count; /**< number of fragments sent to this peer */ char *segment_base; /**< start of the peer's segment (in the address space * of this process) */ diff --git a/opal/mca/btl/vader/btl_vader_fbox.h b/opal/mca/btl/vader/btl_vader_fbox.h index dfef75bb38..6f09cb6c51 100644 --- a/opal/mca/btl/vader/btl_vader_fbox.h +++ b/opal/mca/btl/vader/btl_vader_fbox.h @@ -261,7 +261,7 @@ static inline bool mca_btl_vader_check_fboxes (void) static inline void mca_btl_vader_try_fbox_setup (mca_btl_base_endpoint_t *ep, mca_btl_vader_hdr_t *hdr) { - if (OPAL_UNLIKELY(NULL == ep->fbox_out.buffer && mca_btl_vader_component.fbox_threshold == OPAL_THREAD_ADD64 ((volatile int64_t *) &ep->send_count, 1))) { + if (OPAL_UNLIKELY(NULL == ep->fbox_out.buffer && mca_btl_vader_component.fbox_threshold == OPAL_THREAD_ADD_SIZE_T (&ep->send_count, 1))) { /* protect access to mca_btl_vader_component.segment_offset */ OPAL_THREAD_LOCK(&mca_btl_vader_component.lock);