Zoltan2
Public Member Functions
Zoltan2::DebugManager Class Reference

DebugManager contains the methods that perform output of debug and status messages. More...

#include <Zoltan2_DebugManager.hpp>

List of all members.

Public Member Functions

 DebugManager (int rank, bool doPrinting, std::ofstream &debugOs, MessageOutputLevel debugLevel)
 Constructor for output to an ofstream.
 DebugManager (int rank, bool doPrinting, std::ostream &debugOs, MessageOutputLevel debugLevel)
 Constructor for output to an iostream.
virtual ~DebugManager ()
 Destructor.
std::ostream * getOStream () const
 Return the output stream for debug/status messages.
MessageOutputLevel getDebugLevel () const
 Return the highest level of message that will be printed.
void print (MessageOutputLevel debugLevel, const std::string &output)
 Print a debug or status message, if this process is one of those that is supposed to be doing output.
void printInAllTasks (MessageOutputLevel debugLevel, const std::string &output)
 Print a debug or status message regardless of whether this process is one of those that is supposed to be doing output.
void print (MessageOutputLevel debugLevel, const char *output)
 The const char * versions of print functions are needed to avoid the expensive conversion to string.
void printInAllTasks (MessageOutputLevel debugLevel, const char *output)
 The const char * versions of print functions are needed to avoid the expensive conversion to string.

Detailed Description

DebugManager contains the methods that perform output of debug and status messages.

An Environment has a DebugManager.

Parameters governing debug/status output:

For more information see at their definitions in createAllParameters() in Zoltan2_Parameters.cpp.

If Zoltan2 is compiled with Z2_OMIT_ALL_STATUS_MESSAGES, no status messages will be displayed and status message code is ifdef'd out.

Todo:
For nightly testing, add a build for -DZ2_OMIT_ALL_STATUS_MESSAGES.

Definition at line 81 of file Zoltan2_DebugManager.hpp.


Constructor & Destructor Documentation

Zoltan2::DebugManager::DebugManager ( int  rank,
bool  doPrinting,
std::ofstream &  debugOs,
MessageOutputLevel  debugLevel 
) [inline]

Constructor for output to an ofstream.

Parameters:
rankthe MPI rank of this process.
doPrintingtrue if this process is one that outputs messages.
debugOsthe output stream for debug messages.
debugLevelthe highest level of message to print, messages that are below this level will be ignored.

Different constructor for file output so we can close the file in the destructor.

Definition at line 95 of file Zoltan2_DebugManager.hpp.

Zoltan2::DebugManager::DebugManager ( int  rank,
bool  doPrinting,
std::ostream &  debugOs,
MessageOutputLevel  debugLevel 
) [inline]

Constructor for output to an iostream.

Parameters:
rankthe MPI rank of this process.
doPrintingtrue if this process is one that outputs messages.
debugOsthe output stream for debug messages.
debugLevelthe highest level of message to print, messages that are below this level will be ignored.

Definition at line 107 of file Zoltan2_DebugManager.hpp.

virtual Zoltan2::DebugManager::~DebugManager ( ) [inline, virtual]

Destructor.

Definition at line 113 of file Zoltan2_DebugManager.hpp.


Member Function Documentation

std::ostream* Zoltan2::DebugManager::getOStream ( ) const [inline]

Return the output stream for debug/status messages.

Definition at line 122 of file Zoltan2_DebugManager.hpp.

MessageOutputLevel Zoltan2::DebugManager::getDebugLevel ( ) const [inline]

Return the highest level of message that will be printed.

Definition at line 126 of file Zoltan2_DebugManager.hpp.

void Zoltan2::DebugManager::print ( MessageOutputLevel  debugLevel,
const std::string &  output 
) [inline]

Print a debug or status message, if this process is one of those that is supposed to be doing output.

Parameters:
debugLevelThe level of this message. If it is higher than the debugLevel stated in the constructor, it will be ignored.
outputThe message.

Definition at line 136 of file Zoltan2_DebugManager.hpp.

void Zoltan2::DebugManager::printInAllTasks ( MessageOutputLevel  debugLevel,
const std::string &  output 
) [inline]

Print a debug or status message regardless of whether this process is one of those that is supposed to be doing output.

Parameters:
debugLevelThe level of this message. If it is higher than the debugLevel stated in the constructor, it will be ignored.
outputThe message.

Definition at line 152 of file Zoltan2_DebugManager.hpp.

void Zoltan2::DebugManager::print ( MessageOutputLevel  debugLevel,
const char *  output 
) [inline]

The const char * versions of print functions are needed to avoid the expensive conversion to string.

Parameters:
debugLevelThe level of this message. If it is higher than the debugLevel stated in the constructor, it will be ignored.
outputThe message.

Definition at line 167 of file Zoltan2_DebugManager.hpp.

void Zoltan2::DebugManager::printInAllTasks ( MessageOutputLevel  debugLevel,
const char *  output 
) [inline]

The const char * versions of print functions are needed to avoid the expensive conversion to string.

Parameters:
debugLevelThe level of this message. If it is higher than the debugLevel stated in the constructor, it will be ignored.
outputThe message.

Definition at line 182 of file Zoltan2_DebugManager.hpp.


The documentation for this class was generated from the following file: