Skip to content

olb1.6 bifurcation3d

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #7889
    Fuxin He
    Participant

    Dear OpenLB Developers,

    I compiled bifurcation3d under /olb-1.6r0/examples/particles/bifurcation3d/eulerLagrange with “make”, but it still can’t run successfully, why?

    hfx123@ubuntu:~/olb-1.6r01/examples/particles/bifurcation3d/eulerLagrange$ mpirun -np 8 ./bifurcation3d

    ERROR: Subgrid particles can only be used with MPI!

    ERROR: Subgrid particles can only be used with MPI!

    ERROR: Subgrid particles can only be used with MPI!

    ERROR: Subgrid particles can only be used with MPI!

    ERROR: Subgrid particles can only be used with MPI!

    ERROR: Subgrid particles can only be used with MPI!

    [ThreadPool] Sucessfully initialized, numThreads=1
    [ThreadPool] Sucessfully initialized, numThreads=1
    [ThreadPool] Sucessfully initialized, numThreads=1
    [ThreadPool] Sucessfully initialized, numThreads=1
    [ThreadPool] Sucessfully initialized, numThreads=1
    [ThreadPool] Sucessfully initialized, numThreads=1

    ERROR: Subgrid particles can only be used with MPI!

    [ThreadPool] Sucessfully initialized, numThreads=1
    [ThreadPool] Sucessfully initialized, numThreads=1

    ERROR: Subgrid particles can only be used with MPI!

    Best,
    Fuxin He

    #7891
    Adrian
    Keymaster

    The explanation is right there in the output you shared:

    ERROR: Subgrid particles can only be used with MPI!

    You need to compile this example using MPI as the inter-block communication of subgrid particles requires MPI.

    #7894
    Fuxin He
    Participant

    Dear Adrian

    Thanks for your reply, but I still haven’t solved him. Do you mean I should compile in parallel instead of “make”? What should I type then, how can I solve it like this?

    hfx123@ubuntu:~/olb-1.6r0/examples/particles/bifurcation3d/eulerLagrange$ mpicxx -O3 -o bifurcation3d bifurcation3d.cpp -I/home/hfx123/olb-1.6r0/src -std=c++17
    /usr/bin/ld: /tmp/ccDEk7NO.o: in function `olb::createParallelFileName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)’:
    bifurcation3d.cpp:(.text+0x7480): undefined reference to `olb::singleton::mpi()’
    /usr/bin/ld: bifurcation3d.cpp:(.text+0x7557): undefined reference to `olb::singleton::mpi()’
    /usr/bin/ld: bifurcation3d.cpp:(.text+0x75ae): undefined reference to `olb::singleton::mpi()’
    /usr/bin/ld: /tmp/ccDEk7NO.o: in function `olb::SuperParticleSystem3D<double, olb::MagneticParticle3D>::addParticle(olb::IndicatorF3D<double>&, double, double, int, int, std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >, double, int)’:

    I’m looking at “run.sh” and I know that if I compile successfully, I should type”mpirun -np 8 ./bifurcation3d 19 1000″.I hope you can tell me how to compile and run it, because I really don’t know much about parallelism!

    Best,
    Fuxin He

    #7895
    Adrian
    Keymaster

    No, you need to activate MPI in the config file (you would need to do so also for other cases as you seemingly want to run using MPI anyway, this is why you currently see all messages multiple times in your listing)

    You can check out the user guide, especially section “10.9. Lesson 9: Run Your Programs on a Parallel Machine” for more information on how to do this.

    #7898
    Fuxin He
    Participant

    Dear Adrian

    I followed this section to the file named config.mk, typed make clean and make cleanbuild in the terminal, and it still didn’t compile,Can you tell me how to compile in parallel, I’d appreciate it!

    Best,
    Fuxin He

    #7908
    Adrian
    Keymaster

    So did you actually change any values in config.mk? (As described in the user guide)

    Without further information (the actual logs instead of “still didn’t compile” for a start) I won’t be able to help you further.

    At this basic level OpenLB is a straight forward MPI application without any special requirements compared to any other MPI program.

    #7910
    Fuxin He
    Participant

    Dear Adrian

    Thanks for your patience in replying, I have changed the config.mk file already as follows:

    # Compiler to use for C++ files, change to mpic++ when using OpenMPI and GCC
    # CXX := g++
    CXX :=mpic++
    # Compiler to use for C files (used for emebedded dependencies)
    CC := gcc

    # Suggested optimized build flags for GCC, consult config/ for further examples
    CXXFLAGS := -O3 -Wall -march=native -mtune=native
    # Uncomment to add debug symbols and enable runtime asserts
    #CXXFLAGS += -g -DOLB_DEBUG

    # OpenLB requires support for C++17
    # works in:
    # * gcc 9 or later (https://gcc.gnu.org/projects/cxx-status.html#cxx17)
    # * icc 19.0 or later (https://software.intel.com/en-us/articles/c17-features-supported-by-intel-c-compiler)
    # * clang 7 or later (https://clang.llvm.org/cxx_status.html#cxx17)
    CXXFLAGS += -std=c++17

    # optional linker flags
    LDFLAGS :=

    # Parallelization mode, must be one of: OFF, MPI, OMP, HYBRID
    # Note that for MPI and HYBRID the compiler also needs to be adapted.
    # See e.g. config/cpu_gcc_openmpi.mk
    # PARALLEL_MODE := OFF
    PARALLEL_MODE := MPI

    Then it will report the following error
    https://postimg.cc/gallery/dqGGBFV

    My guess from reading chapter 9 is that I don’t have CUDA installed, which is why running “ompi_info –parsable -l 9 –all | grep mpi_built_with_cuda_support:value” results in false.

    Best,
    Fuxin He

    #7911
    Adrian
    Keymaster

    No, the lack of CUDA-awareness in MPI (this is what the command checks) has no impact here as you have not activated the GPU_CUDA platform (weirdly the PLATFORMS list is missing from your config, is this truly the full file?)

    Per your screenshot the issue is only that you did not recompile the core library after changing the config. Calling make clean-core followed by make should fix the linker error.

    #7912
    Fuxin He
    Participant

    Dear Adrian

    That’s great! Your “make clean-core” is the key to the problem, and that’s something a newbie like me really doesn’t know, thanks again for your help.

    Best,
    Fuxin He

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