Re: Data Processors for Parallel Execution
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Data Processors for Parallel Execution › Re: Data Processors for Parallel Execution
February 8, 2015 at 10:04 pm
#2167
Wolf
Member
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
Code:
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