Hello preCICE-community!
I am working on coupling our inhouse particle solver (XPS) with OpenFOAM using volumetric coupling. I use the OpenFOAM adapter with openmpi (4 ranks) and domain decomposition on the fluid side - and a single CPU thread + CUDA kernels on the DEM side. I am currently facing a situation that I don’t know how to handle - therefore coming to you to ask for advice.
My config currently (momentum coupling) looks something like this
precice-config.xml (4.3 KB)
As you can see, the number of variables I send are limited and the case I am currently working on is also not large. I am using the same mesh dimensions on both sides (174.000 3D-cells). A DEM timestep is 1e-05s, the fluid-timestep a couplingStep are both 1e-3s. I exchange the following quantities
<data:vector name="Velocity" />
<data:vector name="PressureGradient" />
<data:vector name="ViscousForce" />
<data:scalar name="FluidDensity" />
<data:scalar name="FluidViscosity" />
<data:vector name="MomentumSource" />
<data:vector name="ParticleVelocity" />
<data:scalar name="VoidFraction" />
making 5 vectors and 3 scalars. Per coupling timestep that is
174.000cells * 8Byte = 1.32MB per scalar
174.000cells * 8Byte * 3 = 3.98MB per vector
making in total less than 24MB per coupling-timestep.
According to my trace (that i recorded using the precice-tool) the reading of a single scalar (on 174.000 cells) takes ~33ms, a single vector (on 174.000 cells) takes ~35ms.
Nearest neighour mapping should be trivial but takes also 33-39ms depending on constraint and data-type (scalar or vector).
The marked area in the perfetto plot corresponds to about 1 coupling interval. Top solver is the DEM solver with 100 timesteps and bottom is the MPI FluidSolver with 1 timestep.
This test was run on a workstation using a AMD Ryzen 9 7900X 12-Core Processor and Nvidia 4060TI GPU.
This times seem a little our of place and would correspond to ~40MB/s. I am asking you what I am doing wrong to receive such a performance. Are these times for reading/writing/mapping somewhat realistic, given the amount of data I am using.
In case this turns out to be the case, I will need to think about improving performance of my setup (introducing mpi to the DEM solver, tuning cell-sizes, data frequency,…).
Thank you very much in advance for reading through my post and helping out.
Best regards, Andreas











