12.5. Interpreting -log_info Output: Informative Messages

Up: Contents Next: Time Previous: Restricting Event Logging

Users can activate the printing of verbose information about algorithms, data structures, etc. to the screen by using the option -log_info or by calling PLogInfoAllow(PETSC_TRUE). Such logging, which is used throughout the PETSc libraries, can aid the user in understanding algorithms and tuning program performance. For example, as discussed in Section Sparse Matrices , -log_info activates the printing of information about memory allocation during matrix assembly.

Application programmers can employ this logging as well, by using the routine

   PLogInfo(void* obj,char *message,...) 
where obj is the PETSc object associated most closely with the logging statement, message. For example, in the line search Newton methods, we use a statement such as
   PLogInfo(snes,"Cubically determined step, lambda %g\n",lambda); 
One can selectively turn off informative messages about any of the basic PETSc objects (e.g., Mat, SNES) with the command
   PLogInfoDeactivateClass(int object_cookie) 
where object_cookie is one of MAT_COOKIE, SNES_COOKIE, etc. Messages can be reactivated with the command
   PLogInfoActivateClass(int object_cookie) 
Such deactivation can be useful when one wishes to view information about higher level PETSc components (e.g., TS and SNES) without seeing all lower level data as well (e.g., Mat). One can deactivate events at runtime for matrix and linear solver components via -log_info [no_mat, no_sles].


Up: Contents Next: Time Previous: Restricting Event Logging