Public Member Functions | Private Member Functions | Private Attributes | Friends

LibGeoDecomp::RemoteSteererHelpers::Pipe Class Reference

The purpose of the Pipe is to forward steering data between the connection node and the execution nodes. More...

#include <pipe.h>

Collaboration diagram for LibGeoDecomp::RemoteSteererHelpers::Pipe:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

LibGeoDecomp::RemoteSteererHelpers::Pipe::Pipe ( int  root = 0,
MPI_Comm  communicator = MPI_COMM_WORLD 
) [inline, explicit]

Member Function Documentation

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]
void LibGeoDecomp::RemoteSteererHelpers::Pipe::broadcastSteeringRequests (  )  [inline, private]
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]
void LibGeoDecomp::RemoteSteererHelpers::Pipe::waitForFeedback ( std::size_t  lines = 1  )  [inline]

Friends And Related Function Documentation

friend class PipeTest [friend]

Member Data Documentation

boost::condition_variable LibGeoDecomp::RemoteSteererHelpers::Pipe::signal [private]

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