The Conley-Morse Graphs Software
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
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>

Inheritance diagram for Coordinator:

Classes

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

Public Member Functions

 Coordinator (const char *_interFileName, const char *_mapOptFileName, const char *_mapOptPrefix, const char *_graphsFileName, const char *_graphsPrefix, const char *_finalPrefix, const char *_sharePrefix, const char *_phaseSpacePrefix, const char *_cubesPrefix, const char *_morseDecPrefix, const char *_procPrefix, bool _fullPhaseSpace, int _skipIndices, int _nPatches)
 The complete constructor of a coordinator. More...
 
 ~Coordinator ()
 The destructor. More...
 

Private Member Functions

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

Private Attributes

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

Constructor & Destructor Documentation

◆ Coordinator()

Coordinator::Coordinator ( const char *  _interFileName,
const char *  _mapOptFileName,
const char *  _mapOptPrefix,
const char *  _graphsFileName,
const char *  _graphsPrefix,
const char *  _finalPrefix,
const char *  _sharePrefix,
const char *  _phaseSpacePrefix,
const char *  _cubesPrefix,
const char *  _morseDecPrefix,
const char *  _procPrefix,
bool  _fullPhaseSpace,
int  _skipIndices,
int  _nPatches 
)
inline

◆ ~Coordinator()

Coordinator::~Coordinator ( )
inline

The destructor.

Definition at line 530 of file coord.h.

References interFile, mapOptFileName, mapOptimization, and rectIterator.

Member Function Documentation

◆ Accept()

int Coordinator::Accept ( chomp::multiwork::mwData &  data)
inlineprivate

◆ Prepare()

int Coordinator::Prepare ( chomp::multiwork::mwData &  data)
inlineprivate

◆ readPreviousResults()

void Coordinator::readPreviousResults ( const char *  filename)
inlineprivate

A procedure for reading the previously computed results.

Definition at line 433 of file coord.h.

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

Referenced by Coordinator().

◆ Reject()

int Coordinator::Reject ( chomp::multiwork::mwData &  data)
inlineprivate

A function for taking rejected data by the coordinator.

Definition at line 1198 of file coord.h.

Member Data Documentation

◆ allSent

bool Coordinator::allSent
private

Have all the rectangular regions already been sent?

Definition at line 222 of file coord.h.

Referenced by Prepare().

◆ cacheCoord

parCoord Coordinator::cacheCoord[paramDim]
private

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

Definition at line 159 of file coord.h.

Referenced by Coordinator(), and Prepare().

◆ coordLeftMin

spcCoord Coordinator::coordLeftMin[spaceDim]
private

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

Definition at line 250 of file coord.h.

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

◆ coordRightMax

spcCoord Coordinator::coordRightMax[spaceDim]
private

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

Definition at line 253 of file coord.h.

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

◆ cubesPrefix

std::string Coordinator::cubesPrefix
private

The file name prefix for saving the actual cubes of Morse sets and possibly also additional sets (while post-processing).

Definition at line 193 of file coord.h.

Referenced by Coordinator(), and Prepare().

◆ current

int Coordinator::current
private

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

Definition at line 162 of file coord.h.

Referenced by Accept(), and Prepare().

◆ currentCache

int Coordinator::currentCache
private

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

Definition at line 150 of file coord.h.

Referenced by Accept(), and Prepare().

◆ finalPrefix

std::string Coordinator::finalPrefix
private

The file name prefix for saving the final result.

Definition at line 182 of file coord.h.

Referenced by Coordinator(), and Prepare().

◆ fullPhaseSpace

bool Coordinator::fullPhaseSpace
private

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

Definition at line 203 of file coord.h.

Referenced by Prepare().

◆ graphsFile

std::ofstream Coordinator::graphsFile
private

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

Definition at line 147 of file coord.h.

Referenced by Accept(), and Coordinator().

◆ graphsPrefix

std::string Coordinator::graphsPrefix
private

The file name prefix for saving the text Conley-Morse graphs.

Definition at line 179 of file coord.h.

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

◆ graphsWritten

parCubes Coordinator::graphsWritten
private

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

Definition at line 239 of file coord.h.

Referenced by Accept().

◆ interFile

std::ofstream Coordinator::interFile
private

A file to append the results to.

Definition at line 135 of file coord.h.

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

◆ mapOptFileName

std::string Coordinator::mapOptFileName
private

A file to append the optimization results to.

