[MOAB-dev] r4168 - MOAB/trunk/src/io
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Mon Sep 27 15:42:26 CDT 2010
Author: kraftche
Date: 2010-09-27 15:42:26 -0500 (Mon, 27 Sep 2010)
New Revision: 4168
Added:
MOAB/trunk/src/io/ReadHDF5VarLen.cpp
MOAB/trunk/src/io/ReadHDF5VarLen.hpp
Modified:
MOAB/trunk/src/io/Makefile.am
MOAB/trunk/src/io/ReadHDF5.cpp
MOAB/trunk/src/io/ReadHDF5.hpp
MOAB/trunk/src/io/ReadHDF5Dataset.cpp
MOAB/trunk/src/io/ReadHDF5Dataset.hpp
Log:
Another refactoring of the HDF5 reader in an attempt to get parallel reading
of .h5m files to a usable state.
o Use collective IO for almost all IO - often requires MPI_Allreduce calls
to determine the number of reads each process needs to do for a given
data set.
o Use hyperslab selection with an upper bound on the number of selected
chunks to avoid problems with superlinear hyperslab selection. Do
additional reads as required.
o Always read data in the format it was written to the file and call
H5Tconvert explicitly after each H5Dread call to workaround issues
with implicit conversion and collective IO in the HDF5 library.
Modified: MOAB/trunk/src/io/Makefile.am
===================================================================
--- MOAB/trunk/src/io/Makefile.am 2010-09-27 20:35:38 UTC (rev 4167)
+++ MOAB/trunk/src/io/Makefile.am 2010-09-27 20:42:26 UTC (rev 4168)
@@ -27,6 +27,8 @@
ReadHDF5.hpp \
ReadHDF5Dataset.hpp \
ReadHDF5Dataset.cpp \
+ ReadHDF5VarLen.hpp \
+ ReadHDF5VarLen.cpp \
WriteHDF5.cpp \
WriteHDF5.hpp
AM_CPPFLAGS += -I$(srcdir)/mhdf/include
Modified: MOAB/trunk/src/io/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5.cpp 2010-09-27 20:35:38 UTC (rev 4167)
+++ MOAB/trunk/src/io/ReadHDF5.cpp 2010-09-27 20:42:26 UTC (rev 4168)
@@ -32,6 +32,7 @@
#endif
#include <H5Tpublic.h>
#include <H5Ppublic.h>
+#include <H5Epublic.h>
#include "moab/Interface.hpp"
#include "Internals.hpp"
#include "MBTagConventions.hpp"
@@ -51,6 +52,7 @@
#include "IODebugTrack.hpp"
#include "ReadHDF5Dataset.hpp"
+#include "ReadHDF5VarLen.hpp"
namespace moab {
@@ -67,6 +69,29 @@
static inline ErrorCode error( ErrorCode rval )
{ return rval; }
+// Call \c error function during HDF5 library errors to make
+// it easier to trap such errors in the debugger. This function
+// gets registered with the HDF5 library as a callback. It
+// works the same as the default (H5Eprint), except that it
+// also calls the \c error fuction as a no-op.
+#if defined(H5E_auto_t_vers) && H5E_auto_t_vers > 1
+herr_t handle_hdf5_error( hid_t stack, void* data )
+{
+ ReadHDF5::HDF5ErrorHandler* h = reinterpret_cast<ReadHDF5::HDF5ErrorHandler*>(data);
+ herr_t result = (*h->func)(stack,h->data);
+ error(MB_FAILURE);
+ return result;
+}
More information about the moab-dev
mailing list