- Thank you received: 0
fast preconditioners
4 years 8 months ago #2464
by gcdiwan
fast preconditioners was created by gcdiwan
Dear NGSolve Developers;
seems very slow as the build+solve time is equivalent to solving with sparsecholesky directly. Are there other approximate inverses available (or under consideration) such as ILU or ILUT?
Thanks in advance!
Code:
prec = Preconditioner(a, type="bddc", inverse='sparsecholesky')
seems very slow as the build+solve time is equivalent to solving with sparsecholesky directly. Are there other approximate inverses available (or under consideration) such as ILU or ILUT?
Thanks in advance!
4 years 8 months ago - 4 years 8 months ago #2465
by lkogler
Replied by lkogler on topic fast preconditioners
Our bddc preconditioner is just a way to reduce a high order problem to the low order case. For low order systems, bddc is the direct inverse.
If you are using static condensation (eliminate_internal), many of the high order DOFs are alreade eliminated, so the difference between bddc and direct inverse is smaller.
Besides that, if you are running with a TaskManager, bddc can be very slow if you also have additional shared memory parallelization from your LAPACK library.
For MKL, set MKL_THREADING_LAYER to SEQUENTIAL.
For OpenBlas, set OPENBLAS_NUM_THREADS to 1
If you want to try out ILU or ILUT, those are, I believe, available through the PETSc interface. PETSc does not have any shared memory parallelization, however, so take that in mind.
Finally, the built-in sparsecholesky is very fast, it is really hard to beat except for smaller or medium problems.
Best,
Lukas
If you are using static condensation (eliminate_internal), many of the high order DOFs are alreade eliminated, so the difference between bddc and direct inverse is smaller.
Besides that, if you are running with a TaskManager, bddc can be very slow if you also have additional shared memory parallelization from your LAPACK library.
For MKL, set MKL_THREADING_LAYER to SEQUENTIAL.
For OpenBlas, set OPENBLAS_NUM_THREADS to 1
If you want to try out ILU or ILUT, those are, I believe, available through the PETSc interface. PETSc does not have any shared memory parallelization, however, so take that in mind.
Finally, the built-in sparsecholesky is very fast, it is really hard to beat except for smaller or medium problems.
Best,
Lukas
Last edit: 4 years 8 months ago by lkogler.
4 years 8 months ago #2466
by gcdiwan
Hi Lukas,
Thanks for your reply. In relation to your comment on sparsecholesky, i thought it works only on local matrices and not on parallel matrices (see my earlier post: ngsolve.org/forum/ngspy-forum/1031-sigse...roblems?start=6#2435 ). What do you mean by large in relation to sparsecholesky? I am envisaging to solve problems of size 2-10 million dofs and possibly ill-conditioned.
Replied by gcdiwan on topic fast preconditioners
lkogler wrote:
If you want to try out ILU or ILUT, those are, I believe, available through the PETSc interface. PETSc does not have any shared memory parallelization, however, so take that in mind.
Finally, the built-in sparsecholesky is very fast, it is really hard to beat except for smaller or medium problems.
Best,
Lukas
Hi Lukas,
Thanks for your reply. In relation to your comment on sparsecholesky, i thought it works only on local matrices and not on parallel matrices (see my earlier post: ngsolve.org/forum/ngspy-forum/1031-sigse...roblems?start=6#2435 ). What do you mean by large in relation to sparsecholesky? I am envisaging to solve problems of size 2-10 million dofs and possibly ill-conditioned.
4 years 8 months ago - 4 years 8 months ago #2468
by lkogler
Replied by lkogler on topic fast preconditioners
It does, but is works shared memory parallel.
Strike the "except" from my comment. I was thinking maybe at most 10^5 DOFs or so. In that range it should be very fast compared to other options.
Direct solvers care about bad condition numbers much, much less than preconditioners.
Strike the "except" from my comment. I was thinking maybe at most 10^5 DOFs or so. In that range it should be very fast compared to other options.
Direct solvers care about bad condition numbers much, much less than preconditioners.
Last edit: 4 years 8 months ago by lkogler.
Time to create page: 0.157 seconds