Subject: [FEniCS-users] commandline arguments to petsc

From: Patrick Riesen <[email-masked]>
Date: Tue, 13 Oct 2009 14:24:14 +0200

hello,

before dolfin 0.9.2, i used dolfin_init(argc,argv) to get some commands 
to petsc, how can one do this now?

i tried parameters.parse(argc, argv) but the commandline arguments need 
to different than just passing e.g. -help for the petsc-help, so what 
would be an example?

many thanks,

patrick

---

From: Patrick Riesen <[email-masked]>
Date: Tue, 13 Oct 2009 14:30:12 +0200

ah, i found --petsc.help or --petsc.mat_view_draw works,

but how about using an argument with value? eg. -pause_draw 0 ?

Patrick Riesen wrote:
> _______________________________________________
> FEniCS-users mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/fenics-users

---

From: Anders Logg <[email-masked]>
Date: Tue, 13 Oct 2009 15:29:26 +0200

> but how about using an argument with value? eg. -pause_draw 0 ?

All command-line parameters tol DOLFIN must be passed like

 --foo=bar

Parameters prefixed by petsc. will be sent to PETSc, so if you want to
send

 -foo bar

to PETSc, then use

 --petsc.foo=bar

--
Anders

---

From: Johan Hake <[email-masked]>
Date: Tue, 13 Oct 2009 15:51:46 +0200

> All command-line parameters tol DOLFIN must be passed like

 --foo bar

should also work

> Parameters prefixed by petsc. will be sent to PETSc, so if you want to

or 

  --petsc.foo bar

Johan

---

From: Patrick Riesen <[email-masked]>
Date: Tue, 13 Oct 2009 16:09:52 +0200

thanks, giving single commands works, but e.g.

--petsc.mat_view_draw --petsc.draw_pause=10

gives

Parsing command-line arguments...
Passing options to PETSc: -mat_view_draw -draw_pause=10

but

WARNING! There are options you set that were not used!
WARNING! could be spelling mistake, etc!
Option left: name:-draw_pause=10 no value
Option left: name:-mat_view_draw no value

i could get multiple parameters to petsc to get -mat_view_draw 
-draw_pause 10, can somebody of you try this?

patrick

---

From: Johan Hake <[email-masked]>
Date: Wed, 14 Oct 2009 10:26:51 +0200

> Passing options to PETSc: -mat_view_draw -draw_pause=10

Which indicates that something is correct. I also get this if I modify the 
parameter demo, both python and cpp.

> -draw_pause 10, can somebody of you try this?

I do not get this. Can you send a minimal code that reproduces this?

There is a problem when a user want to parse options for different parameter 
set. This is the case when a user has defined let say an 
application_parameters, and then try to parse options containing --petsc.foo 
options, which where meant for the global parameters.

Should we let Parameters::parse ignore --dolfin.foo and --petsc.foo when 
parsing?
 
Johan