#include <QMCStopwatches.h>
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. | |
Stopwatch * | getInitializationStopwatch () |
Gets the stopwatch which times the initialization of the calculation. | |
Stopwatch * | getEquilibrationStopwatch () |
Gets the stopwatch that times the equilibration phase of the calc. | |
Stopwatch * | getPropagationStopwatch () |
Gets the stopwatch which times the useful propagation of walkers. | |
Stopwatch * | getSendCommandStopwatch () |
Gets the stopwatch which times the sending of commands between processors. | |
Stopwatch * | getGatherPropertiesStopwatch () |
Gets the stopwatch which times the gathering of QMCProperties from all processors. | |
Stopwatch * | getCommunicationSynchronizationStopwatch () |
Gets the stopwatch which times the synchronization of all the processors. | |
Stopwatch * | getCommandPollingStopwatch () |
Gets the stopwatch which times how long is devoted to seeing if a processor has a command waiting for it. | |
Stopwatch * | getOptimizationStopwatch () |
Gets the stopwatch which times the VMC optimization. | |
Stopwatch * | getTotalTimeStopwatch () |
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. |
Definition at line 29 of file QMCStopwatches.h.
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().
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.
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.
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.
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.
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.
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.
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.
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 | ) |
Sets two object equal.
Definition at line 100 of file QMCStopwatches.cpp.
References Communication_poll, Communication_reduce, Communication_send, Communication_synch, Equilibration, Initialization, Optimization, Propagation, and Total.
QMCStopwatches QMCStopwatches::operator+ | ( | QMCStopwatches & | rhs | ) |
Returns a QMCStopwatches which is the sum of two QMCStopwatches objects.
Definition at line 113 of file QMCStopwatches.cpp.
References Communication_poll, Communication_reduce, Communication_send, Communication_synch, Equilibration, Initialization, Optimization, Propagation, and Total.
void QMCStopwatches::buildMpiType | ( | ) | [static, private] |
Build MPI_TYPE.
Definition at line 184 of file QMCStopwatches.cpp.
References Communication_poll, Communication_reduce, Communication_send, Communication_synch, Equilibration, Initialization, MPI_TYPE, Stopwatch::MPI_TYPE, Optimization, Propagation, and Total.
Referenced by QMCStopwatches().
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().
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.
Stopwatch QMCStopwatches::Initialization [private] |
Definition at line 32 of file QMCStopwatches.h.
Referenced by buildMpiType(), getInitializationStopwatch(), operator+(), operator=(), reset(), and stop().
Stopwatch QMCStopwatches::Equilibration [private] |
Definition at line 33 of file QMCStopwatches.h.
Referenced by buildMpiType(), getEquilibrationStopwatch(), operator+(), operator=(), reset(), and stop().
Stopwatch QMCStopwatches::Propagation [private] |
Definition at line 34 of file QMCStopwatches.h.
Referenced by buildMpiType(), getPropagationStopwatch(), operator+(), operator=(), reset(), and stop().
Stopwatch QMCStopwatches::Communication_send [private] |
Definition at line 35 of file QMCStopwatches.h.
Referenced by buildMpiType(), getSendCommandStopwatch(), operator+(), operator=(), reset(), and stop().
Definition at line 36 of file QMCStopwatches.h.
Referenced by buildMpiType(), getGatherPropertiesStopwatch(), operator+(), operator=(), reset(), and stop().
Stopwatch QMCStopwatches::Communication_synch [private] |
Definition at line 37 of file QMCStopwatches.h.
Referenced by buildMpiType(), getCommunicationSynchronizationStopwatch(), operator+(), operator=(), reset(), and stop().
Stopwatch QMCStopwatches::Communication_poll [private] |
Definition at line 38 of file QMCStopwatches.h.
Referenced by buildMpiType(), getCommandPollingStopwatch(), operator+(), operator=(), reset(), and stop().
Stopwatch QMCStopwatches::Optimization [private] |
Definition at line 39 of file QMCStopwatches.h.
Referenced by buildMpiType(), getOptimizationStopwatch(), operator+(), operator=(), and reset().
Stopwatch QMCStopwatches::Total [private] |
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().