Data mapping not allowed for parallel computation

Hello,

I am trying to run OpenFOAM on multiple CPU’s by splitting up the mesh, while coupled to Nutils. Also in the CHT tutorial a decomposepar is available, which I am using to figure out how it works. However I am still getting an error I cannot solve.

[precice] ERROR: For a parallel participant, only the mapping combinations read-consistent and write-conservative are allowed

I am not sure what is meant by this and how to fix this. Would any of you know, what to do?

Thank you in advance.

Kind regards,

Cars

Hi Cars,

There is some information on this here: https://github.com/precice/precice/wiki/Mapping-Configuration#restrictions-for-parallel-participants

Let us know if that is not enough.

Benjamin

Hey Benjamin,

Thank you for the answer! I still do not understand it fully I think. It states that I have to adjust the mapping from write to read and that I have to make sure it uses both meshes. If i make a visualization of the original XML file, I can see that the mapping is already read by the Nutils file, so it cannot also be done by the OpenFOAM file right? Also there are already 2 different meshes used by nutils and in OpenFOAM it splits up the mesh, however i think it eventually uses one mesh name stated in the precicedict file, since the boundary interface is coupled to this file, which is present in both the processor folders after using the decomposepar dict.

Do you maybe know, where I am going wrong here?

Kind regards,

Cars

Could you post your current preCICE config file?
The image looks good for serial computation, but not for parallel (assuming that you want two consistent mappings).

Hey,

In this case it is the same as in the CHT tutorial. I want to test it out in that case, before i continue with it.

I want to run the openfoam part on 2 or more cpu’s, so the decomposepar splits it up on 2 processors. It is still the same mesh however. The openfoam and nutils part can still run in serial.

precice-config.xml (1.8 KB)

Runs only in serial because you use a write-consistent mapping:

  <participant name="OpenFOAM">
    <use-mesh name="OpenFOAM-Mesh" provide="yes"/>
    <read-data name="Heat-Flux" mesh="OpenFOAM-Mesh"/>
    <write-data name="Temperature" mesh="OpenFOAM-Mesh"/>
  </participant>

  <participant name="Nutils">
    <use-mesh name="OpenFOAM-Mesh" from="OpenFOAM"/>
    <use-mesh name="Nutils-Mesh-GP" provide="yes"/>
    <use-mesh name="Nutils-Mesh-CC" provide="yes"/>
    <mapping:nearest-neighbor direction="write" from="Nutils-Mesh-CC" to="OpenFOAM-Mesh" constraint="consistent"/>
    <mapping:nearest-neighbor direction="read"  from="OpenFOAM-Mesh" to="Nutils-Mesh-GP" constraint="consistent"/>
    <read-data name="Temperature" mesh="Nutils-Mesh-GP" />
    <write-data name="Heat-Flux" mesh="Nutils-Mesh-CC" />
  </participant>    

  <coupling-scheme:serial-explicit>
    ...
    <exchange data="Temperature" mesh="OpenFOAM-Mesh" from="OpenFOAM" to="Nutils"/>
    <exchange data="Heat-Flux" mesh="OpenFOAM-Mesh" from="Nutils" to="OpenFOAM"/>
  </coupling-scheme:serial-explicit>

Works in serial and parallel:

  <participant name="OpenFOAM">
    <use-mesh name="OpenFOAM-Mesh" provide="yes"/>
    <use-mesh name="Nutils-Mesh-CC" from="Nutils"/>
    <read-data name="Heat-Flux" mesh="OpenFOAM-Mesh"/>
    <write-data name="Temperature" mesh="OpenFOAM-Mesh"/>
    <mapping:nearest-neighbor direction="read" from="Nutils-Mesh-CC" to="OpenFOAM-Mesh" constraint="consistent"/>
  </participant>

  <participant name="Nutils">
    <use-mesh name="OpenFOAM-Mesh" from="OpenFOAM"/>
    <use-mesh name="Nutils-Mesh-GP" provide="yes"/>
    <use-mesh name="Nutils-Mesh-CC" provide="yes"/>
    <mapping:nearest-neighbor direction="read"  from="OpenFOAM-Mesh" to="Nutils-Mesh-GP" constraint="consistent"/>
    <read-data name="Temperature" mesh="Nutils-Mesh-GP" />
    <write-data name="Heat-Flux" mesh="Nutils-Mesh-CC" />
  </participant>    

  <coupling-scheme:serial-explicit>
    ...
    <exchange data="Temperature" mesh="OpenFOAM-Mesh" from="OpenFOAM" to="Nutils"/>
    <exchange data="Heat-Flux" mesh="Nutils-Mesh-CC" from="Nutils" to="OpenFOAM"/>
  </coupling-scheme:serial-explicit>

Hey,

I can see now how I understood it wrong. I misunderstood the concept of direction = ‘write’. However it is very clear now. Thank you for your time and answers!

Kind regards,

Cars

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.