Memory Ballooning in OpenFOAM with preCICE (Coupling to CalculiX) - Stalls at ~2.44s

Hi everyone,

I’m encountering a severe memory issue while using preCICE_3.2.0 to couple OpenFOAM_v2206 and CalculiX_2.20. The simulation starts correctly, but around the 2.44s mark, the OpenFOAM side stops progressing without throwing any explicit error. I observed that the memory usage of one specific OpenFOAM solver thread continuously increases. Within just one hour, it ballooned to over 111 GB, hitting my machine’s physical memory limit. After this point, the computation hangs indefinitely, and the OpenFOAM log freezes without further output.

Initially, I suspected the mapping method might be the culprit, especially given my large coupling interface with over 20,000+ nodes. I first used rbf-global-direct. After encountering the problem, I switched to rbf-pum-direct. However, the same memory issue occurred again at roughly the same simulation time.

The mapping configurations used were:

  • First Run: rbf-global-direct

  •     <mapping:rbf-global-direct
          direction="write"
          from="Fluid-Mesh"
          to="Solid-Mesh"
          constraint="conservative">
          <executor:cpu/>
          <basis-function:thin-plate-splines />
        </mapping:rbf-global-direct>
        <mapping:rbf-global-direct
          direction="read"
          from="Solid-Mesh"
          to="Fluid-Mesh"
          constraint="consistent">
          <executor:cpu/>
          <basis-function:thin-plate-splines />
        </mapping:rbf-global-direct>
    
  • Second Run: rbf-pum-direct

    <mapping:rbf-pum-direct
      direction="write"
      from="Fluid-Mesh"
      to="Solid-Mesh"
      constraint="conservative"
      polynomial="separate"
      vertices-per-cluster="50"
      relative-overlap="0.15"
      project-to-input="false">
      <executor:cpu/>
      <basis-function:compact-tps-c2 support-radius="0.05" />
    </mapping:rbf-pum-direct>
    <mapping:rbf-pum-direct
      direction="read"
      from="Solid-Mesh"
      to="Fluid-Mesh"
      constraint="consistent"
      polynomial="separate"
      vertices-per-cluster="50"
      relative-overlap="0.15"
      project-to-input="false">
      <executor:cpu/>
      <basis-function:compact-tps-c2 support-radius="0.05"/>
    </mapping:rbf-pum-direct>

Has anyone experienced similar memory explosion issues when coupling OpenFOAM (especially with larger interfaces) via preCICE? Or have any insights into what might be causing this specific thread’s memory usage to skyrocket and stall the calculation? Any suggestions on debugging or alternative approaches would be greatly appreciated!

Thanks in advance for your help.

1 Like