Actual source code: ex10f90.F90

petsc-master 2017-10-19
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);CHKERRA(ierr)
 17:       if (flg) then
 18:          call PetscOptionsInsertFileYAML(PETSC_COMM_WORLD,filename,PETSC_TRUE,ierr);CHKERRA(ierr)
 19:       end if
 20:       call PetscOptionsView(PETSC_NULL_OPTIONS,PETSC_VIEWER_STDOUT_WORLD,ierr);CHKERRA(ierr)
 21:       Call PetscFinalize(ierr)
 22:       end program ex10f90



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