Coordinator Class Reference

The coordinator class which prepares chunks of parameter space to be processed by workers, and then incorporates the results of the computations into the final picture, and also saves the results to a log file. More...

#include <coord.h>

List of all members.

Public Member Functions

 Coordinator (const char *_interFileName, const char *_graphsFileName, const char *_finalPrefix, const char *_sharePrefix, const char *_phaseSpacePrefix, bool _fullPhaseSpace, int _skipIndices, int _nWorkers)
 The complete constructor of a coordinator.
 ~Coordinator ()
 The destructor.

Private Member Functions

int Prepare (chomp::multiwork::mwData &data)
 A function for preparing data by the coordinator.
int Accept (chomp::multiwork::mwData &data)
 A function for accepting results by the coordinator.
int Reject (chomp::multiwork::mwData &data)
 A function for taking rejected data by the coordinator.
void readPreviousResults (const char *filename)
 A procedure for reading the previously computed results.

Private Attributes

std::ofstream interFile
 A file to append the results to.
std::ofstream graphsFile
 A file to append the computed Conley-Morse graphs to.
int currentCache
 The current number of data pack sent for pre-caching indices.
int maxCache
 The number of indices to pre-cache.
parCoord cacheCoord [paramDim]
 The coordinates of a box to send for pre-caching indices.
int current
 The current number of data pack to prepare by the coordinator.
int maxCurrent
 The number of parameter regions which are to be processed in this run of the program.
chomp::homology::multitable
< datapack
sent
 The data packs sent for processing to workers.
int sentlen
 The number of data packs currently being processed by workers.
int skipIndices
 The minimal size of a Morse set for which the indices should not be computed.
std::string finalPrefix
 The file name prefix for saving the final result.
std::string sharePrefix
 The file name prefix for saving Morse sets by workers.
std::string phaseSpacePrefix
 The file name prefix for saving the phase space pictures of Morse decompositions.
bool fullPhaseSpace
 Should the full phase space be taken for plotting the pictures of Morse sets?
std::vector< parCoordsubCoords [paramDim]
 The coordinates for lower (and upper) ends of rectangular regions in each direction.
parCoord zeroIter [paramDim]
 The minimal corner of the rectangle to iterate (zero coords).
parCoord maxIter [paramDim]
 The numbers of rectangular regions in each direction to iterate.
parRectrectIterator
 A rectangle which iterates the rectangular sets to send.
parCoord parityBits [paramDim]
 Parity bits of which rectangles are to be sent to workers.
bool allSent
 Have all the rectangular regions already been sent?
MatchArray< parCoord,
int > 
matchArray
 The array of matching between parameter boxes.
int morseDecComputed
 The total number of computed Morse decopositions.
int morseDecReused
 The total number of re-used Morse decompositions.
parCubes wrongIndexBoxes
 The parameter boxes for which wrong Conley indices were computed by workers.
parCubes graphsWritten
 The parameter boxes for which the Conley-Morse graph has already been written to the corresponding file.
parCubes previousBoxes
 The boxes representing parameter ranges which have already been processed in the previous run of the coordinator.
chomp::homology::multitable
< std::vector< int > > 
wrongIndices
 The lists of Morse set numbers for which the wrong Conley indices appeared.
spcCoord coordLeftMin [spaceDim]
 The left coordinates of a box that contains all the Morse sets.
spcCoord coordRightMax [spaceDim]
 The right coordinates of a box that contains all the Morse sets.
int maxImgDiam
 The maximal image diameter encountered by the workers.
int maxImgVol
 The maximal image volume encountered by the workers.

Classes

struct  datapack
 This is an auxiliary class whose objects store the information on the data chunks sent to workers. More...


Detailed Description

The coordinator class which prepares chunks of parameter space to be processed by workers, and then incorporates the results of the computations into the final picture, and also saves the results to a log file.

Definition at line 68 of file coord.h.


Constructor & Destructor Documentation

Coordinator::Coordinator ( const char *  _interFileName,
const char *  _graphsFileName,
const char *  _finalPrefix,
const char *  _sharePrefix,
const char *  _phaseSpacePrefix,
bool  _fullPhaseSpace,
int  _skipIndices,
int  _nWorkers 
) [inline]

The complete constructor of a coordinator.

