![]() |
SG++-Doxygen-Documentation
|
#include <MPIEnviroment.hpp>
Public Member Functions | |
bool | is_finished () |
Checks whether the queue has already finished. | |
size_t | receive_result (int &startid, T *partial_result) |
Wait for a result from any of the other workers, send a new workpackage and return said result. | |
SimpleQueue (size_t startindex, size_t workitem_count, size_t node_packagesize, MPI_Comm &comm, int commsize, bool verbose=false, bool prefetching=false) | |
Constructor for a simple queue. | |
virtual | ~SimpleQueue () |
Protected Attributes | |
MPI_Comm & | comm |
int | commsize |
MPI_Datatype | mpi_typ |
Datatyp for MPI_SEND and MPI_RECV, only supports float, double and int right now. | |
unsigned int | packagecount |
Number of all workpackages. | |
int | packageinfo [2] |
Array with for sending indices and packagesizes. | |
size_t | packagesize |
bool | prefetching |
Prefetching activated? | |
unsigned int | received_packageindex |
Number of received workapckages. | |
unsigned int * | secondary_indices |
Stores the current starting indices for each prefetched work package. | |
unsigned int | send_packageindex |
Number of sent workapckages. | |
size_t | startindex |
Start index for the entire problem chunk of this queue. | |
unsigned int * | startindices |
Stores the current starting indices for each work package. | |
bool | verbose |
size_t | workitem_count |
|
inline |
Constructor for a simple queue.
This constructor check whether there are enough packages for all subworkers (workers which receive workpackages from this queue). If there are not enough packages, the packagesize will be modified such that every worker receives at least 1 package (2 if prefetching is activated). This constructor will also already send the first workpackages with a blocking send so use with care!
startindex | Index where the chunk of the problem begins |
workitem_count | Number of subworkers |
node_packagesize | Prefered packagesize - will be modified if to small |
comm | Communicator to the subworkers |
commsize | Size of the communictor |
verbose | Verbosity on or off |
prefetching | Activates package prefetching if this parameter is true |
References sgpp::datadriven::clusteringmpi::SimpleQueue< T >::comm, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::commsize, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::mpi_typ, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::packagecount, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::packageinfo, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::packagesize, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::prefetching, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::received_packageindex, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::secondary_indices, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::send_packageindex, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::startindex, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::startindices, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::verbose, and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::workitem_count.
|
inlinevirtual |
|
inline |
Checks whether the queue has already finished.
References sgpp::datadriven::clusteringmpi::SimpleQueue< T >::packagecount, and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::received_packageindex.
Referenced by sgpp::datadriven::clusteringmpi::GraphCreationWorker::divide_workpackages(), and sgpp::datadriven::clusteringmpi::MPIWorkerPackageBase< T >::divide_workpackages().
|
inline |
Wait for a result from any of the other workers, send a new workpackage and return said result.
startid | Returns the starting index of the package result |
partial_result | Buffer containing the package result |
References sgpp::datadriven::clusteringmpi::SimpleQueue< T >::comm, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::mpi_typ, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::packagecount, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::packageinfo, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::packagesize, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::prefetching, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::received_packageindex, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::secondary_indices, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::send_packageindex, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::startindex, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::startindices, sgpp::datadriven::clusteringmpi::SimpleQueue< T >::verbose, and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::workitem_count.
Referenced by sgpp::datadriven::clusteringmpi::GraphCreationWorker::divide_workpackages(), and sgpp::datadriven::clusteringmpi::MPIWorkerPackageBase< T >::divide_workpackages().
|
protected |
|
protected |
|
protected |
Datatyp for MPI_SEND and MPI_RECV, only supports float, double and int right now.
Referenced by sgpp::datadriven::clusteringmpi::SimpleQueue< T >::receive_result(), and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::SimpleQueue().
|
protected |
Number of all workpackages.
Referenced by sgpp::datadriven::clusteringmpi::SimpleQueue< T >::is_finished(), sgpp::datadriven::clusteringmpi::SimpleQueue< T >::receive_result(), and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::SimpleQueue().
|
protected |
Array with for sending indices and packagesizes.
Referenced by sgpp::datadriven::clusteringmpi::SimpleQueue< T >::receive_result(), and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::SimpleQueue().
|
protected |
|
protected |
Prefetching activated?
Referenced by sgpp::datadriven::clusteringmpi::SimpleQueue< T >::receive_result(), and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::SimpleQueue().
|
protected |
Number of received workapckages.
Referenced by sgpp::datadriven::clusteringmpi::SimpleQueue< T >::is_finished(), sgpp::datadriven::clusteringmpi::SimpleQueue< T >::receive_result(), and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::SimpleQueue().
|
protected |
Stores the current starting indices for each prefetched work package.
Referenced by sgpp::datadriven::clusteringmpi::SimpleQueue< T >::receive_result(), sgpp::datadriven::clusteringmpi::SimpleQueue< T >::SimpleQueue(), and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::~SimpleQueue().
|
protected |
Number of sent workapckages.
Referenced by sgpp::datadriven::clusteringmpi::SimpleQueue< T >::receive_result(), and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::SimpleQueue().
|
protected |
Start index for the entire problem chunk of this queue.
Referenced by sgpp::datadriven::clusteringmpi::SimpleQueue< T >::receive_result(), and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::SimpleQueue().
|
protected |
Stores the current starting indices for each work package.
Referenced by sgpp::datadriven::clusteringmpi::SimpleQueue< T >::receive_result(), sgpp::datadriven::clusteringmpi::SimpleQueue< T >::SimpleQueue(), and sgpp::datadriven::clusteringmpi::SimpleQueue< T >::~SimpleQueue().
|
protected |
Referenced by python.uq.operations.forcePositivity.operationMakePositiveFast.OperationMakePositiveFast::addFullGridPoints(), python.uq.refinement.RefinementManager.RefinementManager::candidates(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGridCandidates::computeCandidates(), python.uq.operations.forcePositivity.findIntersections.IntersectionCandidates::findIntersections(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGridCandidates::getLocalMaxLevel(), python.uq.manager.ASGCUQManager.ASGCUQManager::learnDataWithoutTest(), python.uq.manager.ASGCUQManager.ASGCUQManager::learnDataWithTest(), python.uq.operations.forcePositivity.operationMakePositive.OperationMakePositive::makeCurrentNodalValuesPositive(), python.uq.operations.forcePositivity.operationMakePositive.OperationMakePositive::makePositive(), python.uq.operations.forcePositivity.operationMakePositiveFast.OperationMakePositiveFast::makePositive(), sgpp::datadriven::clusteringmpi::SimpleQueue< T >::receive_result(), python.uq.manager.ASGCUQManager.ASGCUQManager::recomputeStats(), python.uq.refinement.RefinementManager.RefinementManager::refineGrid(), sgpp::datadriven::clusteringmpi::SimpleQueue< T >::SimpleQueue(), and python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGridCandidates::splitFullGrids().
|
protected |