[MOAB-dev] r2021 - in MOAB/trunk: . mhdf/src

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Wed Jul 16 10:03:41 CDT 2008


Author: kraftche
Date: 2008-07-16 10:03:41 -0500 (Wed, 16 Jul 2008)
New Revision: 2021

Modified:
   MOAB/trunk/ReadHDF5.cpp
   MOAB/trunk/WriteHDF5.cpp
   MOAB/trunk/configure.in
   MOAB/trunk/mhdf/src/tags.c
   MOAB/trunk/mhdf/src/util.c
Log:

o put -DVALGRIND in CPPFLAGS rather than CXXFLAGS so it is used for C code.

o fix false positives in valgrind check due to uninitalized table width
  value for single-column tables.

o fix bug writing bit tags detected with valgrind



Modified: MOAB/trunk/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/ReadHDF5.cpp	2008-07-16 14:23:16 UTC (rev 2020)
+++ MOAB/trunk/ReadHDF5.cpp	2008-07-16 15:03:41 UTC (rev 2021)
@@ -1254,11 +1254,11 @@
     
     case mhdf_BOOLEAN:
       
-      elem_size = sizeof(char);
+      elem_size = sizeof(int);
       array_size = tag_size;
-      hdf_type = H5T_NATIVE_UCHAR;
+      hdf_type = H5T_NATIVE_UINT;
       tag_size = elem_size * array_size;
-      mb_type = MB_TYPE_BIT;
+      mb_type = MB_TYPE_INTEGER;
       break;
     
     case mhdf_ENTITY_ID:

Modified: MOAB/trunk/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/WriteHDF5.cpp	2008-07-16 14:23:16 UTC (rev 2020)
+++ MOAB/trunk/WriteHDF5.cpp	2008-07-16 15:03:41 UTC (rev 2021)
@@ -2334,7 +2334,7 @@
     break;
   case MB_TYPE_BIT:
     elem_size = sizeof(bool);
-    file_type = mhdf_BOOLEAN;
+    file_type = mhdf_BITFIELD;
     break;
   case MB_TYPE_HANDLE:
     elem_size = sizeof(MBEntityHandle);

Modified: MOAB/trunk/configure.in
===================================================================
--- MOAB/trunk/configure.in	2008-07-16 14:23:16 UTC (rev 2020)
+++ MOAB/trunk/configure.in	2008-07-16 15:03:41 UTC (rev 2021)
@@ -99,7 +99,7 @@
 ################################################################################
 AC_CHECK_HEADER([ieeefp.h],[DEFINES="$DEFINES -DHAVE_IEEEFP_H"] )
 if test "xyes" = "x$enable_debug"; then
-  AC_CHECK_HEADER( [valgrind/memcheck.h], [CXXFLAGS="$CXXFLAGS -DVALGRIND"] )
+  AC_CHECK_HEADER( [valgrind/memcheck.h], [CPPFLAGS="$CPPFLAGS -DVALGRIND"] )
 fi
 
 ################################################################################

Modified: MOAB/trunk/mhdf/src/tags.c
===================================================================
--- MOAB/trunk/mhdf/src/tags.c	2008-07-16 14:23:16 UTC (rev 2020)
+++ MOAB/trunk/mhdf/src/tags.c	2008-07-16 15:03:41 UTC (rev 2021)
@@ -385,7 +385,7 @@
         break;
       
       case mhdf_BOOLEAN:
-        arr_len = abs(size);
+        arr_len = abs(size)/8;
         hdf_type = H5Tcopy( H5T_NATIVE_UCHAR );
         break;
       

Modified: MOAB/trunk/mhdf/src/util.c
===================================================================
--- MOAB/trunk/mhdf/src/util.c	2008-07-16 14:23:16 UTC (rev 2020)
+++ MOAB/trunk/mhdf/src/util.c	2008-07-16 15:03:41 UTC (rev 2021)
@@ -295,7 +295,7 @@
                 mhdf_Status* status )
 {
   hid_t slab_id, mem_id;
-  hsize_t offsets[2], counts[2];
+  hsize_t offsets[2], counts[2] = {1,1};
   herr_t rval;
   int dims;
   




More information about the moab-dev mailing list