From 95988d83e5effab4512b29c1259308b5092dcea1 Mon Sep 17 00:00:00 2001
From: Pedro Gonnet <gonnet@google.com>
Date: Wed, 17 Jun 2015 21:22:46 +0200
Subject: [PATCH] fix call to mpi_bcast to use the correct index type.

Former-commit-id: b4fbc7573bf94eb2452e0881cf6c4e31ac66bde1
---
 src/engine.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/engine.c b/src/engine.c
index 83f0b8bc95..9f7e4445de 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -541,8 +541,13 @@ void engine_repartition ( struct engine *e ) {
         }
         
     /* Broadcast the result of the partition. */
+#if IDXTYPEWIDTH==32
     if ( MPI_Bcast( nodeIDs , nr_cells , MPI_INT , 0 , MPI_COMM_WORLD ) != MPI_SUCCESS )
         error( "Failed to bcast the node IDs." );
+#else
+    if ( MPI_Bcast( nodeIDs , nr_cells , MPI_LONG_LONG_INT , 0 , MPI_COMM_WORLD ) != MPI_SUCCESS )
+        error( "Failed to bcast the node IDs." );
+#endif
         
     /* Set the cell nodeIDs and clear any non-local parts. */
     for ( k = 0 ; k < nr_cells ; k++ ) {
-- 
GitLab