[MOAB-dev] r5205 - MOAB/trunk/src/parallel

tautges at mcs.anl.gov tautges at mcs.anl.gov
Sun Nov 6 18:58:33 CST 2011


Author: tautges
Date: 2011-11-06 18:58:33 -0600 (Sun, 06 Nov 2011)
New Revision: 5205

Modified:
   MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
Log:
Add CB_BUFFER_SIZE option for writing too.



Modified: MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
===================================================================
--- MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp	2011-11-07 00:51:08 UTC (rev 5204)
+++ MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp	2011-11-07 00:58:33 UTC (rev 5205)
@@ -316,6 +316,14 @@
     pcommAllocated = true;
   }
   
+  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()));
+  }
+  
   dbgOut.set_rank( myPcomm->proc_config().proc_rank() );
   dbgOut.limit_output_to_first_N_procs( 32 );
   
@@ -441,7 +449,7 @@
   dbgOut.tprint(1,"(re)opening file in parallel mode\n");
   unsigned long junk;
   hid_t hdf_opt = H5Pcreate( H5P_FILE_ACCESS );
-  H5Pset_fapl_mpio( hdf_opt, myPcomm->proc_config().proc_comm(), MPI_INFO_NULL );
+  H5Pset_fapl_mpio( hdf_opt, myPcomm->proc_config().proc_comm(), info );
   filePtr = mhdf_openFileWithOpt( filename, 1, &junk, id_type, hdf_opt, &status );
   H5Pclose( hdf_opt );
   if (!filePtr)

























More information about the moab-dev mailing list