Definition at line 231 of file coord.h.

References cacheCoord, coordLeftMin, coordRightMax, custom::pop3p::finalDepth, finalPrefix, graphsFile, interFile, maxCache, maxCurrent, maxIter, custom::pop3p::paramDim, custom::pop3p::paramSubdiv, parityBits, phaseSpacePrefix, readPreviousResults(), rectIterator, sharePrefix, showConfigInfo(), custom::pop3p::spaceDim, subCoords, subRectangles(), and zeroIter.

Coordinator::~Coordinator (  )  [inline]

The destructor.

Definition at line 433 of file coord.h.

References interFile, and rectIterator.


Member Function Documentation

int Coordinator::Prepare ( chomp::multiwork::mwData &  data  )  [inline, private]

A function for preparing data by the coordinator.

Definition at line 442 of file coord.h.

References allSent, cacheCoord, controlNumber, coord2str(), coordLeftMin, coordRightMax, current, currentCache, fileExists(), finalPrefix, fullPhaseSpace, interFile, matchArray, maxCache, maxCurrent, maxImgDiam, maxImgVol, morseDecComputed, morseDecReused, custom::pop3p::paramDim, custom::pop3p::paramSubdiv, parityBits, phaseSpacePrefix, previousBoxes, rectIterator, sent, sentlen, sharePrefix, skipIndices, custom::pop3p::spaceDim, subCoords, and wrongIndexBoxes.

int Coordinator::Accept ( chomp::multiwork::mwData &  data  )  [inline, private]

A function for accepting results by the coordinator.

Definition at line 685 of file coord.h.

References coordLeftMin, coordRightMax, current, currentCache, graphsFile, graphsWritten, interFile, matchArray, maxCache, maxCurrent, maxImgDiam, maxImgVol, morseDecComputed, morseDecReused, custom::pop3p::paramDim, sent, sentlen, custom::pop3p::spaceDim, writeDotGraph(), wrongIndexBoxes, and wrongIndices.

int Coordinator::Reject ( chomp::multiwork::mwData &  data  )  [inline, private]

A function for taking rejected data by the coordinator.

Definition at line 902 of file coord.h.

void Coordinator::readPreviousResults ( const char *  filename  )  [inline, private]

A procedure for reading the previously computed results.

Definition at line 336 of file coord.h.

References matchArray, maxCurrent, custom::pop3p::paramDim, and previousBoxes.

Referenced by Coordinator().


Member Data Documentation

std::ofstream Coordinator::interFile [private]

A file to append the results to.

Definition at line 126 of file coord.h.

Referenced by Accept(), Coordinator(), Prepare(), and ~Coordinator().

std::ofstream Coordinator::graphsFile [private]

A file to append the computed Conley-Morse graphs to.

Definition at line 129 of file coord.h.

Referenced by Accept(), and Coordinator().

int Coordinator::currentCache [private]

The current number of data pack sent for pre-caching indices.

Definition at line 132 of file coord.h.

Referenced by Accept(), and Prepare().

int Coordinator::maxCache [private]

The number of indices to pre-cache.

Definition at line 135 of file coord.h.

Referenced by Accept(), Coordinator(), and Prepare().

parCoord Coordinator::cacheCoord[paramDim] [private]

The coordinates of a box to send for pre-caching indices.

Definition at line 138 of file coord.h.

Referenced by Coordinator(), and Prepare().

int Coordinator::current [private]

The current number of data pack to prepare by the coordinator.

Definition at line 141 of file coord.h.

Referenced by Accept(), and Prepare().

int Coordinator::maxCurrent [private]

The number of parameter regions which are to be processed in this run of the program.

Definition at line 145 of file coord.h.

Referenced by Accept(), Coordinator(), Prepare(), and readPreviousResults().

chomp::homology::multitable<datapack> Coordinator::sent [private]

The data packs sent for processing to workers.

Definition at line 148 of file coord.h.

Referenced by Accept(), and Prepare().

int Coordinator::sentlen [private]

The number of data packs currently being processed by workers.

Definition at line 151 of file coord.h.

Referenced by Accept(), and Prepare().

int Coordinator::skipIndices [private]

The minimal size of a Morse set for which the indices should not be computed.

Zero to compute all the Conley indices.

Definition at line 155 of file coord.h.

Referenced by Prepare().

