You can use PetscOptionsGetInt() for your own command line arguments aswell..
Satish On Wed, 23 Nov 2011, Xiangdong Liang wrote: > Thanks, Barry! Yes, I do have my own command line arguments -1 and 1. > Good to know that it's safe to ignore the warning. > > Xiangdong > > On Wed, Nov 23, 2011 at 11:30 PM, Barry Smith <bsmith at mcs.anl.gov> wrote: > > > > On Nov 23, 2011, at 10:26 PM, Xiangdong Liang wrote: > > > >> Hello everyone, > >> > >> When I compile my program with debug mode and ran it, I got > >> > >> WARNING! There are options you set that were not used! > >> WARNING! could be spelling mistake, etc! > >> Option left: name:-1 value: -1 > > > > ? You must have some of your own command line arguments like for example -1 > > -1 and our argument processing is not smart enough to ignore it. I can > > reproduce it and will see if there is any reasonable way for us to > > eliminate the message in this case. > > > > ? ?It is safe to ignore. > > > > > >> > >> I even got the warning if I do not provide any options. What's the option > >> left? > >> > >> However, such warning about the option left is gone if I compile my > >> program in arch-opt mode. ?Thanks. > > > > ? We don't print the warning with optimized code. > > > >> > >> Xiangdong > > > > >
