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

Problems regarding the AMGCL solver #5132

Closed AlejandroCornejo closed 5 years ago

AlejandroCornejo commented 5 years ago

Dear @RiccardoRossi an @ddemidov I've been using the AMGCL solver lately for large scale calculation tih my application and, up to a certain moment i get the following error msg: RuntimeError: Error: Zero aggregates found. I've tried to change the "coarsening_type" and the same error occurs... I have to say that in my calculations I remove the elements during the computation (maybe it is important) and i work with damage models (the stiffness of some elements are reduced) but with direct solvers there's no problem. Which could be the solution? Thank you in advance

AlejandroCornejo commented 5 years ago

Besides I have this flag activated: "reform_dofs_at_each_step": true,

loumalouomega commented 5 years ago

Besides I have this flag activated: "reform_dofs_at_each_step": true,

I was going to ask that ;)

AlejandroCornejo commented 5 years ago

Besides I have this flag activated: "reform_dofs_at_each_step": true,

I was going to ask that ;)

I know haha I have to say that the solver works when removing elements but at a certain point it crashes

loumalouomega commented 5 years ago

Can you show the full configuration of your AMGCL?, there are different types of iterative solvers, by default it is GMRES, you can try with the different ones (if I remember well FGMRES was more robust but more memory consuming)

ddemidov commented 5 years ago

I think "Zero aggregates" may only occur when the matrix is diagonal (more precisely, when there are no strong connections found). Could that be the case?

AlejandroCornejo commented 5 years ago

I think "Zero aggregates" may only occur when the matrix is diagonal (more precisely, when there are no strong connections found). Could that be the case?

I'll check! thank you all :)

ddemidov commented 5 years ago

Can you show the full configuration of your AMGCL?, there are different types of iterative solvers, by default it is GMRES, you can try with the different ones (if I remember well FGMRES was more robust but more memory consuming)

The error happens during construction of AMG hierarchy (the setup of the preconditioner), so it should not depend on the iterative solver used.

loumalouomega commented 5 years ago

Can you show the full configuration of your AMGCL?, there are different types of iterative solvers, by default it is GMRES, you can try with the different ones (if I remember well FGMRES was more robust but more memory consuming)

The error happens during construction of AMG hierarchy (the setup of the preconditioner), so it should not depend on the iterative solver used.

You know best, I will become a mere spectator.

ddemidov commented 5 years ago

I think there was a way to dump the system matrix to a matrix-market file (something like set verbosity level to 4, @RiccardoRossi would know better). The last saved matrix before the crash should be the problematic one (should be in A.mm file). If you attach it here, I will be able to try it out locally.

ddemidov commented 5 years ago

And yes, it still would be interesting to see the full amgcl configuration, as @loumalouomega said.

RiccardoRossi commented 5 years ago

you can export the matrix at the different steps and iterations but setting the echo_level.of tje strategy to 4