QMCStopwatches Class Reference

A collection of Stopwatch objects used to record information relevant to the timing of a QMC calculation. More...

#include <QMCStopwatches.h>

List of all members.

Public Member Functions

 QMCStopwatches ()
 Creates a new instance of this class with all timers stopped.
void stop ()
 Stops all stopwatches in this object which are running.
void reset ()
 Resets all stopwatches in this object and leaves the stopwatches stopped.
StopwatchgetInitializationStopwatch ()
 Gets the stopwatch which times the initialization of the calculation.
StopwatchgetEquilibrationStopwatch ()
 Gets the stopwatch that times the equilibration phase of the calc.
StopwatchgetPropagationStopwatch ()
 Gets the stopwatch which times the useful propagation of walkers.
StopwatchgetSendCommandStopwatch ()
 Gets the stopwatch which times the sending of commands between processors.
StopwatchgetGatherPropertiesStopwatch ()
 Gets the stopwatch which times the gathering of QMCProperties from all processors.
StopwatchgetCommunicationSynchronizationStopwatch ()
 Gets the stopwatch which times the synchronization of all the processors.
StopwatchgetCommandPollingStopwatch ()
 Gets the stopwatch which times how long is devoted to seeing if a processor has a command waiting for it.
StopwatchgetOptimizationStopwatch ()
 Gets the stopwatch which times the VMC optimization.
StopwatchgetTotalTimeStopwatch ()
 Gets the stopwatch which records the total time of the calculation.
void operator= (const QMCStopwatches &rhs)
 Sets two object equal.
QMCStopwatches operator+ (QMCStopwatches &rhs)
 Returns a QMCStopwatches which is the sum of two QMCStopwatches objects.

Static Public Attributes

static MPI_Datatype MPI_TYPE
 The MPI data type for a QMCStopwatches.
static MPI_Op MPI_REDUCE
 The MPI operation for performing MPI_Reduce on QMCStopwatches objects.

Static Private Member Functions

static void buildMpiType ()
 Build MPI_TYPE.
static void buildMpiReduce ()
 Build MPI_REDUCE.
static void Reduce_Function (QMCStopwatches *in, QMCStopwatches *inout, int *len, MPI_Datatype *dptr)
 An MPI function which allows MPI_Reduce to be used in adding Stopwatches.

Private Attributes

Stopwatch Initialization
Stopwatch Equilibration
Stopwatch Propagation
Stopwatch Communication_send
Stopwatch Communication_reduce
Stopwatch Communication_synch
Stopwatch Communication_poll
Stopwatch Optimization
Stopwatch Total

Static Private Attributes

static bool mpiTypeCreated = false
 A flag which tells if MPI_TYPE has been generated.

Friends

ostream & operator<< (ostream &strm, QMCStopwatches &rhs)
 Writes the timing results of this class to a human readable stream.


Detailed Description

A collection of Stopwatch objects used to record information relevant to the timing of a QMC calculation.

Definition at line 29 of file QMCStopwatches.h.


Constructor & Destructor Documentation

QMCStopwatches::QMCStopwatches (  ) 

Creates a new instance of this class with all timers stopped.

Definition at line 15 of file QMCStopwatches.cpp.

References buildMpiReduce(), buildMpiType(), mpiTypeCreated, and reset().


Member Function Documentation

void QMCStopwatches::stop (  ) 

Stops all stopwatches in this object which are running.

Definition at line 30 of file QMCStopwatches.cpp.

References Communication_poll, Communication_reduce, Communication_send, Communication_synch, Equilibration, Initialization, Stopwatch::isRunning(), Propagation, Stopwatch::stop(), and Total.

Referenced by QMCManager::finalize().

void QMCStopwatches::reset (  ) 

Resets all stopwatches in this object and leaves the stopwatches stopped.

Definition at line 42 of file QMCStopwatches.cpp.

References Communication_poll, Communication_reduce, Communication_send, Communication_synch, Equilibration, Initialization, Optimization, Propagation, Stopwatch::reset(), and Total.

Referenced by QMCStopwatches(), and QMCManager::resetTimers().

Stopwatch * QMCStopwatches::getInitializationStopwatch (  ) 

Gets the stopwatch which times the initialization of the calculation.

Definition at line 55 of file QMCStopwatches.cpp.

References Initialization.

Referenced by QMCManager::initializeCalculationState(), and operator<<().

Stopwatch * QMCStopwatches::getEquilibrationStopwatch (  ) 

Gets the stopwatch that times the equilibration phase of the calc.

Definition at line 60 of file QMCStopwatches.cpp.

References Equilibration.

Referenced by QMCManager::finalize(), operator<<(), and QMCManager::run().

Stopwatch * QMCStopwatches::getPropagationStopwatch (  ) 

Gets the stopwatch which times the useful propagation of walkers.

