[petsc-users] Setting PETSc Sundials Options Using PETSC_OPTIONS

Satish Balay balay at mcs.anl.gov
Thu Jul 25 11:15:56 CDT 2013


On Thu, 25 Jul 2013, Matthew Knepley wrote:

> On Thu, Jul 25, 2013 at 9:53 AM, Lesleis Nagy <l.nagy at ed.ac.uk> wrote:
> 
> > Hello,
> >
> > I currently use PETSc (version: 3.3-p7) and petsc4py along with the
> > Sundials interface to perform time stepping for some FEM code that I have
> > written (for completeness I make use of FEniCS). I would like to pass
> > options to PETSc from the command line using the PETSC_OPTIONS environment
> > variable. I set it with the following values:
> >
> >         $ export PETSC_OPTIONS="-ts_sundials_type bdf
> > -ts_sundials_gramschmidt_type modified -ts_sundials_monitor_steps
> > -options_table -options_left"
> >
> > I then run the code using:
> >
> >         $ mpiexec -n 2 python script.py
> >
> > Everything appears to work and my code terminates. However at the end of
> > the run, '-options_table' / '-options_left' reports that
> >
> > #PETSc Option Table entries:
> > -options_left
> > -options_table
> > -ts_sundials_gramschmidt_type modified
> > -ts_sundials_monitor_steps
> > -ts_sundials_type bdf
> > #End of PETSc Option Table entries
> > There are 3 unused database options. They are:
> > Option left: name:-ts_sundials_gramschmidt_type value: modified
> > Option left: name:-ts_sundials_monitor_steps no value
> > Option left: name:-ts_sundials_type value: bdf
> >
> > Could someone explain to me why PETSc is reading the Sundials options that
> > I've supplied but is not using them?
> >
> 
> 1) Your solver might have an options prefix
> 
> 2) You might forget to call TSSetFromOptions()
> 
> The easiest thing to do is run with -start_in_debugger and set a breakpoint
> in TSSetFromOptions()

Also use -ts_view to check if sundials is actually getting set/used..

Satish

> 
>    Matt
> 
> 
> > Kind regards
> > Les
> > --
> > The University of Edinburgh is a charitable body, registered in
> > Scotland, with registration number SC005336.
> >
> >
> 
> 
> 



More information about the petsc-users mailing list