View Issue Details

IDProjectCategoryView StatusLast Update
0003833OpenFOAMBugpublic2022-05-05 11:39
Reportermichael.mueller-wrdAssigned Towill 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOScentOSOS Version(please specify)
Product Versiondev 
Fixed in Versiondev 
Summary0003833: decomposition of fields very slow
DescriptionWith recent dev version (as of 2022/04/11) the case decomposition has become drastically slower compared to previous versions. Apparently, the fields decomposition takes a lot more time than before... for some applications (with mesh size < 100M cells) this may actually take several hours up to 1 day with dev version.

What may be the reason for that?
Is using -copyZero option already the solution/workaround for this issue?
Steps To ReproduceTried to reproduce it with shellAndTubeHeatExchanger tutorial, and increased blockMesh refinement by factor 2.
1. $> ./Allmesh.layers (yields ca 5M cells)
2. $> reconstructParMesh -allRegions -constant
3. $> rm processor.*
4. $> time decomposePar -allRegions -noFields
5. $> time decomposePar -allRegions -fields
Timings show:
real time for v9: -noFields option = 19.8s / -fields option = 3.9s
real time for dev: -noFields option = 20.9s / -fields option = 12.2s
TagsNo tags attached.

Activities

henry

2022-05-02 12:56

manager   ~0012567

Can you trace which commit in OpenFOAM-dev has caused this problem?

michael.mueller-wrd

2022-05-02 13:16

reporter   ~0012568

Did not try to trace it yet... but I may at least state that for a former dev version (as of 2021/12/14), it was working as expected.

michael.mueller-wrd

2022-05-02 14:16

reporter   ~0012569

For dev version download as of 2022/02/18, it was working just fine as well (sth. like 4s real time for the given example).

will

2022-05-03 12:31

manager   ~0012573

The difference between version 9 and dev is that the flowRateInletVelocity is now using a profile, which requires the calculation of a patch wall distance. This is being done within decomposePar in order to generate values on the field. This is unavoidable. If you want equivalent behaviour to version 9, then you need to remove the profile from the velocity inlet boundary conditions. If I do this then decomposePar takes a similar amount of time to version 9.

There is something we can fix here, though. I have changed the mapping constructor of flowRateInletVelocity so that the wall distance is mapped from the complete to the processor meshes, instead of being re-calculated. This cheapens it up field decomposition a bit (down from approx 9 s to 6 s on my machine). It is also more correct. You can't do the wall distance calculation properly on the processor meshes, because the relevant walls might be on another processor. Commit here:

https://github.com/OpenFOAM/OpenFOAM-dev/commit/38262243ccdd13bd936541d2373ccfd1974db597

will

2022-05-05 11:39

manager   ~0012574

Note that following discussion on the OpenFOAM hub, another bug which was negatively affecting the speed of decomposition was discovered and subsequently fixed. Commit in question:

https://github.com/OpenFOAM/OpenFOAM-dev/commit/fc74899204654184a79e2dc9437c2f7518cf0ea3

Issue History

Date Modified Username Field Change
2022-05-02 11:31 michael.mueller-wrd New Issue
2022-05-02 12:56 henry Note Added: 0012567
2022-05-02 13:16 michael.mueller-wrd Note Added: 0012568
2022-05-02 14:16 michael.mueller-wrd Note Added: 0012569
2022-05-03 12:31 will Assigned To => will
2022-05-03 12:31 will Status new => resolved
2022-05-03 12:31 will Resolution open => fixed
2022-05-03 12:31 will Fixed in Version => dev
2022-05-03 12:31 will Note Added: 0012573
2022-05-05 11:39 will Note Added: 0012574