2: program ex5f90 3: #include <petsc/finclude/petscsys.h> 4: use petscsys 5: implicit none 7: PetscViewer viewer 8: PetscErrorCode ierr 10: call PetscInitialize(PETSC_NULL_CHARACTER,ierr) 11: if (ierr .ne. 0) then 12: print*,'Unable to initialize PETSc' 13: stop 14: endif 15: call PetscViewerBinaryOpen(PETSC_COMM_WORLD,'binaryoutput',FILE_MODE_READ,viewer,ierr);CHKERRA(ierr) 16: call PetscViewerDestroy(viewer,ierr);CHKERRA(ierr) 17: call PetscFinalize(ierr) 18: end