1: ! Demonstrates PetscViewerASCIIOpenWithFileUnit() 3: program main 4: #include <petsc/finclude/petscsys.h> 5: use petscmpi ! or mpi or mpi_f08 6: use petscsys 8: implicit none 9: PetscErrorCode :: ierr 10: PetscViewer :: viewer 11: integer :: unit 13: ! Every PETSc program should begin with the PetscInitialize() routine. 14: PetscCallA(PetscInitialize(ierr)) 16: unit = 6 17: PetscCallA(PetscViewerASCIIOpenWithFileUnit(PETSC_COMM_WORLD,unit,viewer,ierr)) 18: PetscCallA(PetscOptionsView(PETSC_NULL_OPTIONS,viewer,ierr)) 19: PetscCallA(PetscViewerDestroy(viewer,ierr)) 20: PetscCallA(PetscFinalize(ierr)) 21: end program main 23: !/*TEST 24: ! 25: ! test: 26: ! args: -options_view -options_left no 27: ! 28: !TEST*/