[petsc-users] Setting PETSc Sundials Options Using PETSC_OPTIONS

Satish Balay balay at mcs.anl.gov
Thu Jul 25 12:02:13 CDT 2013


Hm - ts_view should be checked in TSSolve() - so somehow thats not hapenning?

Satish

On Thu, 25 Jul 2013, Lesleis Nagy wrote:

> Hi Satish, Matthew,
> 
> Thank you very much for your help. Everything seems to work with the exception that PETSc now doesn't pick up the 'ts_view' option! 
> 
> For completeness, when using PETSc / petsc4py / FEniCS I simply called 'ts.setFromOptions()' on my on my petsc4py time stepper object (called 'ts'). 
> 
> Is the appearance of 'ts_view' in the unused database options list something I should be concerned about? When I call the 'view()' method on my time stepper object it seems to output information that I would expect to see.
> 
> Many thanks
> Les
> 
> On 25 Jul 2013, at 17:29, Satish Balay wrote:
> 
> > Then as Matt refered to  - TSSetFromOptions() isn't getting called.
> > 
> > Satish
> > 
> > On Thu, 25 Jul 2013, Lesleis Nagy wrote:
> > 
> >> Hi Satish, Matthew,
> >> 
> >> I'm just about to compile a version of PETSc with debugging symbols included, so that I can use gdb. Satish, I've passed the option that you suggest and the output is as follows:
> >> 
> >> #PETSc Option Table entries:
> >> -options_left
> >> -options_table
> >> -ts_sundials_gramschmidt_type modified
> >> -ts_sundials_monitor_steps
> >> -ts_sundials_type bdf
> >> -ts_view
> >> #End of PETSc Option Table entries
> >> There are 7 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
> >> Option left: name:-ts_view no value 
> >> 
> >> It appears as though PETSc ignores the 'ts_view' option.
> >> 
> >> Les
> >> 
> >> On 25 Jul 2013, at 17:15, Satish Balay wrote:
> >> 
> >>> 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