xref: /petsc/src/sys/tests/ex70.c (revision 66af8762ec03dbef0e079729eb2a1734a35ed7ff)
1 static char help[] = "Error handling for destroying PETSC_VIEWER_STDOUT_SELF.\n";
2 
3 #include <petscsys.h>
4 #include <petscviewer.h>
5 
6 int main(int argc, char **argv)
7 {
8   PetscViewer viewer;
9 
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 }
17 
18 /*TEST
19 
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)"
24 
25 TEST*/
26