The time required to initialize the walkers is not included.

Returns:
the stopwatch.

Definition at line 65 of file QMCStopwatches.cpp.

References Propagation.

Referenced by QMCManager::finalize(), operator<<(), QMCManager::run(), and QMCManager::writeTimingData().

Stopwatch * QMCStopwatches::getSendCommandStopwatch (  ) 

Gets the stopwatch which times the sending of commands between processors.

Returns:
the stopwatch.

Definition at line 70 of file QMCStopwatches.cpp.

References Communication_send.

Referenced by operator<<(), and QMCManager::sendAllProcessorsACommand().

Stopwatch * QMCStopwatches::getGatherPropertiesStopwatch (  ) 

Gets the stopwatch which times the gathering of QMCProperties from all processors.

Returns:
the stopwatch.

Definition at line 75 of file QMCStopwatches.cpp.

References Communication_reduce.

Referenced by QMCManager::gatherDensities(), QMCManager::gatherExtraProperties(), QMCManager::gatherForces(), QMCManager::gatherHistograms(), QMCManager::gatherProperties(), and operator<<().

Stopwatch * QMCStopwatches::getCommunicationSynchronizationStopwatch (  ) 

Gets the stopwatch which times the synchronization of all the processors.

Returns:
the stopwatch.

Definition at line 80 of file QMCStopwatches.cpp.

References Communication_synch.

Referenced by operator<<(), QMCManager::synchronizationBarrier(), and QMCManager::synchronizeDMCEnsemble().

Stopwatch * QMCStopwatches::getCommandPollingStopwatch (  ) 

Gets the stopwatch which times how long is devoted to seeing if a processor has a command waiting for it.

Returns:
the stopwatch.

Definition at line 85 of file QMCStopwatches.cpp.

References Communication_poll.

Referenced by operator<<(), and QMCManager::pollForACommand().

Stopwatch * QMCStopwatches::getOptimizationStopwatch (  ) 

Gets the stopwatch which times the VMC optimization.

Returns:
the stopwatch.

Definition at line 90 of file QMCStopwatches.cpp.

References Optimization.

Referenced by operator<<(), and QMCManager::optimize().

Stopwatch * QMCStopwatches::getTotalTimeStopwatch (  ) 

Gets the stopwatch which records the total time of the calculation.

Returns:
the stopwatch.

Definition at line 95 of file QMCStopwatches.cpp.

References Total.

Referenced by operator<<(), QMCManager::QMCManager(), QMCManager::run(), and QMCManager::writeTimingData().

void QMCStopwatches::operator= ( const QMCStopwatches rhs  ) 

QMCStopwatches QMCStopwatches::operator+ ( QMCStopwatches rhs  ) 

void QMCStopwatches::buildMpiType (  )  [static, private]

void QMCStopwatches::buildMpiReduce (  )  [static, private]

Build MPI_REDUCE.

Definition at line 178 of file QMCStopwatches.cpp.

References MPI_REDUCE, and Reduce_Function().

Referenced by QMCStopwatches().

void QMCStopwatches::Reduce_Function ( QMCStopwatches in,
QMCStopwatches inout,
int *  len,
MPI_Datatype *  dptr 
) [static, private]

An MPI function which allows MPI_Reduce to be used in adding Stopwatches.

Definition at line 246 of file QMCStopwatches.cpp.

Referenced by buildMpiReduce().


Friends And Related Function Documentation

ostream& operator<< ( ostream &  strm,
QMCStopwatches rhs 
) [friend]

Writes the timing results of this class to a human readable stream.

Definition at line 134 of file QMCStopwatches.cpp.


Member Data Documentation

Definition at line 39 of file QMCStopwatches.h.

Referenced by buildMpiType(), getOptimizationStopwatch(), operator+(), operator=(), and reset().

Definition at line 40 of file QMCStopwatches.h.

Referenced by buildMpiType(), getTotalTimeStopwatch(), operator+(), operator=(), reset(), and stop().

bool QMCStopwatches::mpiTypeCreated = false [static, private]

A flag which tells if MPI_TYPE has been generated.

Definition at line 161 of file QMCStopwatches.h.

Referenced by QMCStopwatches().

MPI_Datatype QMCStopwatches::MPI_TYPE [static]

The MPI data type for a QMCStopwatches.

Definition at line 188 of file QMCStopwatches.h.

Referenced by buildMpiType(), and QMCManager::finalize().

MPI_Op QMCStopwatches::MPI_REDUCE [static]

The MPI operation for performing MPI_Reduce on QMCStopwatches objects.

Definition at line 194 of file QMCStopwatches.h.

Referenced by buildMpiReduce(), and QMCManager::finalize().


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

Generated on Sat Jul 5 16:14:06 2008 for QMcBeaver by  doxygen 1.5.6