Actual source code: ex1f90.F90


  2:       program ex1f90

  4: #include <petsc/finclude/petscsys.h>
  5:       use petscsys
  6:       use,intrinsic :: iso_c_binding
  7:       implicit none

  9:       PetscViewer viewer
 10:       PetscErrorCode ierr
 11:       call PetscInitialize(PETSC_NULL_CHARACTER,"ex1f90 test"//c_new_line,ierr)
 12:       if (ierr .ne. 0) then
 13:          print*,'Unable to initialize PETSc'
 14:          stop
 15:       endif
 16:       call PetscViewerBinaryOpen(PETSC_COMM_WORLD,'binaryoutput',FILE_MODE_READ,viewer,ierr);CHKERRA(ierr)
 17:       call PetscViewerDestroy(viewer,ierr);CHKERRA(ierr)
 18:       call PetscFinalize(ierr)
 19:       end

 21: !/*TEST
 22: !
 23: !   build:
 24: !      requires: defined(PETSC_USING_F2003) defined(PETSC_USING_F90FREEFORM)
 25: !
 26: !   test:
 27: !      output_file: output/ex1_1.out
 28: !
 29: !TEST*/