Geant4  10.02.p02
G4VUserMPIrunMerger Class Referenceabstract

#include <G4VUserMPIrunMerger.hh>

+ Inheritance diagram for G4VUserMPIrunMerger:
+ Collaboration diagram for G4VUserMPIrunMerger:

Classes

struct  const_registered_data
 
struct  registered_data
 

Public Member Functions

 G4VUserMPIrunMerger ()
 
 G4VUserMPIrunMerger (const G4Run *aRun, G4int destination=G4MPImanager::kRANK_MASTER, G4int verbosity=0)
 
virtual ~G4VUserMPIrunMerger ()
 
void SetRun (G4Run *r)
 
void SetDestinationRank (G4int i)
 
void SetVerbosity (G4int ver)
 
virtual void Merge ()
 

Protected Member Functions

virtual void Pack ()=0
 
virtual G4RunUnPack ()=0
 
void InputUserData (void *input_data, const MPI::Datatype &dt, int count)
 
void OutputUserData (void *input_data, const MPI::Datatype &dt, int count)
 
void SetupOutputBuffer (char *buff, G4int size, G4int position)
 
void DestroyBuffer ()
 
G4int GetPosition () const
 
char * GetBuffer () const
 
G4int GetBufferSize () const
 
void Send (const unsigned int destination)
 
void Receive (const unsigned int source)
 

Private Attributes

char * outputBuffer
 
G4int outputBufferSize
 
G4int outputBufferPosition
 
G4bool ownsBuffer
 
unsigned int destinationRank
 
G4Runrun
 
unsigned int commSize
 
MPI::Intracomm COMM_G4COMMAND_
 
G4int verbose
 
long bytesSent
 
std::vector
< const_registered_data
input_userdata
 
std::vector< registered_dataoutput_userdata
 

Detailed Description

Definition at line 32 of file G4VUserMPIrunMerger.hh.

Constructor & Destructor Documentation

G4VUserMPIrunMerger::G4VUserMPIrunMerger ( )
G4VUserMPIrunMerger::G4VUserMPIrunMerger ( const G4Run aRun,
G4int  destination = G4MPImanager::kRANK_MASTER,
G4int  verbosity = 0 
)

Definition at line 33 of file G4VUserMPIrunMerger.cc.

virtual G4VUserMPIrunMerger::~G4VUserMPIrunMerger ( )
inlinevirtual

Definition at line 38 of file G4VUserMPIrunMerger.hh.

References DestroyBuffer(), and ownsBuffer.

+ Here is the call graph for this function:

Member Function Documentation

void G4VUserMPIrunMerger::DestroyBuffer ( )
inlineprotected

Definition at line 63 of file G4VUserMPIrunMerger.hh.

References outputBuffer, outputBufferPosition, outputBufferSize, and ownsBuffer.

Referenced by Send(), and ~G4VUserMPIrunMerger().

+ Here is the caller graph for this function:

char* G4VUserMPIrunMerger::GetBuffer ( ) const
inlineprotected

Definition at line 72 of file G4VUserMPIrunMerger.hh.

References outputBuffer.

G4int G4VUserMPIrunMerger::GetBufferSize ( ) const
inlineprotected

Definition at line 73 of file G4VUserMPIrunMerger.hh.

References outputBufferSize.

G4int G4VUserMPIrunMerger::GetPosition ( ) const
inlineprotected

Definition at line 71 of file G4VUserMPIrunMerger.hh.

References outputBufferPosition.

void G4VUserMPIrunMerger::InputUserData ( void *  input_data,
const MPI::Datatype &  dt,
int  count 
)
inlineprotected

Definition at line 49 of file G4VUserMPIrunMerger.hh.

References input_userdata.

Referenced by RunMerger::Pack(), and Send().

+ Here is the caller graph for this function:

void G4VUserMPIrunMerger::Merge ( )
virtual

Definition at line 137 of file G4VUserMPIrunMerger.cc.

References bytesSent, COMM_G4COMMAND_, commSize, destinationRank, DMSG, G4cout, G4endl, G4mpi::Merge(), Receive(), Send(), G4INCL::CrossSections::total(), and verbose.

Referenced by RunActionMaster::EndOfRunAction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VUserMPIrunMerger::OutputUserData ( void *  input_data,
const MPI::Datatype &  dt,
int  count 
)
inlineprotected

Definition at line 52 of file G4VUserMPIrunMerger.hh.

References output_userdata.

Referenced by Receive(), and RunMerger::UnPack().

+ Here is the caller graph for this function:

virtual void G4VUserMPIrunMerger::Pack ( )
protectedpure virtual

Implemented in G4MPIrunMerger, and RunMerger.

Referenced by Send().

+ Here is the caller graph for this function:

void G4VUserMPIrunMerger::Receive ( const unsigned int  source)
protected

