[petsc-users] How to set up -mat_mumps_icntl13 1 in the code?

Barry Smith bsmith at mcs.anl.gov
Tue May 15 08:20:46 CDT 2012


On May 15, 2012, at 5:30 AM, Giacomo Mulas wrote:

> Hi Barry.
> 
> On Mon, 14 May 2012, Barry Smith wrote:
> 
>>   src/snes/examples/tutorials/ex22.c is an example of how one can set options in the program and then have the command line options override them.
> 
> Thanks! I am looking at that right now.
> 
>> PetscInitialize(&argc,&argv,PETSC_NULL,help);
>> 
>> /* Hardwire several options; can be changed at command line */
>> ierr = PetscOptionsInsertString(common_options);CHKERRQ(ierr);
>> ierr = PetscOptionsInsert(&argc,&argv,PETSC_NULL);CHKERRQ(ierr);
> 
> So, if I understand correctly, I am supposed to call
> PetscOptionsInsertString() to add any options I want to have as defaults,
> then what is the call PetscOptionsInsert() for?

    It "resets" the options database with the command line options. If you did not call this then the InsertString() options would not be overwritten with the command line options.

> PetscOptionsInsertString()
> does not have effect until PetscOptionsInsert() is called?
> Another thing which is not clear to me: in that example,
> PetscOptionsSetFromOptions() is called before these "hardwired" options are
> inserted. So (unless I do not understand the logic) command line options are
> applied before hardwired options are inserted. And then
> PetscOptionsSetFromOptions() is not called again. Does it mean that
> hardwired inserted options override the command line (since they come
> after)? Am I supposed to also call again PetscOptionsSetFromOptions() after
> inserting new options for the inserted options to come into effect?

   Ignore the PetscOptionsSetFromOptions() it has nothing to do with anything there (it is just in that example to test it).  It does not affect the options data base entries.

   Barry







> 
> Thanks in advance, bye
> Giacomo
> 
> -- 
> _________________________________________________________________
> 
> Giacomo Mulas <gmulas at oa-cagliari.inaf.it>
> _________________________________________________________________
> 
> OSSERVATORIO ASTRONOMICO DI CAGLIARI
> Str. 54, Loc. Poggio dei Pini * 09012 Capoterra (CA)
> 
> Tel. (OAC): +39 070 71180 248     Fax : +39 070 71180 222
> Tel. (UNICA): +39 070 675 4916
> _________________________________________________________________
> 
> "When the storms are raging around you, stay right where you are"
>                         (Freddy Mercury)
> _________________________________________________________________



More information about the petsc-users mailing list