If the device is not the problem and the demo exits quickly after starting, 
that's a bit weird. Could you check two things: 1) Provided that you can 
build the entire project, check if this is also the case for other demos; 
2) Step into the demo (perhaps using VSCode and gdb as the debugger) and 
see where this happens. You probably don't need to go very deep since it 
appears bad_alloc happened quickly after running. But you may need to 
rebuild the project using Debug (not Release) build option before you do 
this.

I'd also like to note right now DEME does not work on WSL so please make 
sure you are not doing this on WSL. But it looks like this is a native 
Linux machine so perhaps no issue here.

Thank you,
Ruochun

On Friday, October 11, 2024 at 12:52:41 PM UTC+8 [email protected] wrote:

> I have run the attached script. it runs well. 
> [image: 微信图片_20241011125001.jpg]
>
> Thank you,
> Weigang
>
> On Friday, October 11, 2024 at 11:26:54 AM UTC+8 Ruochun Zhang wrote:
>
>> Then to understand how/if it is related to your device, it's best to test 
>> if we can use it to do something else. I'm just giving an example: you can 
>> use your nvcc compiler to compile the attached script. If it works then 
>> it's probably not your device, and if it gives an error you know where the 
>> problem is. And if your device works all right, we have to know where the 
>> bad_alloc happened to proceed.
>>
>> Also, by that, I just meant the installation of CUDA might be the issue.
>>
>> Thank you,
>> Ruochun
>>
>> On Friday, October 11, 2024 at 11:10:55 AM UTC+8 [email protected] 
>> wrote:
>>
>>> I think that i have the GPU devices and GPU driver. If the reason is 
>>> that the  GPU devices not accessible by the system, how can i solve this 
>>> problem? Do you have any suggestion? By the way, i would like to know that 
>>> what is the meaning of CUDA runtime installation.
>>>
>>> Thank you,
>>> Weigang
>>>
>>> On Thursday, October 10, 2024 at 8:40:09 PM UTC+8 Ruochun Zhang wrote:
>>>
>>>> The previous one appears to be a linkage problem with 
>>>> filesystem-related libraries. If your compiler supports C++17, then I 
>>>> suggest you remove everything in your build folder and try rebuilding, and 
>>>> in the ccmake configuration, manually set the C++ standard to 17. If this 
>>>> does not help then maybe there is a problem with your compiler 
>>>> installation...
>>>>
>>>> As for the bad_alloc thing, it is usually a failed memory allocation 
>>>> attempt. Since this demo is small in scale, it is more likely due to that 
>>>> you have no GPU devices/GPU devices not accessible by the system/no proper 
>>>> GPU driver or CUDA runtime installation.
>>>>
>>>> Thank you,
>>>> Ruochun
>>>>
>>>> On Thursday, October 10, 2024 at 1:33:06 PM UTC+8 [email protected] 
>>>> wrote:
>>>>
>>>>> when i run the demo, there is also a error as shown below.
>>>>> [image: 微信图片_20241010132851.jpg]
>>>>>
>>>>> On Thursday, October 10, 2024 at 10:53:23 AM UTC+8 Weigang Shen wrote:
>>>>>
>>>>>> Thank you! This problem has been solved. However, there is a new 
>>>>>> error as shown below.
>>>>>> [image: 微信图片_20241010105032.jpg]
>>>>>>
>>>>>> Thank you,
>>>>>> Weigang
>>>>>>
>>>>>> On Thursday, October 10, 2024 at 9:46:36 AM UTC+8 Ruochun Zhang wrote:
>>>>>>
>>>>>>> You are probably using an old GCC version, as you'll need a 
>>>>>>> C++17-compatible compiler. You may use GCC 8 or newer.
>>>>>>>
>>>>>>> Thank you,
>>>>>>> Ruochun
>>>>>>>
>>>>>>> On Wednesday, October 9, 2024 at 10:16:04 AM UTC+8 
>>>>>>> [email protected] wrote:
>>>>>>>
>>>>>>>> Hi Ruochun,
>>>>>>>>
>>>>>>>> I am now encountering such a problem. Could you give me a help?
>>>>>>>> [image: 微信图片_20241009101157.jpg]
>>>>>>>>
>>>>>>>> Thank you,
>>>>>>>> Weigang
>>>>>>>>
>>>>>>>>

-- 
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/cdf08dbc-9441-4ade-b1d3-735bfcd6b5d4n%40googlegroups.com.

Reply via email to