DEME - Compilation error

70 views
Skip to first unread message

Davide Graziato

unread,
Jun 20, 2025, 6:00:31 AMJun 20
to ProjectChrono
Hi,
I am currently trying to build the C++ version of DEME in my machine but unable to do so.
I am using:
- Nvidia driver 535.230.02 
- Cuda 12.6
 - running Ubuntu 22.04
The compilation starts but fails and returns this output (see attached file) when building the Demos. I am not  very proficient in debugging compilation errors in Cuda. Any help would be greatly appreciated.

 
compile_output.txt

Ruochun Zhang

unread,
Jun 20, 2025, 6:57:07 AMJun 20
to ProjectChrono
I guess no one could call themselves proficient in debugging compilation errors in CUDA, it's not a pleasant profession. The error you got looks like while compiling CUB, the compiler had some linker issues. I don't have this issue, but maybe the toolchain I used resolved it automatically for me. Perhaps you should, like indicated in DEME's README, first try ensuring your PATH and LD_LIBRARY_PATH have the correct content (cuda-xx.x/lib64 and such), as newer CUDA may have introduced some new requirements which can be automatically resolved. I hope this will solve the problem, but if not we'll have to have a look at your CMakeCache.txt.

Thank you,
Ruochun

Davide Graziato

unread,
Jun 20, 2025, 8:30:10 AMJun 20
to ProjectChrono
It seems that the PATH and LD_LIBRARY_PATH are correct and linking to  CUDA 12.6 (I have followed the guide in the github page).
I'll leave the CMakeChace.txt file, I found that some of the CUDA libraries are not found but I don't know if they are essential for correctly compile DEME.

CMakeCache.txt

Ruochun Zhang

unread,
Jun 20, 2025, 11:40:58 AMJun 20
to ProjectChrono
I don't see anything inherently wrong in the CMake cache. At this point, what I can suggest is that, if you haven't done it already, update CMake, CUDA, and your driver to the newest, especially CMake if it's not very recent. Then double-check your LD_LIBRARY_PATH, making sure what's inside it are directories that exist. Then try rebuilding the project. You'll need to remove absolutely everything in the build directory before rebuilding it. 

If this doesn't fix the problem, we'll probably have to manually add some -l options. But as I can't reproduce the problem, I am not 100% sure what they should be, and I hesitate to start asking you to try all the different combinations. In any case, I think an updated toolchain should fix it.

Thank you,
Ruochun

Davide Graziato

unread,
Jul 2, 2025, 11:20:59 AMJul 2
to ProjectChrono
Managed to compile the library by updating Cmake and reinstalling CUDA 12.6 from scratch!

Ruochun Zhang

unread,
Jul 2, 2025, 1:31:49 PMJul 2
to ProjectChrono
Good to know then!

Ruochun

Reply all
Reply to author
Forward
0 new messages