Here is a patch to provide this for PETSc version 3.8.x

   Apply with

    patch -p1 < petscoptionsallused.patch

    make gnumake

    It is also in the maint and master git branches of PETSc and will be in the 
next patch release.

   Barry


> On Dec 27, 2017, at 3:37 AM, Praveen C <[email protected]> wrote:
>
> Hello
>
> I want to use this
>
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsAllUsed.html
>
> in a fortran code like this
>
>   call PetscOptionsAllUsed(PETSC_NULL_OPTIONS, nunused, ierr); CHKERRQ(ierr)
>   if(nunused > 0)then
>      write(*,*)'Some command line options not used'
>      ierr = 1
>   endif
>
> but I cannot compile the code
>
> Undefined symbols for architecture x86_64:
>  "_petscoptionsallused_", referenced from:
>      _readparam_ in ccHwkiA6.o
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> make[1]: *** [ug3] Error 1
> make: *** [euler] Error 2
>
> Is this not implemented for fortran ?
>
> Is there any other way to detect some unused command line arguments ? If some 
> argument is mis-spelled, it will be silently ignored, and I want to detect 
> this case.
>
> Thanks
> praveen

Attachment: petscoptionsallused.patch
Description: petscoptionsallused.patch

Reply via email to