std::string Coordinator::finalPrefix [private]

The file name prefix for saving the final result.

Definition at line 158 of file coord.h.

Referenced by Coordinator(), and Prepare().

std::string Coordinator::sharePrefix [private]

The file name prefix for saving Morse sets by workers.

Definition at line 161 of file coord.h.

Referenced by Coordinator(), and Prepare().

std::string Coordinator::phaseSpacePrefix [private]

The file name prefix for saving the phase space pictures of Morse decompositions.

Definition at line 165 of file coord.h.

Referenced by Coordinator(), and Prepare().

bool Coordinator::fullPhaseSpace [private]

Should the full phase space be taken for plotting the pictures of Morse sets?

Definition at line 169 of file coord.h.

Referenced by Prepare().

std::vector<parCoord> Coordinator::subCoords[paramDim] [private]

The coordinates for lower (and upper) ends of rectangular regions in each direction.

Definition at line 173 of file coord.h.

Referenced by Coordinator(), and Prepare().

parCoord Coordinator::zeroIter[paramDim] [private]

The minimal corner of the rectangle to iterate (zero coords).

Definition at line 176 of file coord.h.

Referenced by Coordinator().

parCoord Coordinator::maxIter[paramDim] [private]

The numbers of rectangular regions in each direction to iterate.

Definition at line 179 of file coord.h.

Referenced by Coordinator().

parRect* Coordinator::rectIterator [private]

A rectangle which iterates the rectangular sets to send.

Definition at line 182 of file coord.h.

Referenced by Coordinator(), Prepare(), and ~Coordinator().

parCoord Coordinator::parityBits[paramDim] [private]

Parity bits of which rectangles are to be sent to workers.

Definition at line 185 of file coord.h.

Referenced by Coordinator(), and Prepare().

bool Coordinator::allSent [private]

Have all the rectangular regions already been sent?

Definition at line 188 of file coord.h.

Referenced by Prepare().

MatchArray<parCoord,int> Coordinator::matchArray [private]

The array of matching between parameter boxes.

Definition at line 191 of file coord.h.

Referenced by Accept(), Prepare(), and readPreviousResults().

int Coordinator::morseDecComputed [private]

The total number of computed Morse decopositions.

Definition at line 194 of file coord.h.

Referenced by Accept(), and Prepare().

int Coordinator::morseDecReused [private]

The total number of re-used Morse decompositions.

Definition at line 197 of file coord.h.

Referenced by Accept(), and Prepare().

parCubes Coordinator::wrongIndexBoxes [private]

The parameter boxes for which wrong Conley indices were computed by workers.

Definition at line 201 of file coord.h.

Referenced by Accept(), and Prepare().

parCubes Coordinator::graphsWritten [private]

The parameter boxes for which the Conley-Morse graph has already been written to the corresponding file.

Definition at line 205 of file coord.h.

Referenced by Accept().

parCubes Coordinator::previousBoxes [private]

The boxes representing parameter ranges which have already been processed in the previous run of the coordinator.

Definition at line 209 of file coord.h.

Referenced by Prepare(), and readPreviousResults().

chomp::homology::multitable<std::vector<int> > Coordinator::wrongIndices [private]

The lists of Morse set numbers for which the wrong Conley indices appeared.

Definition at line 213 of file coord.h.

Referenced by Accept().

spcCoord Coordinator::coordLeftMin[spaceDim] [private]

The left coordinates of a box that contains all the Morse sets.

Definition at line 216 of file coord.h.

Referenced by Accept(), Coordinator(), and Prepare().

spcCoord Coordinator::coordRightMax[spaceDim] [private]

The right coordinates of a box that contains all the Morse sets.

Definition at line 219 of file coord.h.

Referenced by Accept(), Coordinator(), and Prepare().

int Coordinator::maxImgDiam [private]

The maximal image diameter encountered by the workers.

Definition at line 222 of file coord.h.

Referenced by Accept(), and Prepare().

int Coordinator::maxImgVol [private]

The maximal image volume encountered by the workers.

Definition at line 225 of file coord.h.

Referenced by Accept(), and Prepare().


The documentation for this class was generated from the following file:
Generated on Sun Mar 28 17:47:58 2010 for The Conley-Morse Graphs Software by  doxygen 1.5.3