KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.02k stars 245 forks source link

[AMGCL] many warnings after #2807 #2989

Closed philbucher closed 5 years ago

philbucher commented 6 years ago

@RiccardoRossi @ddemidov after #2807 AMGCL throws a lot of warnings about unknown parameters

This is some tests-output:

AMGCL WARNING: unknown parameter coarsening
AMGCL WARNING: unknown parameter npre
AMGCL WARNING: unknown parameter npost
AMGCL WARNING: unknown parameter coarse_enough
AMGCL WARNING: unknown parameter relax
AMGCL WARNING: unknown parameter coarsening
AMGCL WARNING: unknown parameter npre
AMGCL WARNING: unknown parameter npost
AMGCL WARNING: unknown parameter coarse_enough
AMGCL WARNING: unknown parameter relax
AMGCL WARNING: unknown parameter coarsening
AMGCL WARNING: unknown parameter npre
AMGCL WARNING: unknown parameter npost
AMGCL WARNING: unknown parameter coarse_enough
AMGCL WARNING: unknown parameter relax
AMGCL WARNING: unknown parameter coarsening
AMGCL WARNING: unknown parameter npre
AMGCL WARNING: unknown parameter npost
AMGCL WARNING: unknown parameter coarse_enough
AMGCL WARNING: unknown parameter relax
AMGCL WARNING: unknown parameter coarsening
AMGCL WARNING: unknown parameter npre
AMGCL WARNING: unknown parameter npost
AMGCL WARNING: unknown parameter coarse_enough
AMGCL WARNING: unknown parameter relax
AMGCL WARNING: unknown parameter coarsening
AMGCL WARNING: unknown parameter npre
AMGCL WARNING: unknown parameter npost
AMGCL WARNING: unknown parameter coarse_enough
AMGCL WARNING: unknown parameter relax
AMGCL WARNING: unknown parameter coarsening
AMGCL WARNING: unknown parameter npre
AMGCL WARNING: unknown parameter npost
AMGCL WARNING: unknown parameter coarse_enough
.AMGCL WARNING: unknown parameter relax
AMGCL WARNING: unknown parameter coarsening
AMGCL WARNING: unknown parameter npre
AMGCL WARNING: unknown parameter npost
AMGCL WARNING: unknown parameter coarse_enough
AMGCL WARNING: unknown parameter relax
AMGCL WARNING: unknown parameter coarsening
AMGCL WARNING: unknown parameter npre
AMGCL WARNING: unknown parameter npost
AMGCL WARNING: unknown parameter coarse_enough
AMGCL WARNING: unknown parameter relax
AMGCL WARNING: unknown parameter coarsening
AMGCL WARNING: unknown parameter npre
AMGCL WARNING: unknown parameter npost
AMGCL WARNING: unknown parameter coarse_enough
.........AMGCL WARNING: unknown parameter M

I looked around a bit but I couldn't figure out how to fix it

can you please have a look?

ddemidov commented 6 years ago

Did you use the new preconditioner_type option with amgcl solver? This switches from amg to a single level relaxation for preconditioning. When you do that, the usual amg parameters are no longer applicable, hence the warnings. The warnings themselves are nothing to worry about except the extra verbosity. Your options are:

jcotela commented 6 years ago

@sunethwarna I think this is applicable to your issues too.

msandre commented 5 years ago

I think the amgcl_solver.h needs to be updated. We are getting a lot of "unknown parameter M" warnings. I closed #3148 since this thread came first, but it is still an open issue for us.

ddemidov commented 5 years ago

@RiccardoRossi , what do you think about disabling amgcl warnings completely?

ddemidov commented 5 years ago

Looks like uncommenting the following line should be enough:

https://github.com/KratosMultiphysics/Kratos/blob/7ba66bd83307a322f9474923ff061c5e405589c7/kratos/linear_solvers/amgcl_solver.h#L312

msandre commented 5 years ago

Just tested it, but still getting the warning about "M" being unknown. My settings are:

            "solver_type"         : "AMGCL",
            "max_iteration"       : 200,
            "tolerance"           : 1e-9,
            "provide_coordinates" : false,
            "smoother_type"       : "ilu0",
            "krylov_type"         : "gmres",
            "coarsening_type"     : "aggregation",
            "scaling"             : false

I think the problem is related to this if-statement: https://github.com/KratosMultiphysics/Kratos/blob/dd66d8da4fb621575f673eb2177ccc5b20d83275/kratos/linear_solvers/amgcl_solver.h#L298

ddemidov commented 5 years ago

gmres-type solvers should expect 'M' as a parameter. Are you sure you are not using bicgstab_with_gmres_fallback? It sets 'M' but uses bicgstab solvers which does not have the parameter.

https://github.com/KratosMultiphysics/Kratos/blob/dd66d8da4fb621575f673eb2177ccc5b20d83275/kratos/linear_solvers/amgcl_solver.h#L302-L305

RiccardoRossi commented 5 years ago

@philbucher @ddemidov this is on me. I'll take a look asap

RiccardoRossi commented 5 years ago

there are two problems:

1 - M is always set even when gmres is not used. The AMGCL correctly warns about this 2 - amg settings are passed even when amg is not used as a preconditioner

@ddemidov i think that the warnings issued by AMGCL are very useful, and i would prefer not to deactivate them. I'll try to correct this on the user side

philbucher commented 5 years ago

The trilinos-version still prints some of those, see #3343

AMGCL: Unknown parameter class

pooyan-dadvand commented 5 years ago

@RiccardoRossi ....

RiccardoRossi commented 5 years ago

I cleaned up the OpenMP version but not the MPI version. I will do also the MPI when i can...

however, @msandre are u getting this with the "serial" version? because that is expected to be clean

msandre commented 5 years ago

My warnings (in serial) have disappeared. Thanks!

philbucher commented 5 years ago

ping @RiccardoRossi