CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

PETSC gives a slowdown instead of speedup (GAMG)

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By chen112p
  • 2 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2021, 23:39
Default PETSC gives a slowdown instead of speedup (GAMG)
  #1
Member
 
chen112p's Avatar
 
Junting Chen
Join Date: Feb 2016
Location: Ontario Canada
Posts: 37
Rep Power: 10
chen112p is on a distinguished road
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
aerosayan likes this.
chen112p is offline   Reply With Quote

Old   February 24, 2021, 05:18
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
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 and aerosayan like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   February 25, 2021, 23:23
Default
  #3
Member
 
chen112p's Avatar
 
Junting Chen
Join Date: Feb 2016
Location: Ontario Canada
Posts: 37
Rep Power: 10
chen112p is on a distinguished road
thanks for clearing up my doubt!
chen112p is offline   Reply With Quote

Old   February 28, 2021, 14:07
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 720
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
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.
dlahaye is offline   Reply With Quote

Reply

Tags
petsc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suppress twoPhaseEulerFoam energy AlmostSurelyRob OpenFOAM Running, Solving & CFD 33 September 25, 2018 17:45
chtMultiRegionSimpleFoam turbulent case Aditya Patil OpenFOAM Running, Solving & CFD 6 April 24, 2017 22:13
rhoSimplecFoam Mach0.8 no pressure values CFDnewbie147 OpenFOAM Running, Solving & CFD 16 November 23, 2013 05:58
pimpleFoam: turbulence->correct(); is not executed when using residualControl hfs OpenFOAM Running, Solving & CFD 3 October 29, 2013 08:35
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16


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