← Back to team overview

dolfin team mailing list archive

Re: parameter system

 

On Tuesday 07 July 2009 19:18:22 Garth N. Wells wrote:
> Kristian Oelgaard wrote:
> > Hi,
> >
> > I get:
> >
> > Solving linear variational problem
> >   Matrix of size 1089 x 1089 has 7361 nonzero entries.
> >   Applying boundary conditions to linear system.
> >   *** Warning: Ignoring unknown parameter "absolute_tolerance" in
> > parameter set "krylov_solver" when updating parameter set "parameters".
> >   *** Warning: Ignoring unknown parameter "divergence_limit" in parameter
> > set "krylov_solver" when updating parameter set "parameters".
> >   *** Warning: Ignoring unknown parameter "gmres_restart" in parameter
> > set "krylov_solver" when updating parameter set "parameters".
> >   *** Warning: Ignoring unknown parameter "maximum_iterations" in
> > parameter set "krylov_solver" when updating parameter set "parameters".
> >   *** Warning: Ignoring unknown parameter "monitor_convergence" in
> > parameter set "krylov_solver" when updating parameter set "parameters".
> >   *** Warning: Ignoring unknown parameter "relative_tolerance" in
> > parameter set "krylov_solver" when updating parameter set "parameters".
> >   *** Warning: Ignoring unknown parameter "report" in parameter set
> > "krylov_solver" when updating parameter set "parameters".
> >   *** Warning: Ignoring unknown parameter "shift_nonzero" in parameter
> > set "krylov_solver" when updating parameter set "parameters".
> > terminate called after throwing an instance of 'std::runtime_error'
> >   what():  *** Error: Unable to access parameter "report" in parameter
> > set "parameters", parameter not defined.
> > [mech028:15991] *** Process received signal ***
> > [mech028:15991] Signal: Aborted (6)
> > [mech028:15991] Signal code:  (-6)
> > [mech028:15991] [ 0] [0xb805d410]
> > [mech028:15991] [ 1] /lib/tls/i686/cmov/libc.so.6(abort+0x188)
> > [0xb6154098] [mech028:15991] [ 2]
> > /usr/lib/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x15
> >8) [0xb636e8f8]
> > [mech028:15991] [ 3] /usr/lib/libstdc++.so.6 [0xb636c7d5]
> > [mech028:15991] [ 4] /usr/lib/libstdc++.so.6 [0xb636c812]
> > [mech028:15991] [ 5] /usr/lib/libstdc++.so.6 [0xb636c94a]
> > [mech028:15991] [ 6]
> > /home/oelgaard/fenics/dolfin/local/lib/libdolfin.so.0(_ZNK6dolfin6Logger5
> >errorESs+0x93) [0xb7f166a3]
> > [mech028:15991] [ 7]
> > /home/oelgaard/fenics/dolfin/local/lib/libdolfin.so.0(_ZN6dolfin5errorESs
> >z+0x9f) [0xb7f1f62f]
> > [mech028:15991] [ 8]
> > /home/oelgaard/fenics/dolfin/local/lib/libdolfin.so.0(_ZN6dolfin10Paramet
> >ersclESs+0xb3) [0xb7fc7833]
> > [mech028:15991] [ 9]
> > /home/oelgaard/fenics/dolfin/local/lib/libdolfin.so.0(_ZN6dolfin17PETScKr
> >ylovSolver5solveERKNS_11PETScMatrixERNS_11PETScVectorERKS4_+0xb2)
> > [0xb7ee9ce2]
> > [mech028:15991] [10]
> > /home/oelgaard/fenics/dolfin/local/lib/libdolfin.so.0(_ZN6dolfin17PETScKr
> >ylovSolver5solveERKNS_13GenericMatrixERNS_13GenericVectorERKS4_+0xfb)
> > [0xb7eea3db]
> > [mech028:15991] [11]
> > /home/oelgaard/fenics/dolfin/local/lib/libdolfin.so.0(_ZN6dolfin12KrylovS
> >olver5solveERKNS_13GenericMatrixERNS_13GenericVectorERKS4_+0x18e)
> > [0xb7e69c1e]
> > [mech028:15991] [12]
> > /home/oelgaard/fenics/dolfin/local/lib/libdolfin.so.0(_ZN6dolfin18Variati
> >onalProblem12solve_linearERNS_8FunctionE+0xaaf) [0xb7e674af]
> > [mech028:15991] [13]
> > /home/oelgaard/fenics/dolfin/local/lib/libdolfin.so.0(_ZN6dolfin18Variati
> >onalProblem5solveERNS_8FunctionE+0x2a) [0xb7e6814a]
> > [mech028:15991] [14] ./demo(main+0x497) [0x805db07]
> > [mech028:15991] [15] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)
> > [0xb613d775]
> > [mech028:15991] [16] ./demo [0x805d541]
> > [mech028:15991] *** End of error message ***
> >
> > if I do:
> >
> >   problem.parameters("linear_solver") = "iterative";
> >
> > in the Poisson demo.
> >
> > Is this a bug, or am I using the new parameter system incorrectly?
>
> Take a look at the change Johan made recently to LUSolver. Same thing
> probably needs to be done for KrylovSolver.

This one beats me... It is another problem here. 

KrylovSolver::parameters get initialized. However, it looks like 

   solver.parameters.update(parameters["krylov_solver"]);

does not update the krylov solvers parameters, but rather an empty parameters, 
and therefore the warnings.

Also note that in python we use square brackets for all levels in the 
parameter hierarchy, so it should be:

  problem.parameters["linear_solver"] = "iterative"

But

  problem.parameters("linear_solver") 

should report an error message.

Johan

> Garth
>
> > Kristian
> >
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev




Follow ups

References