The purpose of the Pipe is to forward steering data between the connection node and the execution nodes. More...
#include <pipe.h>
Public Member Functions | |
Pipe (int root=0, MPI_Comm communicator=MPI_COMM_WORLD) | |
void | addSteeringRequest (const std::string &request) |
void | addSteeringFeedback (const std::string &feedback) |
StringVec | retrieveSteeringRequests () |
StringVec | copySteeringRequestsQueue () |
StringVec | retrieveSteeringFeedback () |
StringVec | copySteeringFeedback () |
void | sync () |
void | waitForFeedback (std::size_t lines=1) |
Private Member Functions | |
void | broadcastSteeringRequests () |
void | moveSteeringFeedbackToRoot () |
Will move steering requests from the compute nodes to the root where it can then be forwarded to the user. | |
Private Attributes | |
boost::mutex | mutex |
boost::condition_variable | signal |
StringVec | steeringRequestsQueue |
StringVec | steeringRequests |
StringVec | steeringFeedback |
MPILayer | mpiLayer |
int | root |
Friends | |
class | PipeTest |
The purpose of the Pipe is to forward steering data between the connection node and the execution nodes.
This forwarding is done asynchronously as Actions from the connection node run in a seperate thread while Handlers are run by the RemoteSteerer, which in turn is triggered by the Simulator. The Pipe also manages scattering/gathering of the data via MPI, which is essentially a 1-n operation. The external interface is thread-safe.
LibGeoDecomp::RemoteSteererHelpers::Pipe::Pipe | ( | int | root = 0 , |
|
MPI_Comm | communicator = MPI_COMM_WORLD | |||
) | [inline, explicit] |
void LibGeoDecomp::RemoteSteererHelpers::Pipe::addSteeringFeedback | ( | const std::string & | feedback | ) | [inline] |
References LOG, mutex, signal, and steeringFeedback.
void LibGeoDecomp::RemoteSteererHelpers::Pipe::addSteeringRequest | ( | const std::string & | request | ) | [inline] |
References LOG, mutex, and steeringRequestsQueue.
Referenced by LibGeoDecomp::RemoteSteererHelpers::PassThroughAction< CELL_TYPE >::operator()().
void LibGeoDecomp::RemoteSteererHelpers::Pipe::broadcastSteeringRequests | ( | ) | [inline, private] |
References LibGeoDecomp::append(), LibGeoDecomp::MPILayer::broadcast(), LibGeoDecomp::MPILayer::broadcastVector(), LOG, mpiLayer, LibGeoDecomp::MPILayer::rank(), root, steeringRequests, and steeringRequestsQueue.
Referenced by sync().
StringVec LibGeoDecomp::RemoteSteererHelpers::Pipe::copySteeringFeedback | ( | ) | [inline] |
References LOG, mutex, and steeringFeedback.
StringVec LibGeoDecomp::RemoteSteererHelpers::Pipe::copySteeringRequestsQueue | ( | ) | [inline] |
References LOG, mutex, and steeringRequestsQueue.
void LibGeoDecomp::RemoteSteererHelpers::Pipe::moveSteeringFeedbackToRoot | ( | ) | [inline, private] |
Will move steering requests from the compute nodes to the root where it can then be forwarded to the user.
References LibGeoDecomp::MPILayer::gather(), LibGeoDecomp::MPILayer::gatherV(), LOG, mpiLayer, LibGeoDecomp::MPILayer::rank(), root, signal, steeringFeedback, and LibGeoDecomp::sum().
Referenced by sync().
StringVec LibGeoDecomp::RemoteSteererHelpers::Pipe::retrieveSteeringFeedback | ( | ) | [inline] |
References LOG, mutex, and steeringFeedback.
StringVec LibGeoDecomp::RemoteSteererHelpers::Pipe::retrieveSteeringRequests | ( | ) | [inline] |
References LOG, mutex, and steeringRequests.
void LibGeoDecomp::RemoteSteererHelpers::Pipe::sync | ( | ) | [inline] |
References broadcastSteeringRequests(), LOG, moveSteeringFeedbackToRoot(), and mutex.
void LibGeoDecomp::RemoteSteererHelpers::Pipe::waitForFeedback | ( | std::size_t | lines = 1 |
) | [inline] |
References LOG, mutex, signal, and steeringFeedback.
Referenced by LibGeoDecomp::RemoteSteererHelpers::WaitAction< CELL_TYPE >::operator()().
friend class PipeTest [friend] |
Referenced by broadcastSteeringRequests(), and moveSteeringFeedbackToRoot().
boost::mutex LibGeoDecomp::RemoteSteererHelpers::Pipe::mutex [private] |
int LibGeoDecomp::RemoteSteererHelpers::Pipe::root [private] |
Referenced by broadcastSteeringRequests(), and moveSteeringFeedbackToRoot().
boost::condition_variable LibGeoDecomp::RemoteSteererHelpers::Pipe::signal [private] |
Referenced by addSteeringFeedback(), moveSteeringFeedbackToRoot(), and waitForFeedback().
Referenced by broadcastSteeringRequests(), and retrieveSteeringRequests().
Referenced by addSteeringRequest(), broadcastSteeringRequests(), and copySteeringRequestsQueue().