From 19ddefba986912ac5c2444f8afef5ad9dd6d96b0 Mon Sep 17 00:00:00 2001 From: Shane Snyder Date: Mon, 6 Nov 2023 14:30:16 -0600 Subject: [PATCH] fix compile bugs related to apmpi coll_sync mode Darshan MAP_OR_FAIL macro internally defines a temporary variable, so using this macro twice in one function will lead to "multiple definition" compilation errors. To workaround, I added a secondary MAP_OR_FAIL_BARRIER macro that avoids redefining the variable but otherwise works the same. --- apmpi/lib/darshan-apmpi.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/apmpi/lib/darshan-apmpi.c b/apmpi/lib/darshan-apmpi.c index 3042548..36e054e 100644 --- a/apmpi/lib/darshan-apmpi.c +++ b/apmpi/lib/darshan-apmpi.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "uthash.h" @@ -24,12 +25,28 @@ typedef long long ap_bytes_t; #define MIN(x,y) ((x==0.0)?y:((x