On Thu 2008-09-18 07:57, Derek Gaston wrote:
> From a research perspective you are absolutely right.  What you probably 
> aren't considering is that some people (e.g. me) are trying to build 
> commercial / production codes on top of libMesh / PetsC.... and from that 
> standpoint you want to have complete control over the command-line.

Ah, that makes more sense.  I was just worried that the command line
would become crippled for the rest of us.

> For instance, if I told any of our users that in order to use
> mult-grid preconditioning they had to to pass -sub_pc_type hypre on
> the command-line.... they would freak out.

Well, that is actually serial AMG as the local preconditioner inside a
Schwarz domain decomposition preconditioner.

> They want to be able to put "preconditioner = multigrid" in the input
> file and have it work (or even just "solve = true"!  _OR_ select
> "multigrid" from a drop-down box in a GUI).  Further, from an app
> developer standpoint, I don't want my users to be able to override
> internal capability by passing junk on the command-line... that sounds
> like a recipe for disaster.

Right, why not think about these settings in your input file or GUI as
`defaults' to the backend?  That is what setting options before
XXXSetFromOptions() does as far as PETSc is concerned.  Then you can
just require a switch to pass command line to PETSc.  For instance

  mpirun -n 8 app -app_opt_1 -app_opt_2 +PETSc -pc_type hypre ...

would make it quite clear that they are bypassing your front end and
sending certain options to PETSc.  The GHC (Haskell) runtime does
something similar:

  ./myapp -options -managed_by_my_app +RTS -ghc -runtime_options -RTS
    -another_app_option

where the options between +RTS and -RTS can be used to manipulate the
garbage collector and other very internal things.  All programs compiled
with GHC can be manipulated this way, but it doesn't cause a usability
issue.

Everything which is backend-agnostic would be managed by your
app/libmesh.  Also, I assume you are aware of PetscOptionsInsertFile()
(-options_file).

This could all be implemented as a derived class of LibMeshInit.

Jed

Attachment: pgpcORMVCuZCj.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to