[MOAB-dev] r5959 - MOAB/trunk/src/parallel

milad at mcs.anl.gov milad at mcs.anl.gov
Mon Jan 28 14:35:50 CST 2013


Author: milad
Date: 2013-01-28 14:35:50 -0600 (Mon, 28 Jan 2013)
New Revision: 5959

Modified:
   MOAB/trunk/src/parallel/ParallelComm.cpp
Log:
Fixed bug in unpack_tags. When reduce_void was called, the length of
the tag was not taken into account (Thanks to Iulian for helping!)



Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2013-01-27 01:00:41 UTC (rev 5958)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2013-01-28 20:35:50 UTC (rev 5959)
@@ -3442,9 +3442,12 @@
               // get existing values of dst tag
             dum_vals.resize(tag_size*num_ents);
             if (mpi_op) {
+              int tag_length;
+              result = mbImpl->tag_get_length(tag_handle, tag_length);
+              RRA("Couldn't get tag length");	      
               result = mbImpl->tag_get_data(tag_handle, &dum_ents[0], num_ents, &dum_vals[0]);
               RRA("Couldn't get existing value of dst tag on entities.");
-              result = reduce_void(tag_data_type, *mpi_op, num_ents, &dum_vals[0], buff_ptr);
+              result = reduce_void(tag_data_type, *mpi_op, tag_length*num_ents, &dum_vals[0], buff_ptr);
               RRA("Failed to perform mpi op on dst tags.");
             }
           result = mbImpl->tag_set_data(tag_handle, &dum_ents[0],



More information about the moab-dev mailing list