[MOAB-dev] r1989 - MOAB/trunk/parallel

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Mon Jul 7 17:38:59 CDT 2008


Author: kraftche
Date: 2008-07-07 17:38:59 -0500 (Mon, 07 Jul 2008)
New Revision: 1989

Modified:
   MOAB/trunk/parallel/WriteHDF5Parallel.cpp
Log:
bug fix

Modified: MOAB/trunk/parallel/WriteHDF5Parallel.cpp
===================================================================
--- MOAB/trunk/parallel/WriteHDF5Parallel.cpp	2008-07-07 22:03:19 UTC (rev 1988)
+++ MOAB/trunk/parallel/WriteHDF5Parallel.cpp	2008-07-07 22:38:59 UTC (rev 1989)
@@ -1,5 +1,5 @@
 
-#undef DEBUG
+#define DEBUG
 
 #ifdef DEBUG
 #  include <stdio.h>
@@ -323,18 +323,14 @@
   
     // For the 'remoteMesh' list for this processor, just remove
     // entities we aren't writing.
-  MBRange& my_remote_mesh = remoteMesh[myPcomm->proc_config().proc_rank()];
-  tmpset = my_remote_mesh.subtract( nodeSet.range );
-  if (!tmpset.empty())
-    my_remote_mesh = my_remote_mesh.subtract( tmpset );
+  tmpset.clear();
+  tmpset.merge( nodeSet.range );
   for (std::list<ExportSet>::iterator eiter = exportList.begin();
-       eiter != exportList.end(); ++eiter ) {
-    tmpset = my_remote_mesh.subtract( eiter->range );
-    if (!tmpset.empty())
-      my_remote_mesh = my_remote_mesh.subtract( tmpset );
-  }
+       eiter != exportList.end(); ++eiter ) 
+    tmpset.merge( eiter->range );
+  MBRange& my_remote_mesh = remoteMesh[myPcomm->proc_config().proc_rank()];
+  my_remote_mesh = my_remote_mesh.intersect( tmpset );
   
-  
     // print some debug output summarizing what we've accomplished
   printdebug("Remote mesh:\n");
   for (unsigned int ii = 0; ii < myPcomm->proc_config().proc_size(); ++ii)
@@ -1921,6 +1917,9 @@
       return MB_FAILURE;
     }
   }
+
+printdebug( "Interface entities:\n" );
+printrange( remoteMesh[myPcomm->proc_config().proc_rank()] );
   
     // store file IDs in tag
   rval = iFace->tag_set_data( file_id_tag, imesh, &file_id_vect[0] );




More information about the moab-dev mailing list