[MOAB-dev] r3858 - in MOAB/trunk/src: io parallel
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Thu May 6 18:08:34 CDT 2010
Author: kraftche
Date: 2010-05-06 18:08:34 -0500 (Thu, 06 May 2010)
New Revision: 3858
Modified:
MOAB/trunk/src/io/WriteHDF5.cpp
MOAB/trunk/src/io/WriteHDF5.hpp
MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
MOAB/trunk/src/parallel/WriteHDF5Parallel.hpp
Log:
HDF5 writer bug fix and debug improvements
o Don't create set contents table larger than necessary
o Send all debug output through new DebugOutput utility
o Instrument code with IODebugTrack
o Add options to enable deboug output and use of IODebugTrack
Modified: MOAB/trunk/src/io/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/WriteHDF5.cpp 2010-05-06 23:06:29 UTC (rev 3857)
+++ MOAB/trunk/src/io/WriteHDF5.cpp 2010-05-06 23:08:34 UTC (rev 3858)
@@ -55,6 +55,7 @@
#include "moab/WriteUtilIface.hpp"
#include "FileOptions.hpp"
#include "moab/Version.h"
+#include "IODebugTrack.hpp"
#include "mhdf.h"
/* Access HDF5 file handle for debugging
#include <H5Fpublic.h>
@@ -63,13 +64,6 @@
#undef DEBUG
#ifdef DEBUG
-# define DEBUGOUT(A) fputs( A, stderr )
-# include <stdio.h>
-#else
-# define DEBUGOUT(A)
-#endif
-
-#ifdef DEBUG
/*
# include <H5Epublic.h>
extern "C" herr_t hdf_error_handler( void* )
@@ -250,14 +244,12 @@
Range::const_pair_iterator pi;
for (pi = entities.const_pair_begin(); pi != entities.const_pair_end(); ++pi) {
const EntityHandle n = pi->second - pi->first + 1;
-#ifdef DEBUG
- printf( "Assigning %s %lu to %lu to file IDs [%lu,%lu]\n",
+ dbgOut.printf( 3, "Assigning %s %lu to %lu to file IDs [%lu,%lu]\n",
CN::EntityTypeName(TYPE_FROM_HANDLE(pi->first)),
(unsigned long)(ID_FROM_HANDLE(pi->first)),
(unsigned long)(ID_FROM_HANDLE(pi->first)+n-1),
(unsigned long)id,
(unsigned long)(id+n-1));
-#endif
if (!idMap.insert( pi->first, id, n ).second)
return MB_FAILURE;
id += n;
@@ -299,7 +291,8 @@
writeSetContents(false),
writeSetChildren(false),
writeSetParents(false),
- writeProp( H5P_DEFAULT )
+ writeProp( H5P_DEFAULT ),
+ dbgOut("H5M ", stderr)
{
}
More information about the moab-dev
mailing list