PetscFinalize#
Checks for options to be called at the conclusion of a PETSc program and frees any remaining PETSc objects and data structures. of the program. Automatically calls MPI_Finalize() if the user had not called MPI_Init() before calling PetscInitialize().
Synopsis#
#include "petscsys.h"
PetscErrorCode PetscFinalize(void)
Collective on PETSC_COMM_WORLD
Options Database Keys#
-options_view (true|false) - Calls
PetscOptionsView()to display all options in the database toPETSC_VIEWER_STDOUT_WORLD-options_left (true|false) - Prints unused options that remain in the database to
stdout(default value istrue)-objects_dump [all] - Prints list of objects allocated by the user that have not been freed, the option all cause all outstanding objects to be listed
-mpidump (true|false) - Calls PetscMPIDump() and prints to
stdout-malloc_dump [filename] - Calls
PetscMallocDump(), displays all memory allocated that has not been freed-memory_view (true|false) - Prints total memory usage to
PETSC_VIEWER_STDOUT_WORLD-malloc_view [filename] - Prints list of all memory allocated and in what functions
Note#
See PetscInitialize() for other runtime options.
You can call PetscInitialize() after PetscFinalize() but only with MPI-Uni or if you called MPI_Init() before ever calling PetscInitialize().
See Also#
PetscInitialize(), PetscOptionsView(), PetscMallocDump(), PetscMPIDump(), PetscEnd()
Level#
beginner
Location#
Examples#
src/sys/classes/random/tutorials/ex1.c
src/sys/classes/random/tutorials/ex2.c
src/sys/classes/viewer/tutorials/ex1.c
src/sys/classes/viewer/tutorials/ex1f90.F90
src/sys/classes/viewer/tutorials/ex2.c
src/sys/classes/viewer/tutorials/ex2f.F90
src/sys/classes/viewer/tutorials/ex3f.F90
src/sys/tutorials/ex1.c
src/sys/tutorials/ex10f.F90
src/sys/tutorials/ex16.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages