Hi fenics-users.
I have a very basic problem: setting PETSc options from command line.
I can do this in Python, e.g. python demo_poisson.py --petsc.log_summary
after adding parameters.parse()
at the beginning of the code.
However, in C++ this doesn't work, as
...
int main (int argc, char* argv[]) {
Parameters p("cli");
p.parse(argc,argv);
and
$ ./myProg --petsc.log_summary
outputs
Skipping unrecognized option for parameter set "cli": --petsc.log_summary
I spied through Parameters.cpp
and saw that Parameters::parse_petsc()
is protected, so I can't call it directly, and also it is never called by Parameters::parse()
, which only calls Parameters::parse_common()
, which parses "everything except PETSc options".
I think I'm missing something basic here, any idea?
Thanks