Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branches 'master' and 'master' of github.com:simgrid/simgrid
[simgrid.git] / src / smpi / colls / bcast / bcast-scatter-rdb-allgather.cpp
index f4a7d4b..775b82e 100644 (file)
@@ -1,4 +1,11 @@
+/* Copyright (c) 2011-2017. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #include "../colls_private.h"
+#include "src/smpi/smpi_status.hpp"
+
 namespace simgrid{
 namespace smpi{
 
@@ -317,15 +324,13 @@ Coll_bcast_scatter_rdb_allgather::bcast (
       xbt_die("we didn't receive enough !");
     }
 
-    if (!is_contig || !is_homogeneous)
-    {
-        if (rank != root)
-        {
-            position = 0;
-            mpi_errno = MPI_Unpack(tmp_buf, nbytes, &position, buffer,
-                                         count, datatype, comm);
-            if (mpi_errno) xbt_die("error when unpacking %d", mpi_errno);
-        }
+    if (not is_contig || not is_homogeneous) {
+      if (rank != root) {
+        position  = 0;
+        mpi_errno = MPI_Unpack(tmp_buf, nbytes, &position, buffer, count, datatype, comm);
+        if (mpi_errno)
+          xbt_die("error when unpacking %d", mpi_errno);
+      }
     }
 
 fn_exit: