DEM-Engine Issues

135 views
Skip to first unread message

Mahmoud Yaseen

unread,
Apr 8, 2025, 1:25:27 PM4/8/25
to ProjectChrono
Hello All,

I am trying to run the tutorial BallDrop2D on the github repo, When I try to compile the .cpp file, I get an error stating that cmake version is not compatible. Needs minimum version 3.27. The version I have is up to date 3.27.7. 

Also, I tried to run it PyDEME version, my GPU is recongized and my cuda version is 12.2. I tried older versions like 11, but when I run the example I get runtime error and cuda version is defined. My question is what is the best cuda version suitable for PyDEME that will not cause problems?

Thanks

Ruochun Zhang

unread,
Apr 8, 2025, 2:31:05 PM4/8/25
to ProjectChrono
Hi Mahmoud,

With what we have here, I feel both issues are related to multiple installations.

For cmake, it could be that you have multiple cmake installations, in which case you should specify the one you want to use in PATH. Or if you are using ccmake, perhaps it's linked against a cmake backend which is old. Reinstalling them should always work... The README document of DEME has a link to a guide on updating cmake to the newest. It's written for WSL, but works for Linux as well.

For CUDA, I'm pretty sure 11.3 and 12.1~12.3 do not work, which may include the versions you tried. This is a limitation I cannot overcome and you just have to use a different version. I would just recommend the newest CUDA; or try 12.0, if you want to be safe. The most important thing is to set the CUDA-related environment variables correctly before compilation, if you have multiple installations.  The README document of DEME also contains some guidance on how to do that.

Ruochun

Kelvin Ding

unread,
Jan 9, 2026, 4:46:45 AMJan 9
to ProjectChrono
Hi Ruochun, I encountered a similar issue when compiling the DEM-engine. My CUDA version is 13.0. After generating the .sln file via CMake, I tried to build the solution in MSVS 2022, but the build failed with the error message shown in the image below. How should I resolve this? Best regards, Ding

屏幕截图 2026-01-09 174529.png

Ruochun Zhang

unread,
Jan 9, 2026, 5:04:00 AMJan 9
to ProjectChrono
Hi Ding,

CUDA13 removed a bunch of things DEME currently uses. We should be able to push a new version in a few days which fixes this problem and provides huge performance boosts. I'll reply here when it is out. So I'd say you either wait a few days, or use CUDA 12.8 or below.

Thank you,
Ruochun

Ruochun Zhang

unread,
Jan 14, 2026, 11:37:02 AMJan 14
to ProjectChrono
Hi Ding,

If you are willing to, you can help us by testing if the CUDA13 branch (https://github.com/projectchrono/DEM-Engine/tree/CUDA13) works on your machine with CUDA13 installed. Just so you know, the performance update I mentioned last time, is postponed. So this branch is DEME with the old performance which is still good. Let me know if you find it usable.

Thank you,
Ruochun

Kelvin Ding

unread,
Jan 20, 2026, 7:51:50 AM (14 days ago) Jan 20
to ProjectChrono
Hi Ruochun,
Thank you and your team for your ongoing efforts. However, I regret to tell you that the DEM-engine based on CUDA 13.0 failed to compile on my end. The error messages are as follows:
Total num of triangles: 320
Total num of particles: 200958
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEMPrepForceKernels(5): warning: curand_kernel.h: [jitify] File not found
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEMBinSphereKernels(5): warning: curand_kernel.h: [jitify] File not found
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEMCalcForceKernels(6): warning: curand_kernel.h: [jitify] File not found
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEMContactKernels_SphereSphere(5): warning: curand_kernel.h: [jitify] File not found
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEMCollectForceKernels_Compact(5): warning: curand_kernel.h: [jitify] File not found
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEMBinTriangleKernels(6): warning: curand_kernel.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
DEMIntegrationKernels(5): warning: curand_kernel.h: [jitify] File not found
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEMContactKernels_SphereTriangle(6): warning: curand_kernel.h: [jitify] File not found
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEMHistoryMappingKernels(5): warning: curand_kernel.h: [jitify] File not found
DEM/Defines.h(16): warning: cuda_runtime.h: [jitify] File not found
CUDAMathHelpers.cuh(49): warning: cuda_runtime.h: [jitify] File not found
DEMOwnerQueryKernels(5): warning: curand_kernel.h: [jitify] File not found
Output at 10 FPS
Frame: 0

C:\Users\dkq\Downloads\DEM-Engine-cuda13-build\bin\Release\DEMdemo_BallDrop.exe (进程 8704)已退出,代码为 -1 (0xffffffff)。

屏幕截图 2026-01-20 205038.png
Wish you all the best ,
Ding

Ruochun Zhang

unread,
Jan 20, 2026, 8:35:33 AM (14 days ago) Jan 20
to ProjectChrono
Hi Ding,

First it looks like errors when running the demo. So it does compile; it encounters a just-in-time compilation error because cuda_runtime.h and curand_kernel.h are not found, right?

CUDA13 branch has some critical new updates today. So I'd suggest you use the newest code (do a pull now), then recompile using an empty folder from scratch, and try again. If the problem persists, please let me know and if so, I'm pretty sure it's on Windows platform only and some further testing on my side is needed...

Thank you,
Ruochun

Kelvin Ding

unread,
Jan 22, 2026, 6:59:07 AM (12 days ago) Jan 22
to ProjectChrono
Hi Ruochun, I recompiled the newest code following the steps you provided, but the same error as shown in the previous screenshot still occurs. Best regards, Ding

Ruochun Zhang

unread,
Jan 23, 2026, 3:50:04 AM (11 days ago) Jan 23
to ProjectChrono
Hi Ding,

I tested it myself, and I cannot reproduce it. The code runs well for me with CUDA13 (I am using 13.1 but most likely 13.0 is the same).

The "warning: xxxxxxx.h: [jitify] File not found" messages you saw are not errors. Those are warnings associated with perhaps some file structure changes on the CUDA side; I got them too (we may have to bear with them now), but the code runs fine afterwards.

It's not clear to me why the ensuing memory error occurred (I didn't have them). It looks like a Windows dbghelp.dll problem in your case, rather than DEME's problem. You may be able to get more information regarding this error by running
compute-sanitizer --tool memcheck DEMdemo_BallDrop.exe
To see if it is indeed a host error. You may also want to check if your NVIDIA driver's version supports your current CUDA installation (by running nvidia-smi).

In any case, the simplest solution may be using DEME in WSL2, rather than on plain Windows. It's more tested and you won't have dbghelp.dll problems there, that's for sure.

Thank you,
Ruochun
Reply all
Reply to author
Forward
0 new messages