PlasCom2  1.0
XPACC Multi-physics simluation application
ParallelGlobalObj< CommunicatorType, StackType, ErrorType, ProfilerType > Class Template Reference

Detailed Description

template<typename CommunicatorType, typename StackType, typename ErrorType, typename ProfilerType>
class ix::global::ParallelGlobalObj< CommunicatorType, StackType, ErrorType, ProfilerType >

Definition at line 526 of file Global.H.

#include <Global.H>

Public Member Functions

 ParallelGlobalObj ()
 
 ParallelGlobalObj (GlobalType &inglob)
 
 ParallelGlobalObj (ParallelGlobalObj< CommunicatorType, StackType, ErrorType, ProfilerType > &pglobin)
 
 ParallelGlobalObj (const std::string &name)
 
 ParallelGlobalObj (const std::string &name, unsigned int id)
 
 ParallelGlobalObj (int narg, char **args)
 
 ParallelGlobalObj (int narg, char **args, CommunicatorType &incomm)
 
virtual int Init (const std::string &name, CommunicatorType &incomm)
 
virtual int Init (const std::string &name)
 
virtual int Init (const std::string &name, unsigned int id)
 
virtual int Init (int narg, char **args)
 
bool ProfilingBarriers ()
 
void EnableProfilingBarriers ()
 
void DisableProfilingBarriers ()
 
virtual void FunctionEntry (const StackType &stackentry)
 FunctionEntry updates the Stack as well as the Profiler. More...
 
virtual void FunctionExit (const StackType &stackentry)
 FunctionExit updates the Stack as well as the Profiler. More...
 
virtual int Rank ()
 
virtual int NProc ()
 
virtual int Finalize ()
 Finalizes the global object, and it's profiler object. More...
 
virtual CommunicatorTypeCommunicator ()
 
virtual ~ParallelGlobalObj ()
 
- Public Member Functions inherited from GlobalObj< StackType, ErrorType, ProfilerType >
 GlobalObj ()
 Default constructor. Profiling is OFF by default. More...
 
 GlobalObj (int narg, char **args)
 Default constructor. More...
 
 GlobalObj (GlobalObj< StackType, ErrorType, ProfilerType > &globin)
 Constructor with args. More...
 
 GlobalObj (const StackType &name)
 Constructor with args. More...
 
 GlobalObj (const StackType &name, int id)
 Constructor with args. More...
 
virtual int Init (const StackType &name)
 Initializes the global object and it's profiler object /// Initializes the global object and it's profiler object Profiling is ON by default if Init is invoked. More...
 
virtual int Init (const StackType &name, unsigned int id)
 Initializes the global object and it's profiler object Profiling is ON by default if Init is invoked. More...
 
virtual bool WriteProfiles ()
 Get state of enablement for writing profile files. More...
 
virtual bool WriteProfiles (bool yn)
 Enable or disable profile file writing. More...
 
virtual bool Profiling ()
 Get profiling state. More...
 
virtual bool Profiling (bool yn)
 Enable or disable profiling. More...
 
virtual void Report (std::ostream &ReportStream)
 Creates the final profiling report on the specified stream. More...
 
virtual void Register (const StackType &stackentry)
 Register will push to the Stack only. More...
 
virtual void DeRegister (const StackType &stackentry)
 DeRegister will pop from the stack only. More...
 
virtual void FunctionExitAll ()
 FunctionExitAll exits all from the Profiler only. More...
 
virtual void Error (const ErrorType &error)
 Pushes an error onto the error stack. More...
 
virtual void DumpErrors (std::ostream &Ostr)
 Dumps the errors themselves to the indicated stream. More...
 
virtual void DumpStack (std::ostream &Ostr)
 Dumps the code construct statck to the indicated stream. More...
 
virtual void DumpProfile (std::ostream &Ostr)
 Dumps the timing profile to the indicated stream. More...
 
bool DebugStreamReady ()
 Checks debug stream. More...
 
void SetDebugStream (std::ostream &dbstream)
 Sets the debug stream object. More...
 
std::ostream & DebugStream ()
 Gets the debug stream object. More...
 
std::ostream * DebugStreamPtr ()
 Gets the debug stream pointer. More...
 
bool ErrStreamReady ()
 Checks error stream. More...
 
void SetErrStream (std::ostream &dbstream)
 Sets the error stream object. More...
 
