The Conley-Morse Graphs Software
|
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>
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< datapack > | sent |
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< parCoord > | subCoords [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... | |
parRect * | rectIterator |
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... | |
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.
|
inline |
The complete constructor of a coordinator.
Definition at line 268 of file coord.h.
References cacheCoord, coordLeftMin, coordRightMax, cubesPrefix, custom::difference::finalDepth, finalPrefix, graphsFile, graphsPrefix, interFile, mapOptFileName, mapOptimization, mapOptPrefix, maxCache, maxCurrent, maxIter, morseDecPrefix, custom::difference::paramDim, custom::difference::paramSubdiv, parityBits, phaseSpacePrefix, procPrefix, readPreviousResults(), rectIterator, custom::difference::refineDepth, sharePrefix, showConfigInfo(), custom::difference::spaceDim, subCoords, subRectangles(), usingGraphsFile, waitingCache, and zeroIter.
|
inline |
The destructor.
Definition at line 530 of file coord.h.
References interFile, mapOptFileName, mapOptimization, and rectIterator.
|
inlineprivate |
A function for accepting results by the coordinator.
Definition at line 912 of file coord.h.
References coord2str(), coordLeftMin, coordRightMax, current, currentCache, fileExists(), graphsFile, graphsPrefix, graphsWritten, interFile, mapOptFileName, mapOptimization, matchArray, maxCache, maxCurrent, maxImgDiam, maxImgVol, morseDecComputed, morseDecReused, custom::difference::paramDim, sent, sentlen, custom::difference::spaceDim, usingGraphsFile, waitingCache, writeDotGraph(), wrongIndexBoxes, and wrongIndices.
|
inlineprivate |
A function for preparing data by the coordinator.
Definition at line 552 of file coord.h.
References allSent, cacheCoord, computeParam(), controlNumber, coord2str(), coordLeftMin, coordRightMax, cubesPrefix, current, currentCache, fileExists(), finalPrefix, fullPhaseSpace, graphsPrefix, interFile, mapOptimization, mapOptPrefix, matchArray, maxCache, maxCurrent, maxImgDiam, maxImgVol, morseDecComputed, morseDecPrefix, morseDecReused, custom::difference::paramCount, custom::difference::paramDim, custom::difference::paramSubdiv, parityBits, phaseSpacePrefix, previousBoxes, procPrefix, rectIterator, sent, sentlen, sharePrefix, showRealCoords(), skipIndices, custom::difference::spaceDim, subCoords, waitingCache, and wrongIndexBoxes.
|
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().
|
inlineprivate |
|
private |
|
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().
|
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().
|
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().
|
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().
|
private |
|
private |
|
private |
The file name prefix for saving the final result.
Definition at line 182 of file coord.h.
Referenced by Coordinator(), and Prepare().
|
private |
|
private |
A file to append the computed Conley-Morse graphs to.
Definition at line 147 of file coord.h.
Referenced by Accept(), and Coordinator().
|
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().
|
private |
|
private |
A file to append the results to.
Definition at line 135 of file coord.h.
Referenced by Accept(), Coordinator(), Prepare(), and ~Coordinator().
|
private |
A file to append the optimization results to.
Definition at line 138 of file coord.h.
Referenced by Accept(), Coordinator(), and ~Coordinator().
|
private |
Map optimization data for all the parameters.
Definition at line 262 of file coord.h.
Referenced by Accept(), Coordinator(), Prepare(), and ~Coordinator().
|
private |
A file name prefix for optimization data for each parameter.
Definition at line 141 of file coord.h.
Referenced by Coordinator(), and Prepare().
|
private |
The array of matching between parameter boxes.
Definition at line 225 of file coord.h.
Referenced by Accept(), Prepare(), and readPreviousResults().
|
private |
The number of indices to pre-cache.
Definition at line 153 of file coord.h.
Referenced by Accept(), Coordinator(), and Prepare().
|
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().
|
private |
|
private |
|
private |
The numbers of rectangular regions in each direction to iterate.
Definition at line 213 of file coord.h.
Referenced by Coordinator().
|
private |
|
private |
The file name prefix for cached compressed Morse decompositions.
Definition at line 196 of file coord.h.
Referenced by Coordinator(), and Prepare().
|
private |
|
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().
|
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().
|
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().
|
private |
The file name prefix for saving post-processing information.
Definition at line 199 of file coord.h.
Referenced by Coordinator(), and Prepare().
|
private |
A rectangle which iterates the rectangular sets to send.
Definition at line 216 of file coord.h.
Referenced by Coordinator(), Prepare(), and ~Coordinator().
|
private |
|
private |
|
private |
The file name prefix for saving Morse sets by workers.
Definition at line 185 of file coord.h.
Referenced by Coordinator(), and Prepare().
|
private |
|
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().
|
private |
Is the graphs file in use?
Definition at line 144 of file coord.h.
Referenced by Accept(), and Coordinator().
|
private |
The number of pre-cached indices waiting to complete.
Definition at line 156 of file coord.h.
Referenced by Accept(), Coordinator(), and Prepare().
|
private |
|
private |
|
private |
The minimal corner of the rectangle to iterate (zero coords).
Definition at line 210 of file coord.h.
Referenced by Coordinator().