Erroneous unused options warning when using PETSc
When using PETSc, all of the command line arguments are passed to it indiscriminately.
This includes -d, which obviously does nothing inside PETSc and is therefore unused.
This triggers the unused variable warning when writing BOUT.settings:
Run finished at : Mon Jun 9 15:41:11 2025
Run time : 5 s
Finalising PETSc
WARNING! There are options you set that were not used!
WARNING! could be spelling mistake, etc!
There is one unused database option. It is:
Option left: name:-d value: finish-selcoll/fscol1d-evpress_braginskii_afn source: command line
Option datadir = finish-selcoll/fscol1d-evpress_braginskii_afn (Command line)
Option settingsfile = BOUT.settings (default)
Writing options to file finish-selcoll/fscol1d-evpress_braginskii_afn/BOUT.settings
Option time_report:show = 0 (default)
Hmm, I thought we fixed this. Which BOUT++ version/commit are you using here?
I'm on https://github.com/boutproject/BOUT-dev/tree/396f6a7618a6a8dcdc6f9d46e51acb9e38e84d19, which is the commit we're linked to in Hermes-3.
I can't reproduce this issue. What version of PETSc are you using @mikekryjak?
Reproduced the issue with PETSc version 3.23.6.
From https://community.freefem.org/t/suppress-options-left-when-using-petsc/2702: "Previously, this was only displayed with debug builds, but now it also shows up in optimized builds. You can skip this specific message using the additional option -options_left no (or false, or 0)."