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

Run-Time Parallel Load Balancing

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2021, 15:48
Default
  #21
Member
 
Join Date: Nov 2012
Posts: 83
Rep Power: 14
Henning86 is on a distinguished road
I updated the readme of the project that explains the refinement selection.


the composedAdaptCriteria enables to combine multiple functions with logical operators and or
Henning86 is offline   Reply With Quote

Old   December 12, 2022, 10:51
Default
  #22
New Member
 
Dennis Thuy
Join Date: Apr 2022
Posts: 12
Rep Power: 4
dplthuy is on a distinguished road
Quote:
Originally Posted by S_teph_2000 View Post
Thank you for your Contribution!!
I tried to compiled it on OpenFoam 1912, and the following line in "dynamicMultiDimRefineFvMesh.C" prevented from compiling "libdynamicLoadBalanceFvMesh.so":

const label oldPointi = iter.object();

it has to be:

const label oldPointi = iter();

I still have to check that everything works correctly but: is there a particular reason to add the ".object()"?

Kazunobu
When compiling with OpenFOAM v2106, I also had to make this change. Additionally, I got a compiler error in the Foam::dynamicMultiDimRefineFvMesh::writeObject function (also in dynamicMultiDimRefineFvMesh.C).

On line 1290, I replace:

dynamicFvMesh::writeObject(fmt, ver, cmp, valid)

by

dynamicFvMesh::writeObject(IOstreamOption(fmt, cmp, ver), valid)

in order to combine the fmt, cmp and ver variables into a single container. This seems to work fine.

Kind regards,
Dennis
dplthuy is offline   Reply With Quote

Old   January 8, 2024, 06:53
Question
  #23
New Member
 
Dennis Thuy
Join Date: Apr 2022
Posts: 12
Rep Power: 4
dplthuy is on a distinguished road
Hi all,

I am running into an issue when using the Load balancing library in OpenFOAM v2206. I use the AMR to refine my mesh near a gas-liquid interface in simulations with the interIsoFoam solver. I want to use load balancing because the interface is not uniformly distributed over my domain.


