Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] CUDA sample fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
kelvin34501
n00b
n00b


Joined: 05 Oct 2018
Posts: 9

PostPosted: Sat Oct 06, 2018 3:46 am    Post subject: [SOLVED] CUDA sample fails Reply with quote

I tried to run some cuda samples, but it returns with following error message:

Code:
/opt/cuda/sdk/bin/x86_64/linux/release $ ./deviceQuery
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 30
-> unknown error
Result = FAIL


I installed these packages:
Code:

$ equery list 'nvidia*'
 * Searching for nvidia* ...
[IP-] [  ] dev-util/nvidia-cuda-sdk-9.2.88:0
[IP-] [  ] dev-util/nvidia-cuda-toolkit-9.2.88:0/9.2.88
[IP-] [  ] x11-drivers/nvidia-drivers-396.54:0/396


The result of nvidia-smi:
Code:

$ nvidia-smi
Sat Oct  6 11:40:18 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.54                 Driver Version: 396.54                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1080    Off  | 00000000:1C:00.0  On |                  N/A |
|  8%   49C    P0    45W / 250W |    313MiB /  8116MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      4365      G   /usr/bin/X                                   159MiB |
|    0      4535      G   kwin_x11                                      28MiB |
|    0      4543      G   /usr/bin/krunner                               2MiB |
|    0      4545      G   /usr/bin/plasmashell                         106MiB |
|    0      4760      G   /usr/bin/akonadi_archivemail_agent             2MiB |
|    0      4782      G   /usr/bin/akonadi_mailfilter_agent              2MiB |
|    0      4790      G   /usr/bin/akonadi_sendlater_agent               2MiB |
|    0      4996      G   /usr/lib64/firefox/firefox                     2MiB |
|    0      5267      G   /usr/lib64/firefox/firefox                     2MiB |
|    0      5432      G   /usr/lib64/firefox/firefox                     2MiB |
+-----------------------------------------------------------------------------+


nvcc version:
Code:

$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Wed_Apr_11_23:16:29_CDT_2018
Cuda compilation tools, release 9.2, V9.2.88


Are there any solutions? or where can I get more help for this?


Last edited by kelvin34501 on Sun Oct 14, 2018 11:33 am; edited 1 time in total
Back to top
View user's profile Send private message
Tyler_Durden
Apprentice
Apprentice


Joined: 27 Jul 2004
Posts: 189
Location: Germany

PostPosted: Sun Oct 07, 2018 3:43 pm    Post subject: Reply with quote

https://devtalk.nvidia.com/default/topic/1037521/linux/cuda-broken-in-396-24-02-and-396-24-10-vulkan-beta-drivers-on-linux/post/5274062/#5274062
_________________
Gentoo 17.1 x86_64
Intel Core i9-9900K
Asus MAXIMUS XI HERO
AMD Radeon 6800XT
64GB DDR4
Samsung SSD 970 EVO Plus 1TB
8x Seagate Archive (SATA-RAID 64TB)
Digital Devices Cine S2 V6.5 DVB Adapter
Back to top
View user's profile Send private message
Aiken
Apprentice
Apprentice


Joined: 22 Jan 2003
Posts: 239
Location: Toowoomba/Australia

PostPosted: Sun Oct 07, 2018 8:34 pm    Post subject: Reply with quote

The tool and driver version are the same as what I am using with a gtx1060. If you do a strace you may find it is not finding /sys/devices/system/node which is related to numa. It barfs when that directory is not found. I enabled

CONFIG_NUMA=y
CONFIG_CPUSETS=y

After a driver upgrade breaking cuda for me those 2 kernel options got it working again.
_________________
Beware the grue.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2573
Location: Here and Away Again

PostPosted: Mon Oct 08, 2018 7:43 pm    Post subject: ><)))°€ Reply with quote

I guess this is about the same issue that I bumped into while using NVENC with OBS Studio/FFmpeg.

There are other directories that can be seen as not found while 'stracing', too, but I set up the daemons and whatnot that would create them, which did not help.

I also set

Code:
CONFIG_NUMA=y
CONFIG_ACPI_NUMA=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_SCHED=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y

which did not help either.

See also: Bug 663234 - >=x11-drivers/nvidia-drivers-396 should check for CONFIG_NUMA to enable CUDA library usage

Have not tried again since 2018-08-13 or so, after my comment in said bug. Might just be the fact that I don't have 'CONFIG_CPUSETS' set, but I'd rather see nvidia fixed this, than me enabling new options in the kernel since it seems to have been an unintentional requirement [1].

1. https://devtalk.nvidia.com/default/topic/1038207/linux/please-lift-numa-dependency-of-cuda-or-provide-a-test-for-it-in-the-installer-and-kernel-module/post/5276649/#5276649
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
kelvin34501
n00b
n00b


Joined: 05 Oct 2018
Posts: 9

PostPosted: Sun Oct 14, 2018 11:32 am    Post subject: Reply with quote

It seems CONFIG_NUMA=y doesn't come with the default kernel config.

After enable that option everything works.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum