[MOAB-dev] r3021 - in MOAB/trunk: . parallel

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Thu Jul 16 17:16:51 CDT 2009


Author: kraftche
Date: 2009-07-16 17:16:51 -0500 (Thu, 16 Jul 2009)
New Revision: 3021

Modified:
   MOAB/trunk/README.IO
   MOAB/trunk/WriteHDF5.cpp
   MOAB/trunk/parallel/ReadParallel.cpp
   MOAB/trunk/parallel/ReadParallel.hpp
   MOAB/trunk/parallel/parallel_hdf5_test.cc
   MOAB/trunk/parallel/parallel_write_test.cc
Log:
Rename PARALLEL=FORMAT option as PARALLEL=READ_PART and PARALLEL=WRITE_PART.


Modified: MOAB/trunk/README.IO
===================================================================
--- MOAB/trunk/README.IO	2009-07-16 22:16:10 UTC (rev 3020)
+++ MOAB/trunk/README.IO	2009-07-16 22:16:51 UTC (rev 3021)
@@ -81,17 +81,23 @@
 Parallel Read Options:
 ----------------------
 
-  PARALLEL={NONE|BCAST|BCAST_DELETE|READ_DELETE|READ_PARALLEL|FORMAT}
+  PARALLEL={NONE|BCAST|BCAST_DELETE|READ_DELETE|READ_PART}
 
 Set parallel read mode.  Options are:
   - NONE  - force serial read/write on each processor (default)
   - BCAST - read on one processor and broadcast a copy to all others
-  - BCAST_DELETE - ?
+  - BCAST_DELETE - read file on one processor, broadcasting partitioned
+                   data to other processors.
   - READ_DELETE - read file on all processors and partition by deleting
                   mesh from non-local partitions.
-  - READ_PARALLEL - ?
-  - FORMAT- use format-specific parallel IO capabilities, if available
-
+  - READ_PART - read only relevant subset of file on each processor,
+                utilizing format-specific parallel I/O if available
+                (this option is not supported for all file formats.)
+  - WRITE_PART - write only relevant subset of file on each processor,
+                 creating a single file utilizing format-specific parallel 
+                 I/O if available (this option is not supported for all 
+                 file formats.)
+  - FORMAT - depricated (use WRITE_PART)
   
   PARTITION
   PARTITION=<tag_name>

Modified: MOAB/trunk/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/WriteHDF5.cpp	2009-07-16 22:16:10 UTC (rev 3020)
+++ MOAB/trunk/WriteHDF5.cpp	2009-07-16 22:16:51 UTC (rev 3021)
@@ -452,7 +452,9 @@
   
     // Create the file layout, including all tables (zero-ed) and
     // all structure and meta information.
-  parallelWrite = (MB_SUCCESS == opts.match_option( "PARALLEL", "FORMAT" ));
+  const char* optnames[] = { "WRITE_PART", "FORMAT", 0 };
+  int junk;
+  parallelWrite = (MB_SUCCESS == opts.match_option( "PARALLEL", optnames, junk ));
   if (parallelWrite) {
     int pcomm_no = 0;
     opts.get_int_option("PARALLEL_COMM", pcomm_no);

Modified: MOAB/trunk/parallel/ReadParallel.cpp
===================================================================
--- MOAB/trunk/parallel/ReadParallel.cpp	2009-07-16 22:16:10 UTC (rev 3020)
+++ MOAB/trunk/parallel/ReadParallel.cpp	2009-07-16 22:16:51 UTC (rev 3021)
@@ -36,8 +36,7 @@
 };
 
 const char* ReadParallel::parallelOptsNames[] = { "NONE", "BCAST", "BCAST_DELETE", 
-                                                  "READ_DELETE", "READ_PARALLEL", 
-                                                  "FORMAT", "", 0 };
+                                                  "READ_DELETE", "READ_PART", "", 0 };
       
 ReadParallel::ReadParallel(MBInterface* impl, 
                            MBParallelComm *pc) 
@@ -175,12 +174,9 @@
         pa_vec.push_back(PA_DELETE_NONLOCAL);
         break;
 
-    case POPT_FORMAT:
+    case POPT_READ_PART:
         merror->set_last_error( "Access to format-specific parallel read not implemented.\n");
         return MB_NOT_IMPLEMENTED;
-    case POPT_READ_PARALLEL:
-        merror->set_last_error( "Partitioning for PARALLEL=READ_PARALLEL not supported yet.\n");
-        return MB_NOT_IMPLEMENTED;
     default:
         return MB_FAILURE;
   }

Modified: MOAB/trunk/parallel/ReadParallel.hpp
===================================================================
--- MOAB/trunk/parallel/ReadParallel.hpp	2009-07-16 22:16:10 UTC (rev 3020)
+++ MOAB/trunk/parallel/ReadParallel.hpp	2009-07-16 22:16:51 UTC (rev 3021)
@@ -61,8 +61,7 @@
   static const char *parallelOptsNames[];
   
   enum ParallelOpts {POPT_NONE=0, POPT_BCAST, POPT_BCAST_DELETE, 
-                     POPT_READ_DELETE, POPT_READ_PARALLEL,
-                     POPT_FORMAT, POPT_DEFAULT};
+                     POPT_READ_DELETE, POPT_READ_PART, POPT_DEFAULT};
 
     //! PUBLIC TO ALLOW TESTING
   MBErrorCode delete_nonlocal_entities(std::string &ptag_name,

Modified: MOAB/trunk/parallel/parallel_hdf5_test.cc
===================================================================
--- MOAB/trunk/parallel/parallel_hdf5_test.cc	2009-07-16 22:16:10 UTC (rev 3020)
+++ MOAB/trunk/parallel/parallel_hdf5_test.cc	2009-07-16 22:16:51 UTC (rev 3021)
@@ -242,7 +242,7 @@
   int procnum;
   MPI_Comm_rank( MPI_COMM_WORLD, &procnum );
   
-  rval = moab.write_file( tmp_filename, 0, "PARALLEL=FORMAT" );
+  rval = moab.write_file( tmp_filename, 0, "PARALLEL=WRITE_PART" );
   if (MB_SUCCESS != rval) {
     std::cerr << "Parallel write filed on processor " << procnum << std::endl;
     if (procnum == 0 && !KeepTmpFiles)
@@ -521,7 +521,7 @@
   CHECK_ERR(rval);
   
   // Write file
-  rval = mb.write_file( filename, "MOAB", "PARALLEL=FORMAT" );
+  rval = mb.write_file( filename, "MOAB", "PARALLEL=WRITE_PART" );
   CHECK_ERR(rval);
   
   // Read file.  We only reset and re-read the file on the

Modified: MOAB/trunk/parallel/parallel_write_test.cc
===================================================================
--- MOAB/trunk/parallel/parallel_write_test.cc	2009-07-16 22:16:10 UTC (rev 3020)
+++ MOAB/trunk/parallel/parallel_write_test.cc	2009-07-16 22:16:51 UTC (rev 3021)
@@ -187,7 +187,7 @@
 TPRINT("Beginning parallel write");
     // Do parallel write
   clock_t t = clock();
-  rval = moab.write_file( output_file_name, "MOAB", "PARALLEL=FORMAT" );
+  rval = moab.write_file( output_file_name, "MOAB", "PARALLEL=WRITE_PART" );
   t = clock() - t;
   if (MB_SUCCESS != rval) {
     std::string msg;



More information about the moab-dev mailing list