[MOAB-dev] r3934 - MOAB/trunk/test/parallel
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Thu May 20 17:34:19 CDT 2010
Author: kraftche
Date: 2010-05-20 17:34:19 -0500 (Thu, 20 May 2010)
New Revision: 3934
Modified:
MOAB/trunk/test/parallel/parallel_hdf5_test.cc
Log:
add command line flags to enable debug output to parallel hdf5 test
Modified: MOAB/trunk/test/parallel/parallel_hdf5_test.cc
===================================================================
--- MOAB/trunk/test/parallel/parallel_hdf5_test.cc 2010-05-20 22:27:35 UTC (rev 3933)
+++ MOAB/trunk/test/parallel/parallel_hdf5_test.cc 2010-05-20 22:34:19 UTC (rev 3934)
@@ -50,6 +50,8 @@
bool KeepTmpFiles = false;
bool PauseOnStart = false;
const int DefaultReadIntervals = 2;
+int ReadDebugLevel = 0;
+int WriteDebugLevel = 0;
int main( int argc, char* argv[] )
{
@@ -61,14 +63,26 @@
KeepTmpFiles = true;
else if (!strcmp( argv[i], "-p"))
PauseOnStart = true;
- else if (!strcmp( argv[i], "-r")) {
+ else if (!strcmp( argv[i], "-R")) {
++i;
CHECK( i < argc );
ReadIntervals = atoi( argv[i] );
CHECK( ReadIntervals > 0 );
}
+ else if (!strcmp( argv[i], "-r")) {
+ ++i;
+ CHECK( i < argc );
+ ReadDebugLevel = atoi( argv[i] );
+ CHECK( ReadDebugLevel > 0 );
+ }
+ else if (!strcmp( argv[i], "-w")) {
+ ++i;
+ CHECK( i < argc );
+ WriteDebugLevel = atoi( argv[i] );
+ CHECK( WriteDebugLevel > 0 );
+ }
else {
- std::cerr << "Usage: " << argv[0] << " [-k] [-p] [-r <int>]" << std::endl;
+ std::cerr << "Usage: " << argv[0] << " [-k] [-p] [-R <intervals>] [-r <level>] [-w <level>]" << std::endl;
return 1;
}
}
@@ -283,7 +297,15 @@
int procnum;
MPI_Comm_rank( MPI_COMM_WORLD, &procnum );
- rval = moab.write_file( tmp_filename, 0, "PARALLEL=WRITE_PART" );
+ const char* opt = "PARALLEL=WRITE_PART";
+ std::string str;
+ if (WriteDebugLevel) {
+ std::ostringstream s;
More information about the moab-dev
mailing list