Up: Contents
Next: Interpreting -log_summary Output: The Basics
Previous: Profiling
If an application code and the PETSc libraries have been compiled with
the -DPETSC_LOG flag (which is the default for all versions),
then various kinds of profiling of code between calls to
PetscInitialize() and PetscFinalize() can be
activated at runtime. Note that the flag -DPETSC_LOG can be
specified for an installation of PETSc in the file
${}PETSC_DIR/bmake/${}PETSC_ARCH/base.${}BOPT, as discussed in
Section PETSc Flags
. The profiling options include the following:
- -log_summary - Prints an ASCII version of performance data
at program's conclusion. These statistics are comprehensive and concise
and require little overhead; thus, -log_summary is intended as
the primary means of monitoring the performance of PETSc codes.
- -log_info - Prints verbose information about code to the screen.
This option provides details about algorithms, data structures, etc.
Since the overhead of printing such output slows a code, this
option should not be used when evaluating a program's performance.
- -log_trace [logfile] - Traces the beginning and ending of all
PETSc events. This option, which can be used in conjunction with
-log_info, is useful to see where a program is hanging
without running in the debugger.
As discussed in Section Using -log_mpe with Upshot/Nupshot
,
additional profilng can be done with MPE.
Up: Contents
Next: Interpreting -log_summary Output: The Basics
Previous: Profiling