Yes. This error was encountered during a *cudaGetDeviceCount *call, which 
is the first GPU-related call when constructing a DEME simulation object. 
So CUDA failed to get the number of devices. I don't know if you've been 
having success running GPU-based applications on this machine but again, I 
suspect it can't run anything GPU-related, not limited to DEME. Possible 
treatments include...
1. The NVIDIA driver installed on your system is not compatible with CUDA 
12.0, or is corrupted. You probably want to ensure a correct installation 
of a GPU driver first, if you haven't paid attention to doing that.
2. You may want to check using *nvidia-smi* to see if the OS recognizes the 
GPU at all.
3. You should ensure that you have the permissions needed to access GPUs.

In short, ensure you have GPU access. It's still good to start from a 
minimal CUDA example to debug, since it appears to be a basic environmental 
issue.

Thank you,
Ruochun

On Friday, May 10, 2024 at 9:11:52 AM UTC+8 [email protected] wrote:

> Hi Ruochun,
> I have succefully configured the DEME after the reinstallation of CUDA. 
> Thank you! It is indeed that the  multiple times installation of CUDA 
> induced the previours error. 
> When I run the demo, there is an error like this. Do you have any 
> suggestion?
> [image: 微信图片_20240510091101.jpg]
>
> On Thursday, May 9, 2024 at 7:08:28 PM UTC+8 Ruochun Zhang wrote:
>
>> To me, because CMakeCUDACompilerId.cu is a Cmake-generated minimal 
>> example and it failed to compile, it looks like the compiler is not 
>> configured properly and cannot compile anything. The solution is probably 
>> case-by-case. I am not familiar with the installation process of CUDA 
>> enough to accurately remote-diagnose (but someone else here might be). The 
>> best you can do is to write a minimal CUDA example, test if it can be 
>> compiled, and debug starting from there. However, I have a couple of 
>> guesses...
>> 1. If you installed CUDA multiple times or had multiple trials (like once 
>> from apt-get and then another time from a downloaded file), there can be 
>> conflicts. The nvcc in /usr/bin might be a symbolic link, and it could be 
>> linked against an executable that is not compatible with the CUDA toolkit. 
>> You might try to fix this symbolic link by linking it against that one in 
>> cuda-12.0/bin, or the one you think is correct.
>> 2. Just remove all installation of CUDA and start over.
>> 3. I don't know the GCC or Clang version you are using. It's not likely, 
>> but it might be too old or too new to be compatible with nvcc. GCC 9.4 
>> should be a version that works in most of my trials, in case you wish to 
>> give it a try.
>>
>> That is all I can think of at this point, thank you,
>> Ruochun
>> On Thursday, May 9, 2024 at 4:54:34 PM UTC+8 [email protected] wrote:
>>
>>> After press c to configure, there is also an error like this:
>>> [image: 5c8b56934e5f50fa728c05edc5b5ffd.jpg]
>>>
>>> On Thursday, May 9, 2024 at 2:27:59 PM UTC+8 Ruochun Zhang wrote:
>>>
>>>> Can you please press c to configure the project, so we might know what 
>>>> is still missing for the project? If nothing goes wrong, then try pressing 
>>>> g to generate the project.
>>>>
>>>> Thank you,
>>>> Ruochun
>>>>
>>>> On Thursday, May 9, 2024 at 10:11:05 AM UTC+8 [email protected] 
>>>> wrote:
>>>>
>>>>> I updated the cmake from 3.20 to 3.29, which made it find the nvcc. 
>>>>> However, the ccmake GUI is empty now.
>>>>> [image: 微信图片_20240509100541.jpg]
>>>>>
>>>>>
>>>>> On Thursday, May 9, 2024 at 3:36:40 AM UTC+8 Ruochun Zhang wrote:
>>>>>
>>>>> It looks like it found the compiler nvcc this time, but it's not 
>>>>> working correctly... How did you make it find nvcc in */usr/bin* this 
>>>>> time? I thought you had nvcc in another location last time. You 
>>>>> re-installed? And can you show the ccmake GUI this time as well?
>>>>>
>>>>> Ruochun
>>>>>
>>>>> On Wednesday, May 8, 2024 at 5:16:58 PM UTC+8 [email protected] 
>>>>> wrote:
>>>>>
>>>>> Hi Dr. Zhang,
>>>>>
>>>>> I still encountered a error like this. Do you have any suggestion?
>>>>>
>>>>> Thanks!
>>>>> [image: a391d46ae4497f81bd18b7e111b4842.jpg]
>>>>> On Tuesday, May 7, 2024 at 8:20:57 PM UTC+8 Ruochun Zhang wrote:
>>>>>
>>>>> Doesn't look like it finds a CUDA compiler at all. It appears that 
>>>>> /usr/bin is checked but it's not found there. Please make sure your CUDA 
>>>>> installation is in PATH. Maybe the troubleshooting part of this 
>>>>> section 
>>>>> <https://github.com/projectchrono/DEM-Engine?tab=readme-ov-file#compilation>
>>>>>  
>>>>> of DEME manual can help you.
>>>>>
>>>>> Thank you,
>>>>> Ruochun
>>>>>
>>>>> On Tuesday, May 7, 2024 at 7:14:18 PM UTC+8 [email protected] wrote:
>>>>>
>>>>> The ccmake GUI and the configure error are shown below. I do not see 
>>>>> anything related to  CUDA_ARCHITECTURES or CUDA_PATH.
>>>>> [image: 微信图片_20240507191053.jpg] [image: 微信图片_20240507191047.jpg]
>>>>>
>>>>> On Tuesday, May 7, 2024 at 6:12:11 PM UTC+8 Ruochun Zhang wrote:
>>>>>
>>>>> Looks all good. Please show your ccmake GUI when configuring the 
>>>>> project: You may see in there a few missing items that the autodetection 
>>>>> failed to identify. Could be CUDA_ARCHITECTURES or CUDA_PATH related.
>>>>> If this is the case, then we may help you fill them out manually.
>>>>>
>>>>> Ruochun
>>>>> On Tuesday, May 7, 2024 at 5:23:14 PM UTC+8 [email protected] wrote:
>>>>>
>>>>> Hi Dr. Zhang:
>>>>>
>>>>> The versions of cmake and cuda, and the model of GPU are shown below.
>>>>>
>>>>> Thank you!
>>>>> [image: 微信图片_20240507171644.jpg]
>>>>>
>>>>> On Tuesday, May 7, 2024 at 4:50:27 PM UTC+8 Ruochun Zhang wrote:
>>>>>
>>>>> Hi Dr. Shen,
>>>>>
>>>>> A couple of questions: What is your cmake version, what is your CUDA 
>>>>> version, and what model is the GPU you have on your system?
>>>>>
>>>>> Thank you,
>>>>> Ruochun
>>>>>
>>>>> On Tuesday, May 7, 2024 at 8:37:47 AM UTC+8 [email protected] wrote:
>>>>>
>>>>> Hello everyone,
>>>>>
>>>>> When i build the c++ DEME, there is an error as shown in the figure 
>>>>> below.
>>>>>
>>>>> Coould anyone give me a help?
>>>>>
>>>>> Thanks![image: 微信图片_20240507083122.jpg]
>>>>>
>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/53bb1bbc-b76d-4cd9-b184-439d4c2f74f4n%40googlegroups.com.

Reply via email to