[MOAB-dev] r5204 - MOAB/trunk/src/io

tautges at mcs.anl.gov tautges at mcs.anl.gov
Sun Nov 6 18:51:10 CST 2011


Author: tautges
Date: 2011-11-06 18:51:08 -0600 (Sun, 06 Nov 2011)
New Revision: 5204

Modified:
   MOAB/trunk/src/io/ReadHDF5.cpp
Log:
Add option for setting cb_buffer_size.



Modified: MOAB/trunk/src/io/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5.cpp	2011-11-02 21:36:02 UTC (rev 5203)
+++ MOAB/trunk/src/io/ReadHDF5.cpp	2011-11-07 00:51:08 UTC (rev 5204)
@@ -329,6 +329,14 @@
     readUtil->report_error( "'USE_MPIO' option specified w/out 'PARALLEL' option" );
     return MB_NOT_IMPLEMENTED;
   }
+
+  MPI_Info info = MPI_INFO_NULL;
+  std::string cb_size;
+  rval = opts.get_str_option("CB_BUFFER_SIZE", cb_size);
+  if (MB_SUCCESS == rval) {
+    MPI_Info_create (&info);
+    MPI_Info_set (info, "cb_buffer_size", const_cast<char*>(cb_size.c_str()));
+  }
   
   // This option is intended for testing purposes only, and thus
   // is not documented anywhere.  Decreasing the buffer size can
@@ -439,7 +447,7 @@
     }
   
     file_prop = H5Pcreate(H5P_FILE_ACCESS);
-    err = H5Pset_fapl_mpio(file_prop, myPcomm->proc_config().proc_comm(), MPI_INFO_NULL);
+    err = H5Pset_fapl_mpio(file_prop, myPcomm->proc_config().proc_comm(), info);
     assert(file_prop >= 0);
     assert(err >= 0);
 
@@ -720,7 +728,7 @@
                                       Range& file_ids )
 {
   ErrorCode rval;
-  
+
   for (int i = 0; i < subset_list_length; ++i) {  
     
     int tag_index;
















More information about the moab-dev mailing list