[petsc-dev] PetscOptionsGetString

Barry Smith bsmith at mcs.anl.gov
Sat Oct 8 12:32:14 CDT 2016


   What has happened is we added some Fortran interfaces and turned them on by default. So now more type checking is being done in Fortran than previously.

   This is the interface definition

        Subroutine PetscOptionsGetString(o,p,n,v,s,ierr)
          USE_PETSCSYS_HIDE
          PETSCOPTIONS_HIDE o
          character(*) v
          character(*) p,n
          PetscBool s
          PetscErrorCode ierr
        End Subroutine

    So in your code the n argument needs to be a PetscBool rather than an integer.   Note that the manual page use to have the wrong information about this argument; it has been a PetscBool for a long time but since there was no interface to check it everything compiled and ran fine with an integer there.

   Barry



> On Oct 8, 2016, at 9:10 AM, Tabrez Ali <stali at geology.wisc.edu> wrote:
> 
> Hello
> 
> Today (while using petsc-dev) I got the following error:
> 
> 
> call PetscOptionsGetString(Petsc_Null_Object,Petsc_Null_Character,'-f',input_file,n,ierr)
> 1
> Error: Type mismatch in argument ‘s’ at (1); passed INTEGER(4) to LOGICAL(4)
> /home/stali/petsc-dev/arch-linux2-c-debug/lib/petsc/conf/petscrules:35: recipe for target 'main.o' failed
> 
> 
> It looks like some changes have been made to ""sys/objects/options.c" but I cannot find the updated documentation.
> 
> Thanks in advance.
> 
> Tabrez




More information about the petsc-dev mailing list