You are not logged in.

#1 2020-02-15 18:00:09

stefano
Member
Registered: 2011-04-09
Posts: 181

[SOLVED] Cannot get nvidia OpenCl to be recognized

I am trying to use an application that needs OpenCl, but I cannot get it to  see the nvidia card I have installed.
Some info:

1. Checking that which openCl implementations are active on my system as per the wiki page:

stefano@gorgias $ ls /etc/OpenCL/vendors
mesa.icd  nvidia.icd

2. Checking  data about the installed card:

stefano@gorgias  $ nvidia-smi 
Sat Feb 15 11:48:48 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.132                Driver Version: 390.132                   |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro 2000         Off  | 00000000:03:00.0  On |                  N/A |
| 37%   73C    P0    N/A /  N/A |    803MiB /   962MiB |      5%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       926      G   /usr/lib/Xorg                                197MiB |
|    0    102233      G   /usr/bin/kwin_x11                              7MiB |
|    0    102237      G   /usr/bin/plasmashell                         152MiB |
|    0    102835      G   ...uest-channel-token=15412631400218406066   333MiB |
|    0    105401      G   /usr/bin/krunner                              11MiB |
|    0    414013      G   python2                                        1MiB |
|    0    867482      G   konqueror                                      4MiB |
|    0   1132879      G   python2                                       73MiB |

3. Checking that packages are installed:

stefano@gorgias ~ $ pacman -Qs nvidia
local/lib32-nvidia-390xx-utils 390.132-1
    NVIDIA drivers utilities (32-bit), 390xx legacy branch
local/libvdpau 1.3-1
    Nvidia VDPAU library
local/libxnvctrl-390xx 390.129-1
    NVIDIA NV-CONTROL X extension, 390xx legacy branch
local/nvidia-390xx 390.132-26
    NVIDIA drivers for linux, 390xx legacy branch
local/nvidia-390xx-settings 390.129-1
    Tool for configuring the NVIDIA graphics driver, 390xx legacy branch
local/nvidia-390xx-utils 390.132-2
    NVIDIA drivers utilities
local/nvidia-cg-toolkit 3.1-5
    NVIDIA Cg libraries
local/opencl-nvidia-390xx 390.132-2
    OpenCL implemention for NVIDIA

4. And yet, clinfo cannot find the nvidia platform or device:

stefano@gorgias ~ $ clinfo
Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 19.3.3
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

Platform Name                                   Clover
Number of devices                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   
  clCreateContext(NULL, ...) [default]            No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No devices found in platform

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.12
  ICD loader Profile                              OpenCL 2.2

What am I missing?

Last edited by stefano (2020-02-20 16:06:38)

Offline

#2 2020-02-15 21:40:04

Thorsten Reinbold
Member
From: Germany
Registered: 2011-12-06
Posts: 353

Re: [SOLVED] Cannot get nvidia OpenCl to be recognized

Just a thought: Have you tried to remove opencl-mesa?

Offline

#3 2020-02-15 21:47:40

stefano
Member
Registered: 2011-04-09
Posts: 181

Re: [SOLVED] Cannot get nvidia OpenCl to be recognized

Thorsten Reinbold wrote:

Just a thought: Have you tried to remove opencl-mesa?

I hadn't but I tried and it does not help:

stefano@gorgias ~ $ sudo pacman -Rss opencl-mesa
[sudo] password for stefano: 
checking dependencies...
:: ocl-icd optionally requires opencl-driver: packaged opencl driver

Packages (2) libclc-0.2.0+589+9aa6f35-1  opencl-mesa-19.3.3-1

Total Removed Size:  77.03 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
(1/2) removing opencl-mesa                                                              [###################################################] 100%
(2/2) removing libclc                                                                   [###################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

Now I have no platforms at all:

stefano@gorgias ~ $ clinfo
Number of platforms                               0

It definitely looks like nvidia is not recognized

Last edited by stefano (2020-02-15 21:48:02)

Offline

#4 2020-02-15 21:59:26

Thorsten Reinbold
Member
From: Germany
Registered: 2011-12-06
Posts: 353

Re: [SOLVED] Cannot get nvidia OpenCl to be recognized

I have no real idea, but it would for sure be helpful, if you could post your Xorg.0.log. And maybe it is also useful to know which application you are trying to run...

Last edited by Thorsten Reinbold (2020-02-15 22:01:53)

Offline

#5 2020-02-16 15:51:15

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,063

Re: [SOLVED] Cannot get nvidia OpenCl to be recognized

No idea if it matters, but libxnvctrl and  nvidia-390xx-settings  are an older version then the others .
390.129 vs 390.132 .

Can you remove those 2 older ones for testing purposes ?


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#6 2020-02-16 16:48:42

stefano
Member
Registered: 2011-04-09
Posts: 181

Re: [SOLVED] Cannot get nvidia OpenCl to be recognized

Thorsten Reinbold wrote:

I have no real idea, but it would for sure be helpful, if you could post your Xorg.0.log. And maybe it is also useful to know which application you are trying to run...

Here is the pastebin of the Xorg log:
https://pastebin.com/gkxG0hVa

I am really bad with X, so I don't know what I should be looking for.

As for the app: eventually I want to have a go at TensorFlow, but my current tests are with leela-zero, which is a deep-learning Go|Baduk|Weiqi playing engine: https://aur.archlinux.org/packages/leela-zero/


Also, should X be restarted after every package addition/removal or every tweak?

Offline

#7 2020-02-16 16:49:54

stefano
Member
Registered: 2011-04-09
Posts: 181

Re: [SOLVED] Cannot get nvidia OpenCl to be recognized

Lone_Wolf wrote:

No idea if it matters, but libxnvctrl and  nvidia-390xx-settings  are an older version then the others .
390.129 vs 390.132 .

Can you remove those 2 older ones for testing purposes ?

I tried, it seems to have no effect. I still get:
"Number of platforms                               0"

Offline

#8 2020-02-20 16:06:21

stefano
Member
Registered: 2011-04-09
Posts: 181

Re: [SOLVED] Cannot get nvidia OpenCl to be recognized

I am not sure how the issue sorted itself out, but after reinstalling cuda and going through a couple of reboots I now have both opencCl and cuda working

Last edited by stefano (2020-02-20 16:07:03)

Offline

Board footer

Powered by FluxBB