1: static char help[] = "Error handling for destroying PETSC_VIEWER_STDOUT_SELF.\n";
3: #include <petscsys.h>
5: int main(int argc, char **argv)
6: {
7: PetscViewer viewer;
9: PetscFunctionBeginUser;
10: PetscCall(PetscInitialize(&argc, &argv, NULL, help));
11: viewer = PETSC_VIEWER_STDOUT_SELF;
12: PetscCall(PetscViewerDestroy(&viewer));
13: PetscCall(PetscFinalize());
14: return 0;
15: }
17: /*TEST
19: test:
20: requires: !defined(PETSCTEST_VALGRIND) defined(PETSC_USE_DEBUG) !defined(PETSC_HAVE_SANITIZER)
21: args: -petsc_ci_portable_error_output -error_output_stdout
22: filter: grep -E -v "(memory block|leaked context|not freed before MPI_Finalize|Could be the program crashed|PETSc Option Table entries|source: environment)"
24: TEST*/