From fb5d4ea736282dce14c3284bc5db748b082db957 Mon Sep 17 00:00:00 2001
From: Sam Yates <halfflat@gmail.com>
Date: Tue, 25 Feb 2020 18:00:10 +0100
Subject: [PATCH] Permit size_t to be unsigned int for MPI. (#976)

* Amend `size_t` type check in `mpi.hpp` to support 32-bit builds.
---
 arbor/communication/mpi.hpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arbor/communication/mpi.hpp b/arbor/communication/mpi.hpp
index 8d7ec782..1f23b24a 100644
--- a/arbor/communication/mpi.hpp
+++ b/arbor/communication/mpi.hpp
@@ -58,9 +58,10 @@ MAKE_TRAITS(unsigned long,      MPI_UNSIGNED_LONG)
 MAKE_TRAITS(long long,          MPI_LONG_LONG)
 MAKE_TRAITS(unsigned long long, MPI_UNSIGNED_LONG_LONG)
 
-static_assert(std::is_same<std::size_t, unsigned long>::value ||
+static_assert(std::is_same<std::size_t, unsigned>::value ||
+              std::is_same<std::size_t, unsigned long>::value ||
               std::is_same<std::size_t, unsigned long long>::value,
-              "size_t is not the same as unsigned long or unsigned long long");
+              "size_t is not the same as any MPI unsigned type");
 
 // Gather individual values of type T from each rank into a std::vector on
 // the root rank.
-- 
GitLab