Skip to content

Data Processors for Parallel Execution

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Data Processors for Parallel Execution

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1771
    Wolf
    Member

    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

    #2166
    mathias
    Keymaster

    Hi,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

    #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

    #2168
    mathias
    Keymaster

    Hi,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

    #2170
    Wolf
    Member

    Hello 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

    #2172
    mathias
    Keymaster

    Hi, 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

    #2175
    Wolf
    Member

    Hello 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

    #2176
    mathias
    Keymaster

    Hi Wolf,rnrnThe MultiBlock version will not be supported anymore. In the upcomming release (March) we have all functionallity working with SuperLattice available.rnrnBest regardsrnMathias

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.