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