Error cell_index output when mpirun

Hi,
I want to output the cell index of each cell in vtu files. However, when I use several cores the IJK output is wrong and many repeated IJK ID shows, even the coordinates are different.

In addition, during the mpi run, when I output the fluid cells where particles locatates, It was found that this IJK output is also not right. drag_gs_des1.f (14.4 KB)

Anyone could help me with this ?

The IJK cell index is local to each process, so you will see repeated values. They just belong to a different process (core). This is not wrong.

Hi jeff, thanks for your explanation. I am wondering how i can identify which set of IJK groups belongs to one core?
In addtion, how I can know which core the when I output the location cell of each particle.

You can output the process ID in the vtk files:

  • For cell data, go to the “Other” tab and select “partition” in the list of cell data to write. This sets keywords vtk_partition(VTK region) = .True.
  • For particle data, select “MPI rank”. This sets vtk_part_rank(VTK region) = .True.

If you want to know the Process ID from within the code, it is stored in MyPE variable and is accessible from the compar module. Make sure you have use compar, only: MyPE at the top of the routine so you can access it.

Thank you very much.