Definition at line 87 of file G4VUserMPIrunMerger.cc.

References buffer, COMM_G4COMMAND_, DMSG, G4Run::GetNumberOfEvent(), G4FFGEnumerations::INT, G4MPImanager::kTAG_RUN, G4Run::Merge(), output_userdata, outputBuffer, outputBufferPosition, outputBufferSize, OutputUserData(), ownsBuffer, G4Run::RecordEvent(), run, SetupOutputBuffer(), Status(), and UnPack().

Referenced by Merge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VUserMPIrunMerger::Send ( const unsigned int  destination)
protected

Definition at line 46 of file G4VUserMPIrunMerger.cc.

References buffer, bytesSent, COMM_G4COMMAND_, DestroyBuffer(), DMSG, G4Run::GetNumberOfEvent(), input_userdata, InputUserData(), G4FFGEnumerations::INT, G4MPImanager::kTAG_RUN, outputBuffer, outputBufferPosition, outputBufferSize, ownsBuffer, Pack(), run, and SetupOutputBuffer().

Referenced by Merge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VUserMPIrunMerger::SetDestinationRank ( G4int  i)
inline

Definition at line 40 of file G4VUserMPIrunMerger.hh.

References destinationRank.

void G4VUserMPIrunMerger::SetRun ( G4Run r)
inline

Definition at line 39 of file G4VUserMPIrunMerger.hh.

References run.

void G4VUserMPIrunMerger::SetupOutputBuffer ( char *  buff,
G4int  size,
G4int  position 
)
inlineprotected

Definition at line 58 of file G4VUserMPIrunMerger.hh.

References outputBuffer, outputBufferPosition, outputBufferSize, and position.

Referenced by Receive(), and Send().

+ Here is the caller graph for this function:

void G4VUserMPIrunMerger::SetVerbosity ( G4int  ver)
inline

Definition at line 41 of file G4VUserMPIrunMerger.hh.

References verbose.

Referenced by RunActionMaster::EndOfRunAction().

+ Here is the caller graph for this function:

virtual G4Run* G4VUserMPIrunMerger::UnPack ( )
protectedpure virtual

Implemented in G4MPIrunMerger, and RunMerger.

Referenced by Receive().

+ Here is the caller graph for this function:

Member Data Documentation

long G4VUserMPIrunMerger::bytesSent
private

Definition at line 87 of file G4VUserMPIrunMerger.hh.

Referenced by Merge(), and Send().

MPI::Intracomm G4VUserMPIrunMerger::COMM_G4COMMAND_
private

Definition at line 85 of file G4VUserMPIrunMerger.hh.

Referenced by Merge(), Receive(), and Send().

unsigned int G4VUserMPIrunMerger::commSize
private

Definition at line 84 of file G4VUserMPIrunMerger.hh.

Referenced by Merge().

unsigned int G4VUserMPIrunMerger::destinationRank
private

Definition at line 82 of file G4VUserMPIrunMerger.hh.

Referenced by Merge(), and SetDestinationRank().

std::vector<const_registered_data> G4VUserMPIrunMerger::input_userdata
private

Definition at line 99 of file G4VUserMPIrunMerger.hh.

Referenced by InputUserData(), and Send().

std::vector<registered_data> G4VUserMPIrunMerger::output_userdata
private

Definition at line 109 of file G4VUserMPIrunMerger.hh.

Referenced by OutputUserData(), and Receive().

char* G4VUserMPIrunMerger::outputBuffer
private

Definition at line 78 of file G4VUserMPIrunMerger.hh.

Referenced by DestroyBuffer(), GetBuffer(), Receive(), Send(), and SetupOutputBuffer().

G4int G4VUserMPIrunMerger::outputBufferPosition
private

Definition at line 80 of file G4VUserMPIrunMerger.hh.

Referenced by DestroyBuffer(), GetPosition(), Receive(), Send(), and SetupOutputBuffer().

G4int G4VUserMPIrunMerger::outputBufferSize
private

Definition at line 79 of file G4VUserMPIrunMerger.hh.

Referenced by DestroyBuffer(), GetBufferSize(), Receive(), Send(), and SetupOutputBuffer().

G4bool G4VUserMPIrunMerger::ownsBuffer
private

Definition at line 81 of file G4VUserMPIrunMerger.hh.

Referenced by DestroyBuffer(), Receive(), Send(), and ~G4VUserMPIrunMerger().

G4Run* G4VUserMPIrunMerger::run
private

Definition at line 83 of file G4VUserMPIrunMerger.hh.

Referenced by Receive(), Send(), and SetRun().

G4int G4VUserMPIrunMerger::verbose
private

Definition at line 86 of file G4VUserMPIrunMerger.hh.

Referenced by Merge(), and SetVerbosity().


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