Actual source code: ex10f90.F90

petsc-3.10.5 2019-03-28
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
 10:       PetscInt                                  :: n

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



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