Data Processors for Parallel Execution
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Data Processors for Parallel Execution
- This topic has 7 replies, 2 voices, and was last updated 9 years, 9 months ago by mathias.
-
AuthorPosts
-
January 25, 2015 at 11:04 pm #1771WolfMember
Hello everyone!rnrnI have a problem with the parallel execution of the simulation. I need to loop through a subdomain and apply a force to each cell in it, according to its coordinate ( by lattice.get(iX,iY,iZ).defineExternalField ) . I currently implemented it manually using a couple of for loops. But the problem is that it is not parallelizable. In the manual it states to read the section 7.3 for this problem, but it is not clear for me.rnrnAlso, is there a way to get a process on which the certain cell is located?rnrnThank you very much!rnrnRegards, rnWolf
January 30, 2015 at 12:02 pm #2166mathiasKeymasterHi,rnrnWhich example are you talking about? In the latest released code there are 2 parallelization strategies implemented. The solution depends on the chosen one. In the next release we will have a new much more easy way of doing it using Functur. rnrnBest regardsrnMathias
February 8, 2015 at 10:04 pm #2167WolfMemberHello 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}rnrnrnSo, 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
February 9, 2015 at 12:42 pm #2168mathiasKeymasterHi,rnrnYou are right, this way of doing it is not at all efficient. Exactly this issue will be solved in the next release which will be available in the beginning of March.rnrnBest regardsrnMathias
February 9, 2015 at 2:16 pm #2170WolfMemberHello Mathias,rnrnok, thanks for the info. Just one more small thing. Is there a way to find out on which MPI processor/subblock the certain cell is located? Or to find out the sizes and locations of the MPI subblocks? Thanks.rnrnBest Regards,rnWolf
February 10, 2015 at 2:38 pm #2172mathiasKeymasterHi, rnrnthis is done by a 4D vector (iC, iX, iY, iZ) in the 3D case. Ic is the cuboid number shich is assigned to an mpi process. The class load balancer is handling the map and the class cuboid geometry is handling the 4D <-> 3D map. However, in the upcomming release (beginng of March) this shoul be much clearer since.rnrnMathias
February 15, 2015 at 7:14 pm #2175WolfMemberHello Mathias,rnrnIn case of SuperLattice3D, if I want to find a cuboid number of a cell I’d just use:rn
Code:sLattice.get_cGeometry().get_iC(x,y,z)rnrnWhat if I’m using the MultiBlockLattice3D? Is there a similar way to do that? Thank you.rn(When does one use SuperLattice and when MultiBlockLattice?)rnrnBest Regards,rnWolf
February 16, 2015 at 7:02 pm #2176mathiasKeymasterHi Wolf,rnrnThe MultiBlock version will not be supported anymore. In the upcomming release (March) we have all functionallity working with SuperLattice available.rnrnBest regardsrnMathias
-
AuthorPosts
- You must be logged in to reply to this topic.