For smaller test cases I have had no issues with the load balancing functionality. For a larger case (3.5 million cells), I run into an issue (but I'm not sure if the issue is related to the size of the case). I'm running my case on 128 processors, and for the first several thousand time steps all goes well, including the load balancing, which is performed at least ten times.
At some point though, while redistributing the mesh after a load balance step, something strange happens. 126 out of 128 processors still receive a very similar load. However, there is one processor that is assigned zero cells, and one that receives twice as many cells as all the others.

After this, the current time step is finished, but a new time step is never started. The simulation does not crash, there is no error or warning message. It just seems to get stuck in an infinite loop (perhaps related to the assignment of zero cells to a processor?).

There are no obvious clues for me in the log files as to why this happens. I have seen the issue both on the national supercomputer (Snellius) and my universities local cluster. I use scotch for the domain decomposition and redistribution.

I'm wondering if anyone else has had a similar issue?
dplthuy is offline   Reply With Quote

Old   Yesterday, 11:58
Default
  #24
New Member
 
Marco Piras
Join Date: Nov 2024
Posts: 2
Rep Power: 0
lace2304 is on a distinguished road
Hi all,

I'm trying to compile the library dynamicAMR (https://github.com/HenningScheufler/multiDimAMR) in openfoam2312 but I receive several errors. The first one is "error: ‘meshConstructorTable’ is not a class, namespace, or enumeration". Have someone compiled the library to more recent version of opefoam?
lace2304 is offline   Reply With Quote

Old   Today, 02:54
Default
  #25
New Member
 
Dennis Thuy
Join Date: Apr 2022
Posts: 12
Rep Power: 4
dplthuy is on a distinguished road
Hi Marko,

Have a look at my post from 12-12-2022 in this thread. With the change mentioned by S_teph_2000 and the ones I mention in my post, the library compiled properly for v2206 (though be aware of the issue I described in my latest post here).

With these changes, it also compiles for v2406, though you will get a bunch of compilation warnings, mostly related to parallel communication. My guess is therefore that you will manage for v2312 as well.

Kind regards,
Dennis
dplthuy is offline   Reply With Quote

Old   Today, 04:51
Default
  #26
New Member
 
Marco Piras
Join Date: Nov 2024
Posts: 2
Rep Power: 0
lace2304 is on a distinguished road
Quote:
Originally Posted by dplthuy View Post
Hi Marko,

Have a look at my post from 12-12-2022 in this thread. With the change mentioned by S_teph_2000 and the ones I mention in my post, the library compiled properly for v2206 (though be aware of the issue I described in my latest post here).

With these changes, it also compiles for v2406, though you will get a bunch of compilation warnings, mostly related to parallel communication. My guess is therefore that you will manage for v2312 as well.

Kind regards,
Dennis
Hi Dennis,

thank you for your quick reply. I followed your suggestion, however I'm still facing the same issues. I'm receiving several errors. Am I missing something?
Kind regards,
Marco

Code:
hexRef/hexRefNew.C: In static member function ‘static Foam::autoPtr<Foam::hexRef> Foam::hexRef::New(const Foam::polyMesh&, bool)’:
hexRef/hexRefNew.C:64:5: error: ‘meshConstructorTable’ is not a class, namespace, or enumeration
   64 |     meshConstructorTable::iterator hexRefIter =
      |     ^~~~~~~~~~~~~~~~~~~~
hexRef/hexRefNew.C:67:9: error: ‘hexRefIter’ was not declared in this scope; did you mean ‘hexRef’?
   67 |     if (hexRefIter == meshConstructorTablePtr_->end())
      |         ^~~~~~~~~~
      |         hexRef
hexRef/hexRefNew.C:78:9: error: ‘hexRefIter’ was not declared in this scope; did you mean ‘hexRef’?
   78 |         hexRefIter()(mesh, readHistory)
      |         ^~~~~~~~~~
      |         hexRef
hexRef/hexRefNew.C: In static member function ‘static Foam::autoPtr<Foam::hexRef> Foam::hexRef::New(const Foam::polyMesh&, const labelList&, const labelList&, const Foam::refinementHistoryMultiDim&, Foam::scalar)’:
hexRef/hexRefNew.C:115:5: error: ‘levelsHistConstructorTable’ is not a class, namespace, or enumeration
  115 |     levelsHistConstructorTable::iterator hexRefIter =
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
hexRef/hexRefNew.C:118:9: error: ‘hexRefIter’ was not declared in this scope; did you mean ‘hexRef’?
  118 |     if (hexRefIter == levelsHistConstructorTablePtr_->end())
      |         ^~~~~~~~~~
      |         hexRef
hexRef/hexRefNew.C:129:9: error: ‘hexRefIter’ was not declared in this scope; did you mean ‘hexRef’?
  129 |         hexRefIter()(mesh, cellLevel, pointLevel, history, level0Edge)
      |         ^~~~~~~~~~
      |         hexRef
hexRef/hexRefNew.C: In static member function ‘static Foam::autoPtr<Foam::hexRef> Foam::hexRef::New(const Foam::polyMesh&, const labelList&, const labelList&, Foam::scalar)’:
hexRef/hexRefNew.C:165:5: error: ‘levelsConstructorTable’ is not a class, namespace, or enumeration
  165 |     levelsConstructorTable::iterator hexRefIter =
      |     ^~~~~~~~~~~~~~~~~~~~~~
hexRef/hexRefNew.C:168:9: error: ‘hexRefIter’ was not declared in this scope; did you mean ‘hexRef’?
  168 |     if (hexRefIter == levelsConstructorTablePtr_->end())
      |         ^~~~~~~~~~
      |         hexRef
hexRef/hexRefNew.C:179:9: error: ‘hexRefIter’ was not declared in this scope; did you mean ‘hexRef’?
  179 |         hexRefIter()(mesh, cellLevel, pointLevel, level0Edge)
      |         ^~~~~~~~~~
      |         hexRef
make: *** [/usr/lib/openfoam/openfoam2312/wmake/rules/General/transform:38: Make/linux64GccDPInt32Opt/hexRef/hexRefNew.o] Error 1
Code:
In file included from chtMultiRegionDyMFoam.C:114:
./fluid/solveFluid.H: In function ‘int main(int, char**)’:
./fluid/solveFluid.H:3:10: error: ‘data’ is not a class, namespace, or enumeration
    3 |     mesh.data::add("finalIteration", true);
      |          ^~~~
In file included from chtMultiRegionDyMFoam.C:114:
./fluid/solveFluid.H:76:10: error: ‘data’ is not a class, namespace, or enumeration
   76 |     mesh.data::remove("finalIteration");
      |          ^~~~
In file included from chtMultiRegionDyMFoam.C:123:
./solid/solveSolid.H:3:10: error: ‘data’ is not a class, namespace, or enumeration
    3 |     mesh.data::add("finalIteration", true);
      |          ^~~~
./solid/solveSolid.H:38:10: error: ‘data’ is not a class, namespace, or enumeration
   38 |     mesh.data::remove("finalIteration");
      |          ^~~~
In file included from chtMultiRegionDyMFoam.C:142:
./fluid/solveFluid.H:3:10: error: ‘data’ is not a class, namespace, or enumeration
    3 |     mesh.data::add("finalIteration", true);
      |          ^~~~
In file included from chtMultiRegionDyMFoam.C:142:
./fluid/solveFluid.H:76:10: error: ‘data’ is not a class, namespace, or enumeration
   76 |     mesh.data::remove("finalIteration");
      |          ^~~~
In file included from chtMultiRegionDyMFoam.C:151:
./solid/solveSolid.H:3:10: error: ‘data’ is not a class, namespace, or enumeration
    3 |     mesh.data::add("finalIteration", true);
      |          ^~~~
./solid/solveSolid.H:38:10: error: ‘data’ is not a class, namespace, or enumeration
   38 |     mesh.data::remove("finalIteration");
      |          ^~~~
lace2304 is offline   Reply With Quote

Reply


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
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 19:45
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 01:01
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 05:35
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 12:16


All times are GMT -4. The time now is 15:22.