petsc4py.PETSc.Log#

class petsc4py.PETSc.Log#

Bases: object

Logging support.

Methods Summary

Class(name)

Source code at petsc4py/PETSc/Log.pyx:25

Event(name[, klass])

Source code at petsc4py/PETSc/Log.pyx:39

EventDecorator([name, klass])

Decorate a function with a PETSc event.

Stage(name)

Source code at petsc4py/PETSc/Log.pyx:11

addFlops(flops)

Add floating point operations to the current event.

begin()

Turn on logging of objects and events.

getCPUTime()

Return the CPU time.

getFlops()

Return the number of flops used on this processor since the program began.

getTime()

Return the current time of day in seconds.

isActive()

Return whether logging is currently in progress.

logFlops(flops)

Add floating point operations to the current event.

view([viewer])

Print the log.

Methods Documentation

classmethod Class(name)#

Source code at petsc4py/PETSc/Log.pyx:25

Return type:

LogClass

classmethod Event(name, klass=None)#

Source code at petsc4py/PETSc/Log.pyx:39

Return type:

LogEvent

classmethod EventDecorator(name=None, klass=None)#

Decorate a function with a PETSc event.

Source code at petsc4py/PETSc/Log.pyx:178

Return type:

Any

classmethod Stage(name)#

Source code at petsc4py/PETSc/Log.pyx:11

Return type:

LogStage

classmethod addFlops(flops)#

Add floating point operations to the current event.

Not collective.

Parameters:

flops (float) – The number of flops to log.

Return type:

None

Notes

This method exists for backward compatibility.

Source code at petsc4py/PETSc/Log.pyx:108

classmethod begin()#

Turn on logging of objects and events.

Collective.

Source code at petsc4py/PETSc/Log.pyx:55

Return type:

None

classmethod getCPUTime()#

Return the CPU time.

Source code at petsc4py/PETSc/Log.pyx:171

Return type:

float

classmethod getFlops()#

Return the number of flops used on this processor since the program began.

Not collective.

Returns:

Number of floating point operations.

Return type:

float

See also

PetscGetFlops

Source code at petsc4py/PETSc/Log.pyx:131

classmethod getTime()#

Return the current time of day in seconds.

Collective.

Returns:

wctime – Current time.

Return type:

float

See also

PetscTime

Source code at petsc4py/PETSc/Log.pyx:151

classmethod isActive()#

Return whether logging is currently in progress.

Not collective.

See also

PetscLogIsActive

Source code at petsc4py/PETSc/Log.pyx:193

Return type:

bool

classmethod logFlops(flops)#

Add floating point operations to the current event.

Not collective.

Parameters:

flops (float) – The number of flops to log.

Return type:

None

See also

PetscLogFlops

Source code at petsc4py/PETSc/Log.pyx:89

classmethod view(viewer=None)#

Print the log.

Collective.

Parameters:

viewer (Viewer | None) – A Viewer instance or None for the default viewer.

Return type:

None

Source code at petsc4py/PETSc/Log.pyx:68