Skip to content

Reply To: gpu usage question

#7256
Adrian
Keymaster

CUDA 12 was released after OpenLB 1.5 and contains compilation breaking include changes (i.e. error: namespace "thrust" has no member "device"). While the next release will provide direct CUDA 12 support, what you can do today is to add #include <thrust/execution_policy.h> to the includes of src/core/platform/gpu/cuda/column.h.

OpenLB has been successfully used on RTX 3090 GPUs and the default configs even already contain the correct CUDA_ARCH value. The “Value c++-17 is not defined for option std…” error you encounter is not expected, did you follow the comments in config/gpu_openmpi.mk to provide the OpenMPI flags for the nvcc compiler? If so this may explain the problem and I will be able to help if you post your config.mk and the outputs of mpicxx --showme:compile and mpicxx --showme:link. (You can also try the non-MPI config config/gpu_only.mk for comparison).

If you only copied the unmodifed config I will need more details on your system and CUDA setup as -std=... is the flag used to set the C++ standard version and nobody has reported your particular error before. I also just re-confirmed that this example compiles with CUDA 12.0 on our cluster.