Actual source code: ex70.c

  1: static char help[] = "Error handling for destroying PETSC_VIEWER_STDOUT_SELF.\n";

  3: #include <petscsys.h>
  4: #include <petscviewer.h>

  6: int main(int argc, char **argv)
  7: {
  8:   PetscViewer viewer;

 10:   PetscFunctionBeginUser;
 11:   PetscCall(PetscInitialize(&argc, &argv, (char *)0, help));
 12:   viewer = PETSC_VIEWER_STDOUT_SELF;
 13:   PetscCall(PetscViewerDestroy(&viewer));
 14:   PetscCall(PetscFinalize());
 15:   return 0;
 16: }

 18: /*TEST

 20:    test:
 21:      requires: !defined(PETSCTEST_VALGRIND)
 22:      args: -petsc_ci_portable_error_output -error_output_stdout
 23:      filter: grep -E -v "(memory block|leaked context|not freed before MPI_Finalize|Could be the program crashed|PETSc Option Table entries|source: environment)"

 25: TEST*/