petsc4py.PETSc.Log#
- class petsc4py.PETSc.Log#
Bases:
object
Logging support.
Methods Summary
Class
(name)Create a log class.
Event
(name[, klass])Create a log event.
EventDecorator
([name, klass])Decorate a function with a
PETSc
event.Stage
(name)Create a log stage.
addFlops
(flops)Add floating point operations to the current event.
begin
()Turn on logging of objects and events.
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)#
Create a log class.
Not collective.
- Parameters:
name (str) – Class name.
- Returns:
klass – The log class. If a class already exists with name
name
then it is reused.- Return type:
See also
- classmethod Event(name, klass=None)#
Create a log event.
Not collective.
- Parameters:
- Returns:
event – The log event. If an event already exists with name
name
then it is reused.- Return type:
See also
- classmethod EventDecorator(name=None, klass=None)#
Decorate a function with a
PETSc
event.Source code at petsc4py/PETSc/Log.pyx:240
- Return type:
- classmethod Stage(name)#
Create a log stage.
Not collective.
- Parameters:
name (str) – Stage name.
- Returns:
stage – The log stage. If a stage already exists with name
name
then it is reused.- Return type:
See also
- classmethod addFlops(flops)#
Add floating point operations to the current event.
Not collective.
Notes
This method exists for backward compatibility.
See also
- classmethod begin()#
Turn on logging of objects and events.
Collective.
See also
Source code at petsc4py/PETSc/Log.pyx:117
- Return type:
- classmethod getCPUTime()#
Return the CPU time.
Source code at petsc4py/PETSc/Log.pyx:233
- Return type:
- 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:
See also
- classmethod getTime()#
Return the current time of day in seconds.
Collective.
- Returns:
wctime – Current time.
- Return type:
See also
- classmethod isActive()#
Return whether logging is currently in progress.
Not collective.
See also
Source code at petsc4py/PETSc/Log.pyx:255
- Return type:
- classmethod logFlops(flops)#
Add floating point operations to the current event.
Not collective.
See also