Actual source code: ex10f90.F90

petsc-master 2017-03-23
Report Typos and Errors
  1:       program ex10f90

  3: #include "petsc/finclude/petsc.h"
  4:       use petsc
  5:       implicit none

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

 11:       call PetscInitialize(PETSC_NULL_CHARACTER,ierr)
 12:       if (ierr .ne. 0) then
 13:         print*,'Unable to initialize PETSc'
 14:         stop
 15:       endif
 16:       call PetscOptionsGetString(PETSC_NULL_OPTIONS,PETSC_NULL_CHARACTER,'-f',filename,flg,ierr);CHKERRQ(ierr)
 17:       if (flg) then
 18:          call PetscOptionsInsertFileYAML(PETSC_COMM_WORLD,filename,PETSC_TRUE,ierr);CHKERRQ(ierr)
 19:       end if
 20:       call PetscOptionsView(PETSC_NULL_OPTIONS,PETSC_VIEWER_STDOUT_WORLD,ierr);CHKERRQ(ierr)
 21:       Call PetscFinalize(ierr)
 22:       end program ex10f90



 26: !
 27: !/*TEST
 28: !
 29: !   test:
 30: !      suffix: 1
 31: !      requires: yaml
 32: !      args: -f petsc.yml
 33: !      filter:   grep -v saws_port_auto_select |grep -v malloc_dump | grep -v display
 34: !      localrunfiles: petsc.yml
 35: !
 36: !   test:
 37: !      suffix: 2
 38: !      requires: yaml
 39: !      args: -options_file_yaml petsc.yml
 40: !      filter:   grep -v saws_port_auto_select |grep -v malloc_dump | grep -v display
 41: !      localrunfiles: petsc.yml
 42: !
 43: !TEST*/