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
- This topic has 5 replies, 2 voices, and was last updated 1 week, 2 days ago by mwkim.
-
AuthorPosts
-
April 30, 2025 at 8:08 am #10138mwkimParticipant
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?
April 30, 2025 at 9:13 am #10139AdrianKeymasterThis 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?
April 30, 2025 at 10:02 am #10140mwkimParticipantThank 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.0If you need any other details, please let me know!
May 5, 2025 at 9:41 am #10157AdrianKeymasterOk, 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
.May 7, 2025 at 7:16 am #10171mwkimParticipantYes, I can not compile any case.
I will try your suggestion and update the results!
I appreciate your help:)
May 7, 2025 at 12:08 pm #10173mwkimParticipantI 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!
-
AuthorPosts
- You must be logged in to reply to this topic.