Actual source code: ex10f90.F90

petsc-master 2016-12-06
Report Typos and Errors
  1:       program ex10f90
  2: #include "petsc/finclude/petsc.h"
  3:       use petsc
  4:       implicit none

  6:       PetscErrorCode                            :: ierr
  7:       Character(len=256)                        :: filename
  8:       PetscBool                                 :: flg

 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 PetscOptionsGetString(PETSC_NULL_OPTIONS,PETSC_NULL_CHARACTER,'-f',filename,flg,ierr);CHKERRQ(ierr)
 16:       if (flg) then
 17:          call PetscOptionsInsertFileYAML(PETSC_COMM_WORLD,filename,PETSC_TRUE,ierr);CHKERRQ(ierr)
 18:       end if
 19:       call PetscOptionsView(PETSC_NULL_OPTIONS,PETSC_VIEWER_STDOUT_WORLD,ierr);CHKERRQ(ierr)
 20:       Call PetscFinalize(ierr)
 21:       end program ex10f90