sofa icon indicating copy to clipboard operation
sofa copied to clipboard

Problem including SofaCUDA plugin - compilation errors

Open em-ni opened this issue 2 years ago • 2 comments

Hello, I'am having troubles compiling the SofaCUDA plugin -Ubuntu 22.04 -SOFA 22.12 -gcc 11 -nvcc version:

  nvcc: NVIDIA (R) Cuda compiler driver
  Copyright (c) 2005-2023 NVIDIA Corporation
  Built on Fri_Jan__6_16:45:21_PST_2023
  Cuda compilation tools, release 12.0, V12.0.140
  Build cuda_12.0.r12.0/compiler.32267302_0

I get this error: error: identifier "umul24" is undefined from: .../applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaContactMapper.cu(88)

I tried to solve replacing this line: map[curTestEntry.newIndex + threadIdx.x] = umul24(curTestEntry.elem1,nbPointsPerElem) + c.p1; with this line: map[curTestEntry.newIndex + threadIdx.x] = curTestEntry.elem1*nbPointsPerElem + c.p1;

but I get even more errors now, so I thought the plugin was written for a specific cuda version. Is that correct? Should I change my cuda toolkit version together with the gcc version?

em-ni avatar Mar 11 '24 22:03 em-ni

It's probably due to the version of CUDA. You can try to downgrade to cuda 11. But you can also upgrade SOFA (v23.12), as it is now compatible with CUDA 12.

alxbilger avatar Mar 12 '24 12:03 alxbilger

Thank you, it's working now

em-ni avatar Mar 15 '24 05:03 em-ni