Skip to content

External field omega problem using DynOmegaD2Q9Descriptor and MPI compiler

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB Bug Reports External field omega problem using DynOmegaD2Q9Descriptor and MPI compiler

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4527
    guojuw
    Participant

    Dear OLB developers:

    Here is how I set up the program using fresh download codes:

    1. Go to ‘$openlbRoot/config.mk’, and switch “CXX:=mpic++”, “CXXFLAGS := $(OPTIM)”,”PARALLEL_MODE := MPI”, “BUILDTYPE := generic“。

    2. Go to “$openlbRoot/examples/laminar/powerLaw2d/powerLaw2d.cpp”,
    add macro “#define PARALLEL_MODE_MPI”. Within ‘void getResults()’ function, add the following lines to obtain the relaxation frequency: ” SuperLatticeField2D<T,DESCRIPTOR,olb::descriptors::OMEGA> omegaLB (sLattice);

    vtmWriter.addFunctor( omegaLB );”

    and ”
    BlockReduction2D2D<T> planeReduction2( omegaLB, 600, BlockDataSyncMode::ReduceOnly );
    heatmap::write(planeReduction, iT);”

    3. Compile the source code using “make” command and execute the program using “mpirun -np 1 powerLaw2d”, “mpirun -np 2 powerLaw2d” and “mpirun -np 4 powerLaw2d”.

    4. In these three cases with different numbers of MPI processes, the results of Omega field were
    Omega field using one MPI process

    Omega field using two MPI processes

    Omega field using four MPI processes

    5. The problem is that, the Omega at cuboid block edges were discontinued, i.e., in the second map, there was a vertical line in the center, and in the third map, there were a vertical line and a horizontal line at the center.

    I don’t know whether it is a problem within MPI post-processing or DynOmegaD2Q9Descriptor.

    Thanks,
    Junwei Guo

    #4528
    mathias
    Keymaster

    Dear Junwei,

    that is not a bug. A communication step is missing. Add

    SuperExternal3D sExternal( superGeometry, sLattice, sLattice.getOverlap() );

    sExternal.communicate();

    and it will work!

    Best
    Mathias

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