Closed Blumenkranz closed 1 week ago
Sorry, I mean distributed parallelization through MPI. When different ranks are responsible for different parts of the cells, for example, a cell in rank0 may share a point with a cell in rank1. In this case, how should we define the connectivity of these cells? Defining points with the same coordinates in each rank is not feasible, as they will be treated as different points with the same coordinates, which will result in the final generated mesh being split into several parts. This will bring difficulties for further post-processing, such as drawing contours, where the contours will break at the separation points.
WriteVTK is not MPI-aware, which means that you need to explicitly exchange data between MPI processes if needed.
But I still don't understand what kind of strategy you want to use for writing files:
Personally I haven't used parallel VTK formats a lot, but maybe you need to include some ghost cells (and use the ghost_level
parameter) to properly handle the interface between MPI processes?
The strategy I want to adopt is the latter. I tried the parallel file format in WriteVTK, and it seems that they do not support ghost cells (I'm not entirely sure, but I tried my best). When I defined the complete list of points in each rank, the mesh separation occurred. Unfortunately, Paraview also encountered troubles here (we indeed did not inform Paraview that these duplicate points are the same points).
Anyway, thanks for your advice! I am not very familiar with VTK, and it seems a bit challenging to fully understand it in a short period of time. Single-core read and write might be a good choice for now.
Hi, I'd need a bit more details and context to be able to answer. What do you mean by other processor? Are you using threads, distributed computing or something else?