std::ostream & ErrStream ()
 Gets the error stream object. More...
 
std::ostream * ErrStreamPtr ()
 Gets the error stream pointer. More...
 
bool OutStreamReady ()
 Checks out stream. More...
 
void SetOutStream (std::ostream &outstream)
 Sets the stdout stream object. More...
 
std::ostream & OutStream ()
 Gets the stdout stream object. More...
 
std::ostream * OutStreamPtr ()
 Gets the stdout stream pointer. More...
 
void UnsetOutStream ()
 Sets outstream to NULL. More...
 
bool LogStreamReady ()
 Checks log stream. More...
 
void SetLogStream (std::ostream &logstream)
 Sets the stdout stream object. More...
 
std::ostream & LogStream ()
 Gets the log stream object. More...
 
std::ostream * LogStreamPtr ()
 Gets the log stream pointer. More...
 
void SetProfiler (ProfilerType &profiler)
 Sets the Profiler object. More...
 
virtual void SetName (const std::string &name)
 
virtual void ReName (const std::string &name)
 
virtual const std::string & Name ()
 
ProfilerTypeProfiler ()
 Gets the debug stream object. More...
 
void SetDebugLevel (unsigned char l)
 Sets the level of debugging. More...
 
unsigned char DebugLevel ()
 Returns the debugging level. More...
 
void SetVerbLevel (unsigned char l)
 
unsigned char VerbLevel ()
 Returns the verbosity level. More...
 
void SetLogLevel (unsigned char l)
 
unsigned char LogLevel ()
 Returns the verbosity level. More...
 
void DeSyncIO ()
 DeSync IO - relinquish control over IO, revert to standard. More...
 
void SyncIO ()
 Syncronize IO - assume control over IO, using established streams. More...
 
virtual int ForceOut (const std::string &outstr, unsigned char inlev=1)
 
virtual int StdOut (const std::string &outstr, unsigned char inlev=1)
 
virtual int ErrOut (const std::string &outstr)
 
virtual int DebugOut (const std::string &outstr, int inlev=1)
 
virtual int LogOut (const std::string &outstr, int inlev=0)
 
virtual ~GlobalObj ()
 Destructor. More...
 

Protected Attributes

bool profilingBarrier
 
CommunicatorType globalCommunicator
 
- Protected Attributes inherited from GlobalObj< StackType, ErrorType, ProfilerType >
std::ostream * _DebugStream
 DebugStream is useful for parallel programs that cannot stream debugging information to the screen. More...
 
std::ostream * _OutStream
 
std::ostream * _LogStream
 
std::ostream * _ErrStream
 
ProfilerType_Profiler
 This is a placeholder for a generic profiling tool. More...
 

Private Types

typedef GlobalObj< StackType, ErrorType, ProfilerTypeGlobalType
 
Inheritance diagram for ParallelGlobalObj< CommunicatorType, StackType, ErrorType, ProfilerType >:
Collaboration diagram for ParallelGlobalObj< CommunicatorType, StackType, ErrorType, ProfilerType >:

Member Typedef Documentation

◆ GlobalType

typedef GlobalObj<StackType,ErrorType,ProfilerType> GlobalType
private

Definition at line 528 of file Global.H.

Constructor & Destructor Documentation

◆ ParallelGlobalObj() [1/7]

ParallelGlobalObj ( )
inline

Definition at line 533 of file Global.H.

◆ ParallelGlobalObj() [2/7]

ParallelGlobalObj ( GlobalType inglob)
inline

Definition at line 538 of file Global.H.

◆ ParallelGlobalObj() [3/7]

ParallelGlobalObj ( ParallelGlobalObj< CommunicatorType, StackType, ErrorType, ProfilerType > &  pglobin)
inline

Definition at line 543 of file Global.H.

References ParallelGlobalObj< CommunicatorType, StackType, ErrorType, ProfilerType >::globalCommunicator, and CommunicatorObject::Initialize().

Here is the call graph for this function:

◆ ParallelGlobalObj() [4/7]

ParallelGlobalObj ( const std::string &  name)
inline

Definition at line 550 of file Global.H.

◆ ParallelGlobalObj() [5/7]

ParallelGlobalObj ( const std::string &  name,
unsigned int  id 
)
inline

Definition at line 557 of file Global.H.

