xref: /petsc/src/sys/tests/ex48f90.F90 (revision a336c15037c72f93cd561f5a5e11e93175f2efd9)
1#include "petsc/finclude/petsc.h"
2program ex10f90
3  use petsc
4  implicit none
5
6  PetscErrorCode                            :: ierr
7  character(len=256)                        :: filename
8  PetscBool                                 :: flg
9  PetscInt                                  :: n
10
11  PetscCallA(PetscInitialize(ierr))
12  PetscCallA(PetscOptionsGetString(PETSC_NULL_OPTIONS, PETSC_NULL_CHARACTER, '-f', filename, flg, ierr))
13  if (flg) then
14    PetscCallA(PetscOptionsInsertFileYAML(PETSC_COMM_WORLD, PETSC_NULL_OPTIONS, filename, PETSC_TRUE, ierr))
15  end if
16  PetscCallA(PetscOptionsView(PETSC_NULL_OPTIONS, PETSC_VIEWER_STDOUT_WORLD, ierr))
17  PetscCallA(PetscOptionsAllUsed(PETSC_NULL_OPTIONS, n, ierr))
18  PetscCallA(PetscFinalize(ierr))
19end program ex10f90
20
21!
22!/*TEST
23!
24! testset:
25!   test:
26!      suffix: 1
27!      args: -f petsc.yml -options_left 0
28!      localrunfiles: petsc.yml
29!
30!   test:
31!      suffix: 2
32!      args: -options_file_yaml petsc.yml -options_left 0
33!      localrunfiles: petsc.yml
34!
35!TEST*/
36