[MOAB-dev] r4451 - MOAB/trunk/tools

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Sat Jan 15 11:37:19 CST 2011


Author: kraftche
Date: 2011-01-15 11:37:19 -0600 (Sat, 15 Jan 2011)
New Revision: 4451

Modified:
   MOAB/trunk/tools/parread.cpp
Log:
parread: only print summary output on root processor

Modified: MOAB/trunk/tools/parread.cpp
===================================================================
--- MOAB/trunk/tools/parread.cpp	2011-01-15 00:54:42 UTC (rev 4450)
+++ MOAB/trunk/tools/parread.cpp	2011-01-15 17:37:19 UTC (rev 4451)
@@ -3,8 +3,9 @@
 #include <sstream>
 #include <iostream>
 #include <stdlib.h>
+#include <unistd.h>
 
-const char usage[] = "[-b|-d|-f] [-p <name>] [-R] [-g <level>] [-O <option>] <filename>";
+const char usage[] = "[-b|-d|-f] [-P <rank>] [-p <name>] [-R] [-g <level>] [-O <option>] <filename>";
 
 const char DEFAULT_PARTITION_TAG[] = "PARALLEL_PARTITION";
 
@@ -16,6 +17,7 @@
 
 void help( const char* argv0 ) {
   std::cout << argv0 << " " << usage << std::endl
+            << "-P <rank>  Specified processor will wait for debugger to attach." << std::endl
             << "-p <name>  Tag identifying partition sets (default: \"" << 
                   DEFAULT_PARTITION_TAG << "\")" << std::endl
             << "-a         Assign partitions to processes by matching part number to rank" << std::endl
@@ -27,12 +29,9 @@
   exit(0);
 }
 
-void finalize() { MPI_Finalize(); }
-
 int main( int argc, char* argv[] )
 {
   MPI_Init( &argc, &argv );
-  atexit( &finalize );
   
   const char BCAST_MODE[] = "BCAST_DELETE";
   const char DELETE_MODE[] = "READ_DELETE";
@@ -42,13 +41,18 @@
   bool assign_by_id = false;
   bool resolve_shared = true;
   int debug_level = 0;
+  int pause_rank = -1;
   const char* filename = 0;
   std::ostringstream options;
   options << ";";
+
+  int rank;
+  MPI_Comm_rank( MPI_COMM_WORLD, &rank );
   
   int expect_tag = 0;
   int expect_level = 0;
   int expect_opt = 0;


More information about the moab-dev mailing list