[petsc-users] PetscOptionsAllUsed in fortran

Smith, Barry F. bsmith at mcs.anl.gov
Wed Dec 27 08:53:38 CST 2017


   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 <cpraveen at gmail.com> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171227/e321046c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: petscoptionsallused.patch
Type: application/octet-stream
Size: 3304 bytes
Desc: petscoptionsallused.patch
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171227/e321046c/attachment.obj>


More information about the petsc-users mailing list