xref: /petsc/src/sys/tests/ex70.c (revision 732aec7a18f2199fb53bb9a2f3aef439a834ce31)
134fa283eSBarry Smith static char help[] = "Error handling for destroying PETSC_VIEWER_STDOUT_SELF.\n";
234fa283eSBarry Smith 
334fa283eSBarry Smith #include <petscsys.h>
434fa283eSBarry Smith #include <petscviewer.h>
534fa283eSBarry Smith 
main(int argc,char ** argv)634fa283eSBarry Smith int main(int argc, char **argv)
734fa283eSBarry Smith {
834fa283eSBarry Smith   PetscViewer viewer;
934fa283eSBarry Smith 
1034fa283eSBarry Smith   PetscFunctionBeginUser;
11*c8025a54SPierre Jolivet   PetscCall(PetscInitialize(&argc, &argv, NULL, help));
1234fa283eSBarry Smith   viewer = PETSC_VIEWER_STDOUT_SELF;
1334fa283eSBarry Smith   PetscCall(PetscViewerDestroy(&viewer));
1434fa283eSBarry Smith   PetscCall(PetscFinalize());
1534fa283eSBarry Smith   return 0;
1634fa283eSBarry Smith }
1734fa283eSBarry Smith 
1834fa283eSBarry Smith /*TEST
1934fa283eSBarry Smith 
2034fa283eSBarry Smith    test:
21648c30bcSBarry Smith      requires: !defined(PETSCTEST_VALGRIND) defined(PETSC_USE_DEBUG) !defined(PETSC_HAVE_SANITIZER)
2234fa283eSBarry Smith      args: -petsc_ci_portable_error_output -error_output_stdout
2334fa283eSBarry 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)"
2434fa283eSBarry Smith 
2534fa283eSBarry Smith TEST*/
26