[petsc-users] Possible to turn off unused option warning in debug mode?

Jacob Faibussowitsch jacob.fai at gmail.com
Wed Jul 20 13:43:08 CDT 2022


Run with "-options_left 0" (also accepts no, and false)

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)

> On Jul 20, 2022, at 14:31, Greg Kahanamoku-Meyer <gregory.meyer at berkeley.edu> wrote:
> 
> Hi,
> 
> The unused option warning (https://petsc.org/release/docs/manualpages/Sys/PetscOptionsLeft.html) is automatically turned on when running in debug mode. Is there a way to turn it off (other than turning off all debugging)?
> 
> For a bit of background, I am using PETSc through petsc4py, and certain options can only be turned on via command line options to petsc4py.init() (the corresponding functions aren't exposed in the Python interface). But I don't know precisely which flags I will need until later, so I just call init() with all the command line flags I might need during execution of the script. (An example is the option '-viewer_binary_skip_info', which is only used if my script ends up saving things to disk. When init() is called I don't know if saving will be necessary yet). When I am running in debug mode, this leads to PETSc printing a warning every time I run my code that some of the options were not used. It would be great if I could quiet that warning.
> 
> Thanks in advance,
> Greg KM



More information about the petsc-users mailing list