CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   PETSC gives a slowdown instead of speedup (GAMG) (https://www.cfd-online.com/Forums/openfoam-programming-development/234081-petsc-gives-slowdown-instead-speedup-gamg.html)

chen112p February 22, 2021 23:39

PETSC gives a slowdown instead of speedup (GAMG)
 
Hello all, I am a beginner on Petsc library. Basically I am using boomerAMG configurations listed in this paper.
https://prace-ri.eu/wp-content/uploa...-Framework.pdf

Comparing performance using SIMPLE algorism, Petsc pressure solver takes 4 times of the time that GAMG pressure solver takes. The simulations is relatively simple, 2million cells of flow passing bluff body running on 22 CPU. I don't think this is right... I have seen quite a lot of people saying Petsc being the better one (similar or faster speed, better scaling). I guess petsc solver was not properly configured in my case.

I haven't spent much time on understanding the math behind Petsc. Just want to know whether Petsc solver's performance/stability is heavily relied on input parameters. Thanks!

Junting

hjasak February 24, 2021 05:18

I am not surprised at all. Linear solvers in FOAM are hand-written to be optimal for the storage structure of the matrix, solver algorithms are simple and well understood and parallel communication is optimised to extreme. It would be VERY optimistic to have a general purpose linear algebra library match this, especially with the extra cost of copying the matrix from one format to another.


Hrv

chen112p February 25, 2021 23:23

thanks for clearing up my doubt!

dlahaye February 28, 2021 14:07

I do share the optimism for various reasons.

The first reason is that once inside of the PETSc environment, one can easily perform event stage logging using PetscLogEventBegin/End to seperate problem set-up (including matrix format conversion) from the linear system solve. See e.g. https://www.mcs.anl.gov/petsc/petsc-...ventBegin.html

The second reason is the Section 6 entitled conclusions of the white paper found here https://prace-ri.eu/wp-content/uploa...-Framework.pdf

Thank you for your wonderful work!

Domenico Lahaye.


All times are GMT -4. The time now is 17:59.