On Monday 19 October 2009 13:28:36 logg wrote: > On Fri, Oct 16, 2009 at 10:11:55AM -0000, Johan Hake wrote: > > Public bug reported: > > > > A user cannot send command line options to both PETSc and a user defined > > parameters > > > > ./app --petsc.foo --petsc.bar --my_foo bar > > > > Reproduce error: > > Save the following in a file parameter_fail.py > > > > ********************************************* > > from dolfin import * > > > > par = Parameters("app_par", bar="foo") > > > > parameters.parse() > > par.parse() > > ********************************************* > > > > and run it from the prompt using > > > > python parameter_fail.py --petsc.mat_view_draw --bar=baz > > > > ** Affects: dolfin > > Importance: Undecided > > Status: New > > Should we make the parse() command just parse the parameter it knows > and ignore others?
Good question. I have thought of this too. The nice thing with a complaining parser is that we get notice when we type an error. Another way is to always check for dolfin. and petsc. parameters and just ignore them while parsing ordinary parameters, and ignore all other when parsing the global parameters. Not sure what's most intuitive and correct. Johan > > -- > Anders > -- Parsing command line options for several parameters fails https://bugs.launchpad.net/bugs/452950 You received this bug notification because you are subscribed to DOLFIN. Status in DOLFIN: New Bug description: A user cannot send command line options to both PETSc and a user defined parameters ./app --petsc.foo --petsc.bar --my_foo bar Reproduce error: Save the following in a file parameter_fail.py ********************************************* from dolfin import * par = Parameters("app_par", bar="foo") parameters.parse() par.parse() ********************************************* and run it from the prompt using python parameter_fail.py --petsc.mat_view_draw --bar=baz _______________________________________________ DOLFIN-dev mailing list DOLFIN-dev@fenics.org http://www.fenics.org/mailman/listinfo/dolfin-dev