Skip to content

Errors in grid refinement example cases in openlb-1.8.0

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Errors in grid refinement example cases in openlb-1.8.0

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10138
    mwkim
    Participant

    Dear OpnLB forumers,

    I am glad that now openlb supports local grid refinement.

    However, when I try the example case, error occurs during make.

    The error messages are

    
    ../../../src/particles/communication/relocation.h: In lambda function:
    ../../../src/particles/communication/relocation.h:287:40: error: request for member ‘__T295’ in non-class type ‘auto’
      287 |     const bool particleCentreInDomain = iC.operator bool();
          |                                        ^~~~~~
    ../../../src/particles/boundary/materialHandling.h: In function ‘bool olb::particles::boundaries::checkMaterialVicinity(olb::SuperIndicatorMaterial<T, PARTICLETYPE::d>&, olb::particles::Particle<T, PARTICLETYPE>&)’:
    ../../../src/particles/boundary/materialHandling.h:71:26: error: request for member ‘__T296’ in non-class type ‘auto’
       71 |   bool foundPos = latticeR.operator bool();
          |                          ^~~~~~
    make: *** [../../../default.mixed.mk:119: build/olbcuda.o] Error 1
    

    I modified the configuration file based on “gpu_only_mixed”.
    Compile is done without any error.

    I can remove error message by rewrite the code like
    bool foundPos = latticeR().operator bool();
    Then, make works well, but the simulation does not run due to many errors.

    I am not sure this is my problem or not. Does anyone have suggestions to resolve the problem?

    #10139
    Adrian
    Keymaster

    This is most likely a configuration or compiler problem on your system (the error is not in any way related to the grid refinement example and example compilation is validated for many different configurations in our CI).

    Can you share your configuration and environment details?

    #10140
    mwkim
    Participant

    Thank you for quick replying.

    I’m doubting the compiler, but I cannot reach the solution.

    The configuration file is

    
    CXX             := g++
    CC              := gcc
    CXXFLAGS        := -O3 -Wall -march=native -mtune=native
    CXXFLAGS        += -std=c++20
    # add CUDA include path and library path
    CXXFLAGS        += -I/usr/local/cuda/include -L/usr/local/cuda/lib64
    
    PARALLEL_MODE   := NONE
    
    PLATFORMS       := CPU_SISD GPU_CUDA
    
    CUDA_CXX        := nvcc
    # Adjust to CUDA / driver library path so that CXX can resolve libcuda, libcudart and libcudadevrt
    CUDA_LDFLAGS    := -L/usr/local/cuda/lib64
    # for e.g. RTX 30* (Ampere), see table in <code>rules.mk</code> for other options
    CUDA_ARCH       := 61
    
    FLOATING_POINT_TYPE        := double
    
    USE_EMBEDDED_DEPENDENCIES := ON
    

    It works for openlb-1.7.

    The below is the current environments.
    Ubuntu 22.04
    CUDA Version is 12.2
    gcc version is 11.4.0

    If you need any other details, please let me know!

    #10157
    Adrian
    Keymaster

    Ok, so I assume you can not compile any case currently, not just the refinement ones?

    I just re-checked and due to C++20 support restrictions 1.8 needs at least CUDA 12.4. However, for 12.2 I still get different errors than you. I suggest you update to 12.4 and try first with the config/gpu_only.mk.

    #10171
    mwkim
    Participant

    Yes, I can not compile any case.

    I will try your suggestion and update the results!

    I appreciate your help:)

    #10173
    mwkim
    Participant

    I get some errors with the attached configuration file even after I upgrade CUDA (12.9).

    But, when I use the configuration file as your suggestion(config/gpu_only.mk), the simulation runs without any problems!

    I will figure out the problem with my original configuration file in later.

    Again, thank you for the help!

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