[MOAB-dev] r3845 - MOAB/trunk/src/io
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Wed May 5 13:30:33 CDT 2010
Author: kraftche
Date: 2010-05-05 13:30:33 -0500 (Wed, 05 May 2010)
New Revision: 3845
Added:
MOAB/trunk/src/io/IODebugTrack.cpp
MOAB/trunk/src/io/IODebugTrack.hpp
Modified:
MOAB/trunk/src/io/Makefile.am
Log:
Add tool for tracking IO overlaps during parallel IO
Added: MOAB/trunk/src/io/IODebugTrack.cpp
===================================================================
--- MOAB/trunk/src/io/IODebugTrack.cpp (rev 0)
+++ MOAB/trunk/src/io/IODebugTrack.cpp 2010-05-05 18:30:33 UTC (rev 3845)
@@ -0,0 +1,148 @@
+#include "IODebugTrack.hpp"
+#include <iostream>
+#include <assert.h>
+
+#ifdef USE_MPI
+# include "moab_mpi.h"
+#endif
+
+const char PFX[] = ">>> ";
+
+namespace moab {
+
+IODebugTrack::IODebugTrack( bool enabled,
+ const std::string name,
+ std::ostream output_stream,
+ unsigned long table_size )
+ : enableOutput(enabled),
+ tableName(name),
+ ostr(output_stream),
+ maxSize(table_size)
+{
+#ifdef USE_MPI
+ MPI_Comm_rank( MPI_COMM_WORLD, &mpiRank );
+#else
+ mpiRank = 0;
+#endif
+}
+
+
+IODebugTrack::IODebugTrack( bool enabled,
+ const std::string name,
+ unsigned long table_size )
+ : enableOutput(enabled),
+ tableName(name),
+ ostr(std::cerr),
+ maxSize(table_size)
+{
+#ifdef USE_MPI
+ MPI_Comm_rank( MPI_COMM_WORLD, &mpiRank );
+#else
+ mpiRank = 0;
+#endif
+}
+
+IODebugTrack::~IODebugTrack()
+{
More information about the moab-dev
mailing list