[MOAB-dev] r4178 - in MOAB/trunk: src/io tools
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Tue Sep 28 14:25:39 CDT 2010
Author: kraftche
Date: 2010-09-28 14:25:39 -0500 (Tue, 28 Sep 2010)
New Revision: 4178
Modified:
MOAB/trunk/src/io/ReadHDF5.cpp
MOAB/trunk/src/io/ReadHDF5Dataset.cpp
MOAB/trunk/src/io/ReadHDF5Dataset.hpp
MOAB/trunk/tools/parread.cpp
Log:
o tune a couple of parameters for the HDF5 reader
o make hyperslab selection limit runtime selectable to facilitate tuning
Modified: MOAB/trunk/src/io/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5.cpp 2010-09-28 15:54:29 UTC (rev 4177)
+++ MOAB/trunk/src/io/ReadHDF5.cpp 2010-09-28 19:25:39 UTC (rev 4178)
@@ -56,7 +56,7 @@
namespace moab {
-#define BLOCKED_COORD_IO
+#undef BLOCKED_COORD_IO
#define READ_HDF5_BUFFER_SIZE (40*1024*1024)
@@ -259,6 +259,12 @@
return error(MB_INVALID_SIZE);
}
+ ReadHDF5Dataset::default_hyperslab_selection_limit();
+ int hslimit;
+ rval = opts.get_int_option( "HYPERSLAB_SELECT_LIMIT", hslimit );
+ if (MB_SUCCESS == rval && hslimit > 0)
+ ReadHDF5Dataset::set_hyperslab_selection_limit( hslimit );
+
dataBuffer = (char*)malloc( bufferSize );
if (!dataBuffer)
return error(MB_MEMORY_ALLOCATION_FAILED);
Modified: MOAB/trunk/src/io/ReadHDF5Dataset.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5Dataset.cpp 2010-09-28 15:54:29 UTC (rev 4177)
+++ MOAB/trunk/src/io/ReadHDF5Dataset.cpp 2010-09-28 19:25:39 UTC (rev 4178)
@@ -27,7 +27,10 @@
// Selection of hyperslabs appears to be superlinear. Don't try to select
// more than a few thousand at a time or things start to get real slow.
-const size_t HYPERSLAB_SELECTION_LIMIT = 3000;
+const size_t DEFAULT_HYPERSLAB_SELECTION_LIMIT = 1000;
+size_t ReadHDF5Dataset::hyperslabSelectionLimit = DEFAULT_HYPERSLAB_SELECTION_LIMIT;
+void ReadHDF5Dataset::default_hyperslab_selection_limit()
+ { hyperslabSelectionLimit = DEFAULT_HYPERSLAB_SELECTION_LIMIT; }
static std::pair<int,int> allocate_mpe_state( const char* name, const char* color )
{
@@ -124,7 +127,7 @@
Range::const_iterator ReadHDF5Dataset::next_end( Range::const_iterator iter )
{
- size_t slabs_remaining = HYPERSLAB_SELECTION_LIMIT;
+ size_t slabs_remaining = hyperslabSelectionLimit;
size_t avail = bufferSize;
while (iter != rangeEnd && slabs_remaining) {
More information about the moab-dev
mailing list