Tool for debugging binary IO. More...
#include <IODebugTrack.hpp>
Classes | |
struct | DRange |
Public Member Functions | |
IODebugTrack (bool enable, const std::string &table_name, std::ostream &output_stream, unsigned long table_size=0) | |
Constuctor requires stream to which to log errors. More... | |
IODebugTrack (bool enable, const std::string &table_name, unsigned long table_size=0) | |
Constuctor requires stream to which to log errors. More... | |
~IODebugTrack () | |
Destructor prints errors about unaccessed ranges. More... | |
void | record_io (unsigned long begin, unsigned long count) |
Notify of IO request. More... | |
void | all_reduce () |
Push all data to root process. More... | |
Private Member Functions | |
void | record_io (DRange data) |
Private Attributes | |
bool | enableOutput |
std::string | tableName |
std::list< DRange > | dataSet |
std::ostream & | ostr |
unsigned long | maxSize |
int | mpiRank |
bool | haveMPI |
Tool for debugging binary IO.
Track which ranges of a table of data have been read/written, watching for overlapping IO requests and ranges of unaccessed data.
Notes: This class assumes MPI_COMM_WORLD is the communicator for parallel.
Definition at line 20 of file IODebugTrack.hpp.
moab::IODebugTrack::IODebugTrack | ( | bool | enable, |
const std::string & | table_name, | ||
std::ostream & | output_stream, | ||
unsigned long | table_size = 0 |
||
) |
Constuctor requires stream to which to log errors.
table_name | Used to tag output |
output_stream | Stream to which to print error messages |
table_size | Max table size. No limit if unspecified |
Definition at line 16 of file IODebugTrack.cpp.
References mpiRank.
moab::IODebugTrack::IODebugTrack | ( | bool | enable, |
const std::string & | table_name, | ||
unsigned long | table_size = 0 |
||
) |
Constuctor requires stream to which to log errors.
table_name | Used to tag output |
table_size | Max table size. No limit if unspecified |
Definition at line 29 of file IODebugTrack.cpp.
moab::IODebugTrack::~IODebugTrack | ( | ) |
Destructor prints errors about unaccessed ranges.
Definition at line 45 of file IODebugTrack.cpp.
References moab::Range::begin(), moab::Range::const_pair_begin(), moab::Range::const_pair_end(), dataSet, moab::Range::empty(), enableOutput, moab::Range::insert(), maxSize, mpiRank, ostr, PFX, moab::subtract(), and tableName.
void moab::IODebugTrack::all_reduce | ( | ) |
Push all data to root process.
Does nothing if MPI support is not enabled
Definition at line 142 of file IODebugTrack.cpp.
References dataSet, enableOutput, haveMPI, mpiRank, and record_io().
Referenced by moab::ReadHDF5::read_node_adj_elems(), moab::WriteHDF5::write_adjacencies(), moab::WriteHDF5::write_elems(), moab::WriteHDF5::write_nodes(), moab::WriteHDF5::write_sets(), moab::WriteHDF5::write_sparse_ids(), moab::WriteHDF5::write_sparse_tag(), moab::WriteHDF5::write_tag_values(), moab::WriteHDF5::write_var_len_data(), and moab::WriteHDF5::write_var_len_indices().
|
private |
Definition at line 105 of file IODebugTrack.cpp.
References moab::IODebugTrack::DRange::begin, dataSet, enableOutput, moab::IODebugTrack::DRange::end, maxSize, mpiRank, ostr, PFX, moab::IODebugTrack::DRange::rank, and tableName.
Referenced by all_reduce(), moab::ReadHDF5::read_node_adj_elems(), record_io(), moab::WriteHDF5::write_adjacencies(), moab::WriteHDF5::write_elems(), moab::WriteHDF5::write_nodes(), moab::WriteHDF5::write_set_data(), moab::WriteHDF5::write_sets(), moab::WriteHDF5::write_sparse_ids(), moab::WriteHDF5::write_tag_values(), moab::WriteHDF5::write_var_len_data(), and moab::WriteHDF5::write_var_len_indices().
void moab::IODebugTrack::record_io | ( | unsigned long | begin, |
unsigned long | count | ||
) |
Notify of IO request.
begin | First table row being read/written |
count | Num consecutive table rows being read/written |
Definition at line 96 of file IODebugTrack.cpp.
References enableOutput, mpiRank, and record_io().
|
private |
Definition at line 32 of file IODebugTrack.hpp.
Referenced by all_reduce(), record_io(), and ~IODebugTrack().
|
private |
Definition at line 30 of file IODebugTrack.hpp.
Referenced by all_reduce(), record_io(), and ~IODebugTrack().
|
private |
Definition at line 36 of file IODebugTrack.hpp.
Referenced by all_reduce(), and IODebugTrack().
|
private |
Definition at line 34 of file IODebugTrack.hpp.
Referenced by record_io(), and ~IODebugTrack().
|
private |
Definition at line 35 of file IODebugTrack.hpp.
Referenced by all_reduce(), IODebugTrack(), record_io(), and ~IODebugTrack().
|
private |
Definition at line 33 of file IODebugTrack.hpp.
Referenced by record_io(), and ~IODebugTrack().
|
private |
Definition at line 31 of file IODebugTrack.hpp.
Referenced by record_io(), and ~IODebugTrack().