Some questions about DEM parallel computing

Yeah, that’s true for a single rank. But in DMP, it’s a different story due to the definition of global and local IDs.

Let’s say ll, i, and j are the local IDs on process 1. You might have values like ll = 1, i = 2, and j = 3, which refer to global IDs 1, 2, and 3 respectively. ll could be normal particle, and i and j are ghost particles, it will follow the traverse logic you mentioned.

However, on process 2, you also have ll = 1, i = 2, j = 3, but they refer to global IDs 2, 3, and 1. Here, ll will traverse i and j as well. Process 2 will update both des_usr_var(1,ll) and des_usr_var(1,i) and send those values to process 1 during MPI exchange.

So, if you look back at process 1:

  • des_usr_var(1,ll) is updated by process 1 itself,
  • des_usr_var(1,i) and des_usr_var(1,j) receive values from process 2.

Similar thing happens on process 2. As a result, all values are updated properly across processes.