From 6c9d094755bdf96ab1c8fe28c5be86f5c7bfa58c Mon Sep 17 00:00:00 2001
From: James Willis <james.s.willis@durham.ac.uk>
Date: Wed, 27 Jan 2016 16:09:46 +0000
Subject: [PATCH] Changed the cell_max_tag to 2^29 to prevent MPI tag
 collisions.

---
 src/cell.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/cell.h b/src/cell.h
index d5d8b5db8b..96be24688a 100644
--- a/src/cell.h
+++ b/src/cell.h
@@ -29,7 +29,12 @@ struct space;
 
 /* Some constants. */
 #define cell_sid_dt 13
-#define cell_max_tag (1 << 16)
+
+/* Max tag size set to 2^29 to take into account some MPI implementations 
+ * that use 2^31 as the upper bound on MPI tags and the fact that 
+ * cell_next_tag is multiplied by 2 when passed to an MPI function. 
+ * The maximum was lowered by a further factor of 2 to be on the safe side.*/
+#define cell_max_tag (1 << 29)
 
 /* Global variables. */
 extern int cell_next_tag;
-- 
GitLab