Loading...
Searching...
No Matches
parProfiling Class Reference

Simple (simplistic) mpi-profiling. More...

#include <parProfiling.H>

Inheritance diagram for parProfiling:
Collaboration diagram for parProfiling:

Public Member Functions

 parProfiling (const parProfiling &)=delete
 No copy construct.
void operator= (const parProfiling &)=delete
 No copy assignment.
 TypeName ("parProfiling")
 Runtime type information.
 parProfiling (const word &name, const Time &runTime, const dictionary &dict)
 Construct from name, Time and dictionary. Enables profilingPstream.
virtual ~parProfiling ()
 Destructor. Disables profilingPstream.
void report ()
 Report the current profiling information.
virtual bool execute ()
 Execute the function-object operations.
virtual bool write ()
 Write the function-object results (no-op).
virtual bool end ()
 Disables profilingPstream.
Public Member Functions inherited from functionObject
 declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict))
 functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix)
 Construct from components.
autoPtr< functionObjectclone () const
 Return clone.
virtual ~functionObject ()=default
 Destructor.
virtual const wordtype () const =0
 Runtime type information.
const wordname () const noexcept
 Return the name of this functionObject.
bool useNamePrefix () const noexcept
 Return the flag for adding a scoping name prefix.
bool useNamePrefix (bool on) noexcept
 Modify the flag for adding a scoping name prefix.
virtual bool read (const dictionary &dict)
 Read and set the function object if its data have changed.
virtual bool execute (const label subIndex)
 Execute using the specified subIndex.
virtual bool adjustTimeStep ()
 Called at the end of Time::adjustDeltaT() if adjustTime is true.
virtual bool filesModified () const
 Did any file get changed during execution?
virtual void updateMesh (const mapPolyMesh &mpm)
 Update for changes of mesh.
virtual void movePoints (const polyMesh &mesh)
 Update for changes of mesh.

Additional Inherited Members

Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &runTime, const dictionary &dict)
 Select from dictionary, based on its "type" entry.
Public Attributes inherited from functionObject
bool log
 Flag to write log into Info.
Static Public Attributes inherited from functionObject
static int debug
 Flag to execute debug content.
static bool postProcess
 Global post-processing mode switch.
static bool defaultUseNamePrefix
 Global default for useNamePrefix.
static word outputPrefix
 Directory prefix.
Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 Return a scoped (prefixed) name.

Detailed Description

Simple (simplistic) mpi-profiling.

Usage
Minimal example by using system/controlDict.functions:
profilingFO
{
    // Mandatory entries
    type                parProfiling;
    libs                (utilityFunctionObjects);

    // Optional entries
    detail              <int>;  // 0;

    // Inherited entries
    // Report stats on exit only (instead of every time step)
    executeControl  onEnd;
    writeControl    none;
    ...
}

where the entries mean:

Property Description Type Reqd Deflt
type Type name: parProfiling word yes -
libs Library name: utilityFunctionObjects word yes -
detail The reporting level int no 0

The inherited entries are elaborated in:

Source files

Definition at line 106 of file parProfiling.H.

Constructor & Destructor Documentation

◆ parProfiling() [1/2]

parProfiling ( const parProfiling & )
delete

No copy construct.

References parProfiling().

Referenced by operator=(), and parProfiling().

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

◆ parProfiling() [2/2]

parProfiling ( const word & name,
const Time & runTime,
const dictionary & dict )

Construct from name, Time and dictionary. Enables profilingPstream.

Definition at line 47 of file parProfiling.C.

References dict, profilingPstream::enable(), functionObject::functionObject(), functionObject::name(), and runTime.

Here is the call graph for this function:

◆ ~parProfiling()

~parProfiling ( )
virtual

Destructor. Disables profilingPstream.

Definition at line 64 of file parProfiling.C.

References profilingPstream::disable().

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

void operator= ( const parProfiling & )
delete

No copy assignment.

References parProfiling().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "parProfiling" )

Runtime type information.

References dict, functionObject::name(), and runTime.

Here is the call graph for this function:

◆ report()

void report ( )

Report the current profiling information.

Definition at line 72 of file parProfiling.C.

References Foam::Info, Foam::nl, UPstream::nProcs(), UPstream::parRun(), and profilingPstream::report().

Referenced by execute().

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

◆ execute()

bool execute ( )
virtual

Execute the function-object operations.

Implements functionObject.

Definition at line 82 of file parProfiling.C.

References report().

Here is the call graph for this function:

◆ write()

bool write ( )
virtual

Write the function-object results (no-op).

Implements functionObject.

Definition at line 89 of file parProfiling.C.

◆ end()

bool end ( )
virtual

Disables profilingPstream.

Reimplemented from functionObject.

Definition at line 95 of file parProfiling.C.

References profilingPstream::disable().

Here is the call graph for this function:

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