Skip to content

Re: Data Processors for Parallel Execution


Hello Mathias,rnrnI just didn’t quite get what is the right way to make an efficient loop, while parallelizing the code with MPI. For example in the code named cylinder2d there is a loop to set the right dynamics to an obstacle. It goes:rnrn

rnfor (int iX=0; iX<nx; ++iX) {rn for (int iY=0; iY<ny; ++iY) {rn…rn }rn}rn

rnrnSo, each processor goes through all the cells. I’m just wondering if there is a way, where each processor goes only through its cells? Or is it done inside the “”defineDynamics”” routine? And i’m also wondering how to find out on which processor/block the certain cell is located? Thank you.rnrnRegards,rnWolf