[MOAB-dev] r5490 - MOAB/trunk/test/parallel

iulian at mcs.anl.gov iulian at mcs.anl.gov
Mon Apr 23 13:08:41 CDT 2012


Author: iulian
Date: 2012-04-23 13:08:41 -0500 (Mon, 23 Apr 2012)
New Revision: 5490

Modified:
   MOAB/trunk/test/parallel/mbparallelcomm_test.cpp
Log:
remove ParallelRead dependency in the test, by passing the id of the 
ParallelComm in the read options


Modified: MOAB/trunk/test/parallel/mbparallelcomm_test.cpp
===================================================================
--- MOAB/trunk/test/parallel/mbparallelcomm_test.cpp	2012-04-23 02:09:46 UTC (rev 5489)
+++ MOAB/trunk/test/parallel/mbparallelcomm_test.cpp	2012-04-23 18:08:41 UTC (rev 5490)
@@ -8,7 +8,6 @@
 
 #include "moab/ParallelComm.hpp"
 #include "MBParallelConventions.h"
-#include "ReadParallel.hpp"
 #include "FileOptions.hpp"
 #include "MBTagConventions.hpp"
 #include "moab/Core.hpp"
@@ -339,16 +338,17 @@
     options << ";PRINT_PARALLEL";
 
   std::vector<ParallelComm*> pcs(filenames.size());
-  std::vector<ReadParallel*> rps(filenames.size());
   ErrorCode result;
 
   if (1 < filenames.size()) {
     for (unsigned int i = 0; i < filenames.size(); i++) {
       pcs[i] = new ParallelComm(mbImpl);
-      rps[i] = new ReadParallel(mbImpl, pcs[i]);
-    
-      result = rps[i]->load_file(filenames[i].c_str(), 0, 
-                                 FileOptions(options.str().c_str()), 0, 0);
+      int index = pcs[i]->get_id();
+      std::ostringstream newopts;
+      newopts  << options;
+      newopts << ";PARALLEL_COMM="<<index;
+      result = mbImpl->load_file( filenames[i].c_str(), 0, newopts.str().c_str());
+
       if (MB_SUCCESS != result) 
         PRINT_LAST_ERROR;
 


















More information about the moab-dev mailing list