[MOAB-dev] r3935 - in MOAB/trunk: src/io src/io/mhdf/include src/io/mhdf/src src/parallel test/parallel

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu May 20 17:36:00 CDT 2010


Author: kraftche
Date: 2010-05-20 17:36:00 -0500 (Thu, 20 May 2010)
New Revision: 3935

Modified:
   MOAB/trunk/src/io/ReadHDF5.cpp
   MOAB/trunk/src/io/WriteHDF5.cpp
   MOAB/trunk/src/io/WriteHDF5.hpp
   MOAB/trunk/src/io/mhdf/include/mhdf.h
   MOAB/trunk/src/io/mhdf/src/tags.c
   MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
   MOAB/trunk/test/parallel/mhdf_parallel.c
Log:
Implement writing of dense-formatted tag data in both serial and parallel.

New functionality is locked behind writer option "DENSE_TAGS" because I'm
not entirely comfortable with making this kind of change to the file format
right before a release.


Modified: MOAB/trunk/src/io/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5.cpp	2010-05-20 22:34:19 UTC (rev 3934)
+++ MOAB/trunk/src/io/ReadHDF5.cpp	2010-05-20 22:36:00 UTC (rev 3935)
@@ -999,7 +999,7 @@
       // Get a block of tag values
     size_t count = std::min( chunk_size, remaining );
     assert_range( buffer, count );
-    mhdf_readDenseTagWithOpt( tag_table, offset, count, H5T_NATIVE_UINT, buffer, collIO, &status );
+    mhdf_readTagValuesWithOpt( tag_table, offset, count, H5T_NATIVE_UINT, buffer, collIO, &status );
     if (is_error(status))
       return error(MB_FAILURE);
     
@@ -1574,14 +1574,15 @@
     // get Range of all explicitly specified elements, grouped by dimension
   Range explicit_elems[4];
   Range::iterator hints[4] = { explicit_elems[0].begin(),
-                                 explicit_elems[1].begin(),
-                                 explicit_elems[2].begin(),
-                                 explicit_elems[3].begin() };
+                               explicit_elems[1].begin(),
+                               explicit_elems[2].begin(),
+                               explicit_elems[3].begin() };
   RangeMap<long, EntityHandle>::iterator rit;
   while (!elem_ids.empty()) {
     long start = elem_ids.front();
     long count = elem_ids.const_pair_begin()->second - start + 1;
     rit = idMap.lower_bound( start );
+    assert( rit != idMap.end() );
     assert( rit->begin <= start && rit->begin + rit->count > start );
     long offset = start - rit->begin;
     long avail = rit->count - offset;
@@ -3109,7 +3110,7 @@
     file_ids.erase( file_ids.begin(), file_ids.begin() + count );
     
     assert_range( dataBuffer, count );
-    mhdf_readDenseTagWithOpt( data, first - start_id, count, hdf_read_type, 
+    mhdf_readTagValuesWithOpt( data, first - start_id, count, hdf_read_type, 
                               dataBuffer, indepIO, &status );
     if (is_error(status))
       return error(MB_FAILURE);
@@ -3259,9 +3260,9 @@
       assert(j >= i);
       dbgOut.printf(3,"Reading block %d values ([%ld,%ld])\n",blkcount,offset+i,offset+j-1);
       assert(hdf_read_type > 0);
-      mhdf_readSparseTagValuesWithOpt( value_table, offset + i, j - i,
-                                       hdf_read_type, databuf + i*read_size, 
-                                       indepIO, &status );
+      mhdf_readTagValuesWithOpt( value_table, offset + i, j - i,
+                                 hdf_read_type, databuf + i*read_size, 
+                                 indepIO, &status );


More information about the moab-dev mailing list