From 5cd8c68b2f0c8ff7ef421ed37029c72f43a525c8 Mon Sep 17 00:00:00 2001 From: Paul Bauer Date: Tue, 12 May 2020 08:13:13 +0000 Subject: [PATCH] Fix archive build Change-Id: I27361fa3f9218bbb38ac739b758d63a9774737ea --- src/gromacs/listed_forces/disre.cpp | 2 ++ src/gromacs/nbnxm/atomdata.cpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gromacs/listed_forces/disre.cpp b/src/gromacs/listed_forces/disre.cpp index 1d66f2ba52..5025cc010b 100644 --- a/src/gromacs/listed_forces/disre.cpp +++ b/src/gromacs/listed_forces/disre.cpp @@ -259,6 +259,8 @@ void init_disres(FILE* fplog, } fprintf(fplog, "\n"); } +#else + GMX_UNUSED_VALUE(communicator); #endif } else diff --git a/src/gromacs/nbnxm/atomdata.cpp b/src/gromacs/nbnxm/atomdata.cpp index 77f6c149aa..a64fe1a381 100644 --- a/src/gromacs/nbnxm/atomdata.cpp +++ b/src/gromacs/nbnxm/atomdata.cpp @@ -1264,8 +1264,9 @@ static void nbnxn_atomdata_add_nbat_f_to_f_treereduce(nbnxn_atomdata_t* nbat, in /* wait on partner thread - replaces full barrier */ int sync_th, sync_group_size; -# if defined(__clang__) +# if defined(__clang__) && __clang_major__ >= 8 // Suppress warnings that the use of memory_barrier may be excessive + // Only exists beginning with clang-8 # pragma clang diagnostic push # pragma clang diagnostic ignored "-Watomic-implicit-seq-cst" # endif @@ -1290,7 +1291,7 @@ static void nbnxn_atomdata_add_nbat_f_to_f_treereduce(nbnxn_atomdata_t* nbat, in /* guarantee that no later load happens before wait loop is finisehd */ tMPI_Atomic_memory_barrier(); } -# if defined(__clang__) +# if defined(__clang__) && __clang_major__ >= 8 # pragma clang diagnostic pop # endif #else /* TMPI_ATOMICS */ -- 2.11.4.GIT