casa
5.7.0-16
|
Class which provides an interface to the parallelization infrastructure. More...
#include <Applicator.h>
Public Types | |
enum | Status { FREE, ASSIGNED } |
Enum to define the process status table. More... | |
enum | Signals { STOP, DONE } |
Recognized signals. More... | |
Private Member Functions | |
void | loop () |
Executed by worker process waiting for an assigned task. More... | |
void | defineAlgorithms () |
Fill algorithm map. More... | |
void | setupProcStatus () |
Utility functions for the current list of processes, and their status. More... | |
casacore::Int | findFreeProc (casacore::Bool &lastOne) |
Private Attributes | |
PTransport * | comm |
Pointer to the parallel transport. More... | |
std::map< casacore::String, casacore::Int > | algorithmIds |
casacore::Map of known algorithm names and id. More... | |
std::map< casacore::Int, Algorithm * > | knownAlgorithms |
casacore::Int | LastID |
ID for the last Algorithm defined. More... | |
casacore::Bool | usedAllThreads |
true if no more processes are free More... | |
casacore::Bool | serial |
true if executing in serial More... | |
casacore::Int | nProcs |
Number of processes. More... | |
casacore::Vector< casacore::Int > | procStatus |
Process status list. More... | |
Class which provides an interface to the parallelization infrastructure.
Internal
Applies or controls the execution of parallelized algorithms.
The Applicator class provides the interface to parallel communication. It holds the parallel transport layer, and controls the execution of parallelized algorithms.
To provide a simple programming interface to parallelization, and to encapsulate the transport layer and parallel process control.
Definition at line 88 of file Applicator.h.
Enum to define the process status table.
Enumerator | |
---|---|
FREE | |
ASSIGNED |
Definition at line 91 of file Applicator.h.
casa::Applicator::Applicator | ( | ) |
Default constructor, and destructor.
casa::Applicator::~Applicator | ( | ) |
void casa::Applicator::apply | ( | Algorithm & | a | ) |
Execute an algorithm directly.
|
private |
Fill algorithm map.
void casa::Applicator::done | ( | ) |
Signal that a worker process is done.
Referenced by casa::Algorithm::apply().
|
private |
|
inline |
Definition at line 146 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 147 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 148 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 149 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 150 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 151 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 152 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 153 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 154 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 155 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 156 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 157 of file Applicator.h.
References comm, and casa::PTransport::get().
|
inline |
Definition at line 158 of file Applicator.h.
References comm, and casa::PTransport::get().
void casa::Applicator::init | ( | casacore::Int | argc, |
casacore::Char * | argv[] | ||
) |
Initialization (includes parallel transport initialization)
void casa::Applicator::initThreads | ( | casacore::Int | argc, |
casacore::Char * | argv[] | ||
) |
void casa::Applicator::initThreads | ( | ) |
casacore::Bool casa::Applicator::isController | ( | ) |
Status functions to indicate whether this Applicator is executing as a controller or worker process.
|
inline |
casacore::Bool casa::Applicator::isWorker | ( | ) |
|
private |
Executed by worker process waiting for an assigned task.
casacore::Bool casa::Applicator::nextAvailProcess | ( | Algorithm & | a, |
casacore::Int & | rank | ||
) |
Assign the next free worker process to a specified Algorithm.
casacore::Int casa::Applicator::nextProcessDone | ( | Algorithm & | a, |
casacore::Bool & | allDone | ||
) |
Return the rank of the next process to complete the specified Algorithm.
|
inline |
|
inline |
Put and get methods to be executed on the parallel transport layer.
Definition at line 132 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 133 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 134 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 135 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 136 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 137 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 138 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 139 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 140 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 141 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 142 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 143 of file Applicator.h.
References comm, and casa::PTransport::put().
|
inline |
Definition at line 144 of file Applicator.h.
References comm, and casa::PTransport::put().
|
private |
Utility functions for the current list of processes, and their status.
|
private |
|
private |
Pointer to the parallel transport.
Definition at line 158 of file Applicator.h.
|
private |
Definition at line 166 of file Applicator.h.
|
private |
ID for the last Algorithm defined.
Definition at line 169 of file Applicator.h.
|
private |
|
private |
Process status list.
Definition at line 181 of file Applicator.h.
|
private |
|
private |
true if no more processes are free
Definition at line 172 of file Applicator.h.