◆ ParallelGlobalObj() [6/7]

ParallelGlobalObj ( int  narg,
char **  args 
)
inline

Definition at line 563 of file Global.H.

References GlobalObj< StackType, ErrorType, ProfilerType >::Init().

Here is the call graph for this function:

◆ ParallelGlobalObj() [7/7]

ParallelGlobalObj ( int  narg,
char **  args,
CommunicatorType incomm 
)
inline

Definition at line 571 of file Global.H.

References GlobalObj< StackType, ErrorType, ProfilerType >::Init(), and ix::util::stripdirs().

Here is the call graph for this function:

◆ ~ParallelGlobalObj()

virtual ~ParallelGlobalObj ( )
inlinevirtual

Definition at line 630 of file Global.H.

References GlobalObj< StackType, ErrorType, ProfilerType >::Finalize().

Here is the call graph for this function:

Member Function Documentation

◆ Communicator()

virtual CommunicatorType& Communicator ( )
inlinevirtual

Definition at line 629 of file Global.H.

◆ DisableProfilingBarriers()

void DisableProfilingBarriers ( )
inline

Definition at line 603 of file Global.H.

◆ EnableProfilingBarriers()

void EnableProfilingBarriers ( )
inline

Definition at line 602 of file Global.H.

◆ Finalize()

virtual int Finalize ( )
inlinevirtual

Finalizes the global object, and it's profiler object.

Reimplemented from GlobalObj< StackType, ErrorType, ProfilerType >.

Reimplemented in Program< TestGlobal, TestComLine >, parallelprogram, and mpiprogram< ComLineType >.

Definition at line 622 of file Global.H.

References CommunicatorObject::Finalize(), and GlobalObj< StackType, ErrorType, ProfilerType >::Finalize().

Referenced by mpiprogram< ComLineType >::Finalize(), TestGrid_PBS_IntegratedHalo(), and TestHDF5PBSGridIO().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FunctionEntry()

virtual void FunctionEntry ( const StackType &  stackentry)
inlinevirtual

FunctionEntry updates the Stack as well as the Profiler.

Reimplemented from GlobalObj< StackType, ErrorType, ProfilerType >.

Definition at line 604 of file Global.H.

References CommunicatorObject::Barrier(), and GlobalObj< StackType, ErrorType, ProfilerType >::FunctionEntry().

Referenced by rk4advancer< DomainType >::AdvanceDomain(), application::RunApplication(), application::RunMaxwellSolver(), and application::RunPlasCom2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FunctionExit()

virtual void FunctionExit ( const StackType &  stackentry)
inlinevirtual

FunctionExit updates the Stack as well as the Profiler.

Reimplemented from GlobalObj< StackType, ErrorType, ProfilerType >.

Definition at line 609 of file Global.H.

References CommunicatorObject::Barrier(), and GlobalObj< StackType, ErrorType, ProfilerType >::FunctionExit().

Referenced by rk4advancer< DomainType >::AdvanceDomain(), application::RunApplication(), application::RunMaxwellSolver(), and application::RunPlasCom2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Init() [1/4]

◆ Init() [2/4]

virtual int Init ( const std::string &  name)
inlinevirtual

Definition at line 585 of file Global.H.

◆ Init() [3/4]

virtual int Init ( const std::string &  name,
unsigned int  id 
)
inlinevirtual

Definition at line 589 of file Global.H.

◆ Init() [4/4]

virtual int Init ( int  narg,
char **  args 
)
inlinevirtual

Definition at line 593 of file Global.H.

References CommunicatorObject::Initialize(), CommunicatorObject::Rank(), and ix::util::stripdirs().

Here is the call graph for this function:

◆ NProc()

virtual int NProc ( )
inlinevirtual

Definition at line 618 of file Global.H.

References CommunicatorObject::Size().

Here is the call graph for this function:

◆ ProfilingBarriers()

bool ProfilingBarriers ( )
inline

Definition at line 601 of file Global.H.

◆ Rank()

virtual int Rank ( )
inlinevirtual

Definition at line 614 of file Global.H.

References CommunicatorObject::Rank().

Here is the call graph for this function:

Member Data Documentation

◆ globalCommunicator

◆ profilingBarrier

bool profilingBarrier
protected

Definition at line 530 of file Global.H.

Referenced by mpiglobal::mpiglobal().


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