[Dune] Setting and optimising AMG parameters in ISTL
Bath Uni
e.mueller at bath.ac.uk
Wed Jul 25 18:50:01 CEST 2012
Hi Markus,
thanks a lot, I'm still having trouble installing the latest version of pdelab (you might have seen my email on the pdelab list).
As far as I can see the coarsen criterion is only used in the apply() method of the class ISTLBackend_AMG in backend.hh, where the AMG object is instantiated, so I guess I could always derive a class from ISTLBackend_AMG and overload the apply() method with the UnSymmetricCriterion (and then also derive ISTLBackend_AMG_SSOR etc. from this). Or even hack the ISTL_Backend_AMG class in my Dune installation...
Eike
On 25 Jul 2012, at 01:12, Markus Blatt wrote:
> Hey Eike,
>
> On Tue, Jul 24, 2012 at 03:11:53PM -0700, Bath Uni wrote:
>>
>> I'm trying to optimise the ISTL-AMG solver for the specific problem I'm solving. It is a 3d problem with a strong anisotropy in the vertical direction, the equation is
>>
>> - omega^2 (\laplace_{2d} + \lambda^2 d^2/dz^2) u(x,y,z) + u(x,y,z) = RHS, where x,y,z \in [0,1]^3
>>
>> with omega^2= 6.702E-4, lambda^2 = O(10^3-10^4).
>>
>> omega^2 decreases with the square of the grid size, i.e. the relative size of the second order term decreases relative to the constant terms as I increase the horizontal resolution, and I always keep the vertical size fixed.
>>
>> So far I've tried the default settings for AMG by using the
>> ISTLBackend_CG_AMG_SSOR, and the time per iteration scales very well
>> up to 65536 cores (in my weak scaling tests, where I increase the
>> horizontal resolution, such that the local problem size stays
>> constant), but the number of iterations is quite large (42 on 16
>> cores and 45 on 1024 cores).
>>
>> [...]
>>
>> I presume that I'm simply not using the optimal AMG parameters, so I
>> would like to try to optimise them.
>> What are the best AMG parameters to use in this case and what is the
>> easiest way of passing them to the AMG solver, if I'm using the ISTL
>> backend? I noticed that there is a function
>> setDefaultValuesAnisotropic in dune/istl/paamg/parameters.hh. Can I
>> use this to set optimal default parameters for the anisotropic case?
>
> The algorithm should do semi-coarsening by default. Because of the
> piecewise constant interpolation one should make sure that the
> aggregates are smaller in number of unknowns than for the isotropic
> case. The relevant low level routine is
> AggregationParameters::setMaxDistance(int) (inherited by the parameter
> class), where distance is the maximum path length (in terms of edges)
> of the shortest path between all pairs of vertices in the
> aggregate. (To get aggregates of 2 vertices for an 2D anisotropic
> problem this would be 1).
>
> BTW: Currently the setDefaultValeus{Ani|I}sotropic methods seem to
> this value a little bit to high.
>
> In the latest Pdelab you get access to the parameter class by calling
> the parameters() method on the AMG backends.
>
>>
>> Markus, I've seen that you have solved an anisotropic problem of the form
>>
>> -\nabla (K \nabla u(x)) = 1 with K_{ij} = {10^{-6}} for i=j=0 and K_{ij} = 1 for i=j>0, K_{ij}=0 otherwise
>>
>> in your PhD thesis, but could not figure out which parameters you
>> used. The anisotropy is the other way round as in my case, but maybe
>> the parameters you used are still relevant for what I'm doing.
>
> For the anisotropic tests I used the UnsymmetricCriterion (why is somehow beyond me):
> Dune::Amg::CoarsenCriterion<Dune::Amg::UnSymmetricCriterion<BCRSMat,Dune::Amg::FirstDiagonal> >
>
> which determines strong edges according to Vanek's criterion
> -a_ij > \alpha \max_{k\not=j} -a_ik
> to determine strong edges. Unfortunately this might result in wrong
> aggregation for jumping diffusion coefficients.
>
> This criterion is not yet supported by PDElab.
>
> Markus
> --
> Do you need more support with DUNE or HPC in general?
>
> Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
> Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
> Tel.: +49 (0) 160 97590858 Fax: +49 (0)322 1108991658
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
More information about the Dune
mailing list