xref: /petsc/src/sys/tests/ex70.c (revision 0619917b5a674bb687c64e7daba2ab22be99af31)
1 
2 static char help[] = "Error handling for destroying PETSC_VIEWER_STDOUT_SELF.\n";
3 
4 #include <petscsys.h>
5 #include <petscviewer.h>
6 
7 int main(int argc, char **argv)
8 {
9   PetscViewer viewer;
10 
11   PetscFunctionBeginUser;
12   PetscCall(PetscInitialize(&argc, &argv, (char *)0, help));
13   viewer = PETSC_VIEWER_STDOUT_SELF;
14   PetscCall(PetscViewerDestroy(&viewer));
15   PetscCall(PetscFinalize());
16   return 0;
17 }
18 
19 /*TEST
20 
21    test:
22      requires: !defined(PETSCTEST_VALGRIND)
23      args: -petsc_ci_portable_error_output -error_output_stdout
24      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 
26 TEST*/
27