[MOAB-dev] r4176 - MOAB/trunk/tools
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Tue Sep 28 10:47:51 CDT 2010
Author: kraftche
Date: 2010-09-28 10:47:51 -0500 (Tue, 28 Sep 2010)
New Revision: 4176
Added:
MOAB/trunk/tools/parread.cpp
Modified:
MOAB/trunk/tools/Makefile.am
Log:
add utility for testing/timing parallel read: tool build if parallel is enabled but is never installed
Modified: MOAB/trunk/tools/Makefile.am
===================================================================
--- MOAB/trunk/tools/Makefile.am 2010-09-28 14:55:14 UTC (rev 4175)
+++ MOAB/trunk/tools/Makefile.am 2010-09-28 15:47:51 UTC (rev 4176)
@@ -113,6 +113,14 @@
dagmc_DIR =
endif
+if PARALLEL
+ parread = parread
+else
+ parread =
+endif
+
+noinst_PROGRAMS = $(parread)
+
SUBDIRS = $(refiner_DIR) \
$(mbcoupler_DIR) \
$(mbzoltan_DIR) \
@@ -131,4 +139,5 @@
mbsurfplot_SOURCES = surfplot.cpp
mbtagprop_SOURCES = parse.cpp parse.hpp propagate_tags.cpp
mbmem_SOURCES = mbmem.cpp
+parread_SOURCES = parread.cpp
Added: MOAB/trunk/tools/parread.cpp
===================================================================
--- MOAB/trunk/tools/parread.cpp (rev 0)
+++ MOAB/trunk/tools/parread.cpp 2010-09-28 15:47:51 UTC (rev 4176)
@@ -0,0 +1,139 @@
+#include "moab_mpi.h"
+#include "moab/Core.hpp"
+#include <sstream>
+#include <iostream>
+#include <stdlib.h>
+
+const char usage[] = "[-b|-d|-f] [-p <name>] [-R] [-g <level>] <filename>";
+
+const char DEFAULT_PARTITION_TAG[] = "PARALLEL_PARTITION";
+
+void error( const char* argv0 )
+{
+ std::cerr << "Usage: " << argv0 << " " << usage << std::endl;
+ exit(1);
+}
+
+void help( const char* argv0 ) {
+ std::cout << argv0 << " " << usage << std::endl
+ << "-p <name> Tag identifying partition sets (default: \"" <<
+ DEFAULT_PARTITION_TAG << "\")" << std::endl
More information about the moab-dev
mailing list