Definition at line 138 of file coord.h.

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

◆ mapOptimization

MapOptimization Coordinator::mapOptimization
private

Map optimization data for all the parameters.

Definition at line 262 of file coord.h.

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

◆ mapOptPrefix

std::string Coordinator::mapOptPrefix
private

A file name prefix for optimization data for each parameter.

Definition at line 141 of file coord.h.

Referenced by Coordinator(), and Prepare().

◆ matchArray

MatchArray<parCoord,int> Coordinator::matchArray
private

The array of matching between parameter boxes.

Definition at line 225 of file coord.h.

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

◆ maxCache

int Coordinator::maxCache
private

The number of indices to pre-cache.

Definition at line 153 of file coord.h.

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

◆ maxCurrent

int Coordinator::maxCurrent
private

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

Definition at line 166 of file coord.h.

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

◆ maxImgDiam

int Coordinator::maxImgDiam
private

The maximal image diameter encountered by the workers.

Definition at line 256 of file coord.h.

Referenced by Accept(), and Prepare().

◆ maxImgVol

int Coordinator::maxImgVol
private

The maximal image volume encountered by the workers.

Definition at line 259 of file coord.h.

Referenced by Accept(), and Prepare().

◆ maxIter

parCoord Coordinator::maxIter[paramDim]
private

The numbers of rectangular regions in each direction to iterate.

Definition at line 213 of file coord.h.

Referenced by Coordinator().

◆ morseDecComputed

int Coordinator::morseDecComputed
private

The total number of computed Morse decopositions.

Definition at line 228 of file coord.h.

Referenced by Accept(), and Prepare().

◆ morseDecPrefix

std::string Coordinator::morseDecPrefix
private

The file name prefix for cached compressed Morse decompositions.

Definition at line 196 of file coord.h.

Referenced by Coordinator(), and Prepare().

◆ morseDecReused

int Coordinator::morseDecReused
private

The total number of re-used Morse decompositions.

Definition at line 231 of file coord.h.

Referenced by Accept(), and Prepare().

◆ parityBits

parCoord Coordinator::parityBits[paramDim]
private

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

Definition at line 219 of file coord.h.

Referenced by Coordinator(), and Prepare().

◆ phaseSpacePrefix

std::string Coordinator::phaseSpacePrefix
private

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

Definition at line 189 of file coord.h.

Referenced by Coordinator(), and Prepare().

◆ previousBoxes

parCubes Coordinator::previousBoxes
private

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

Definition at line 243 of file coord.h.

Referenced by Prepare(), and readPreviousResults().

◆ procPrefix

std::string Coordinator::procPrefix
private

The file name prefix for saving post-processing information.

Definition at line 199 of file coord.h.

Referenced by Coordinator(), and Prepare().

◆ rectIterator

parRect* Coordinator::rectIterator
private

A rectangle which iterates the rectangular sets to send.

Definition at line 216 of file coord.h.

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

◆ sent

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

The data packs sent for processing to workers.

Definition at line 169 of file coord.h.

Referenced by Accept(), and Prepare().

◆ sentlen

int Coordinator::sentlen
private

The number of data packs currently being processed by workers.

Definition at line 172 of file coord.h.

Referenced by Accept(), and Prepare().

◆ sharePrefix

std::string Coordinator::sharePrefix
private

The file name prefix for saving Morse sets by workers.

Definition at line 185 of file coord.h.

Referenced by Coordinator(), and Prepare().

◆ skipIndices

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 176 of file coord.h.

Referenced by Prepare().

◆ subCoords

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

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

Definition at line 207 of file coord.h.

Referenced by Coordinator(), and Prepare().

◆ usingGraphsFile

bool Coordinator::usingGraphsFile
private

Is the graphs file in use?

Definition at line 144 of file coord.h.

Referenced by Accept(), and Coordinator().

◆ waitingCache

int Coordinator::waitingCache
private

The number of pre-cached indices waiting to complete.

Definition at line 156 of file coord.h.

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

◆ wrongIndexBoxes

parCubes Coordinator::wrongIndexBoxes
private

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

Definition at line 235 of file coord.h.

Referenced by Accept(), and Prepare().

◆ wrongIndices

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 247 of file coord.h.

Referenced by Accept().

◆ zeroIter

parCoord Coordinator::zeroIter[paramDim]
private

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

Definition at line 210 of file coord.h.

Referenced by Coordinator().


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