OpenCL lib not detected AMD 5500XT and Mint 20

It seems that a lot of GPU problems revolve around specific versions of drivers. Though AMD has their own support structure, you can often learn from information reported by others who fold.

Moderators: Site Moderators, FAHC Science Team

jeffmr4
Posts: 20
Joined: Mon Apr 06, 2020 9:23 am

OpenCL lib not detected AMD 5500XT and Mint 20

Post by jeffmr4 »

After getting fahcontrol installed (with much work), the amdgpu-pro drivers installed (with everything installed ./amdgpu-pro-install --opencl=pal,legacy) and adding myself and fahclient to the render group I have been able to get my graphics card identified by fahcontrol. Unfortunately, when I try to use it it attempts to connect to 192.0.2.1:80 and :8080 and is not able download anything. With the following from the log,

Code: Select all

ERROR:WU00:FS01:Exception: Failed to connect to 192.0.2.1:80: Connection timed out
09:21:26:WU00:FS01:Connecting to assign1.foldingathome.org:80
09:21:26:WU00:FS01:Assigned to work server 192.0.2.1
09:21:26:WU00:FS01:Requesting new work unit for slot 01: READY gpu:0:Navi 14 [Radeon RX 5500/5500M / Pro 5500M] from 192.0.2.1
09:21:26:WU00:FS01:Connecting to 192.0.2.1:8080
System Info shows the GPU but says that OpenCL is not detected (no libOpenCL.so) but I installed the drivers with opencl requested. Can anyone help so I can get the card folding?

Thanks.
ajm
Posts: 750
Joined: Sat Mar 21, 2020 5:22 am
Location: Lucerne, Switzerland

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by ajm »

Either you don't have OpenCL installed, or you don't have the right one, or you have several installed.
In all those cases, your GPU is blacklisted and your system is directed to 192.0.2.1, so that it doesn't download a WU which will return errors.
The "right" OpenCL would be the dev package:

Code: Select all

sudo apt install ocl-icd-opencl-dev
jeffmr4
Posts: 20
Joined: Mon Apr 06, 2020 9:23 am

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by jeffmr4 »

I removed the amdgpu-pro drivers, boinc-client-opencl and installed per your instruction but get,

CUDA Not detected cuInit() returned 100
OpenCL Not detected clGetPlatformIDs() returned -1001

I also tried to purge any nvidia files from the system.

Any ideas?
Neil-B
Posts: 1996
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon E5-2697v3@2.60GHz, 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon E3-1505Mv5@2.80GHz, 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: i7-960@3.20GHz, 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by Neil-B »

iirc you need both the amd drivers and the .dev from what I have seen in other threads ... iirc there is at least one thread specific to building in mint 20 - I'll try to find it ... this may have some stuff in in that might assist viewtopic.php?f=108&t=35820&hilit=mint+20 - realise for the most part it is nvidia but some of it (vendor drivers and the .dev) may hold true
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
ajm
Posts: 750
Joined: Sat Mar 21, 2020 5:22 am
Location: Lucerne, Switzerland

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by ajm »

You do need the amdgpu-pro drivers!
Just use the standard install

Code: Select all

$ ./amdgpu-pro-install -y

and you won't have "their" OpenCL: https://amdgpu-install.readthedocs.io/e ... ro-variant
Then the OpenCL dev package. And reboot.
jeffmr4
Posts: 20
Joined: Mon Apr 06, 2020 9:23 am

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by jeffmr4 »

Well I removed the amdgpu-pro drivers and the dev ones and re-installed in that order. Still have the same error messages listed above. Clinfo shows 0 for opencl installed. It showed 1 before when the amdgpu-pro opencl was installed.
ajm
Posts: 750
Joined: Sat Mar 21, 2020 5:22 am
Location: Lucerne, Switzerland

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by ajm »

Two ideas:
Try the headless mode installation (still with the dev package and not forgetting to reboot):

Code: Select all

$ ./amdgpu-pro-install -y --opencl=pal,legacy --headless
And try a former version of the drivers. I have had one case (in Windows) where the newest AMD drivers couldn't help messing with Open CL. And the former ones did work.
jeffmr4
Posts: 20
Joined: Mon Apr 06, 2020 9:23 am

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by jeffmr4 »

1 same results, 2 won't boot.
ajm
Posts: 750
Joined: Sat Mar 21, 2020 5:22 am
Location: Lucerne, Switzerland

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by ajm »

Try the All-Open stack, then. If those work, as they don't come with OpenCL at all, it might be better for FAH (still with the dev package, of course).
tchiers
Posts: 23
Joined: Tue Oct 23, 2018 4:23 am

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by tchiers »

jeffmr4 wrote: ./amdgpu-pro-install --opencl=pal,legacy
This should be correct. What does

Code: Select all

clinfo

and

Code: Select all

sudo -u fahclient clinfo
report?
jeffmr4
Posts: 20
Joined: Mon Apr 06, 2020 9:23 am

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by jeffmr4 »

tchiers,

Code: Select all

clinfo
Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.1 AMD-APP (3143.9)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback cl_amd_offline_devices 
  Platform Host timer resolution                  1ns
  Platform Extensions function suffix             AMD

  Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 1
  Device Name                                     gfx1012
  Device Vendor                                   Advanced Micro Devices, Inc.
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 2.0 AMD-APP (3143.9)
  Driver Version                                  3143.9 (PAL,LC)
  Device OpenCL C Version                         OpenCL C 2.0 
  Device Type                                     GPU
  Device Board Name (AMD)                         Radeon RX 5500 XT
  Device Topology (AMD)                           PCI-E, 09:00.0
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               11
  SIMD per compute unit (AMD)                     4
  SIMD width (AMD)                                32
  SIMD instruction width (AMD)                    1
  Max clock frequency                             1900MHz
  Graphics IP (AMD)                               10.12
  Device Partition                                (core)
    Max number of sub-devices                     11
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x1024
  Max work group size                             256
  Preferred work group size (AMD)                 256
  Max work group size (AMD)                       1024
  Preferred work group size multiple              32
  Wavefront width (AMD)                           32
  Preferred / native vector sizes                 
    char                                                 4 / 4       
    short                                                2 / 2       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 1 / 1        (cl_khr_fp16)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     No
    Infinity and NANs                             No
    Round to nearest                              No
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              8573157376 (7.984GiB)
  Global free memory (AMD)                        8306688 (7.922GiB)
  Global memory channels (AMD)                    4
  Global memory banks per channel (AMD)           4
  Global memory bank width (AMD)                  256 bytes
  Error Correction support                        No
  Max memory allocation                           7059013632 (6.574GiB)
  Unified memory for Host and Device              No
  Shared Virtual Memory (SVM) capabilities        (core)
    Coarse-grained buffer sharing                 Yes
    Fine-grained buffer sharing                   Yes
    Fine-grained system sharing                   No
    Atomics                                       No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       2048 bits (256 bytes)
  Preferred alignment for atomics                 
    SVM                                           0 bytes
    Global                                        0 bytes
    Local                                         0 bytes
  Max size for global variable                    6353112064 (5.917GiB)
  Preferred total size of global vars             8573157376 (7.984GiB)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        16384 (16KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            134217728 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   256 bytes
    Pitch alignment for 2D image buffers          256 pixels
    Max 2D image size                             16384x16384 pixels
    Max 3D image size                             2048x2048x2048 pixels
    Max number of read image args                 128
    Max number of write image args                64
    Max number of read/write image args           64
  Max number of pipe args                         16
  Max active pipe reservations                    16
  Max pipe packet size                            2764046336 (2.574GiB)
  Local memory type                               Local
  Local memory size                               65536 (64KiB)
  Local memory syze per CU (AMD)                  65536 (64KiB)
  Local memory banks (AMD)                        32
  Max number of constant args                     8
  Max constant buffer size                        7059013632 (6.574GiB)
  Preferred constant buffer size (AMD)            16384 (16KiB)
  Max size of kernel argument                     1024
  Queue properties (on host)                      
    Out-of-order execution                        No
    Profiling                                     Yes
  Queue properties (on device)                    
    Out-of-order execution                        Yes
    Profiling                                     Yes
    Preferred size                                262144 (256KiB)
    Max size                                      8388608 (8MiB)
  Max queues on device                            1
  Max events on device                            1024
  Prefer user sync for interop                    Yes
  Number of P2P devices (AMD)                     0
  P2P devices (AMD)                               <printDeviceInfo:147: get number of CL_DEVICE_P2P_DEVICES_AMD : error -30>
  Profiling timer resolution                      1ns
  Profiling timer offset since Epoch (AMD)        1597005654959312626ns (Sun Aug  9 15:40:54 2020)
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Thread trace supported (AMD)                  Yes
    Number of async queues (AMD)                  4
    Max real-time compute queues (AMD)            1
    Max real-time compute units (AMD)             0
  printf() buffer size                            4194304 (4MiB)
  Built-in kernels                                (n/a)
  Device Extensions                               cl_khr_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_khr_gl_depth_images cl_amd_device_attribute_query cl_amd_media_ops cl_amd_media_ops2 cl_khr_image2d_from_buffer cl_khr_subgroups cl_khr_gl_event cl_khr_depth_images cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_amd_copy_buffer_p2p 

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              Success [AMD]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   gfx1012
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   gfx1012
  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)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   gfx1012
and,

Code: Select all

sudo -u fahclient clinfo
[sudo] password for jeffmr:     
Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.1 AMD-APP (3143.9)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback cl_amd_offline_devices 
  Platform Host timer resolution                  1ns
  Platform Extensions function suffix             AMD

  Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              No 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
This is all with the install you mention and with ocl-icd-opencl-dev.
gunnarre
Posts: 559
Joined: Sun May 24, 2020 7:23 pm
Location: Norway

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by gunnarre »

The clinfo command shows that this is a permissions issue with newer versions of Ubuntu and Mint, but it can be solved:
Add fahclient to the video and render groups:

Code: Select all

sudo adduser fahclient video
sudo adduser fahclient render
The service starter also might have to updated like this:
(..) After adding the fahclient user to the groups video and render, run

Code: Select all

sudo /etc/init.d/FAHClient stop
put this in /etc/systemd/system/FAHClient.service

Code: Select all

    [Unit]
    Description=Folding@Home Client
    After=network.target

    [Service]
    Type=simple
    ExecStart=/usr/bin/FAHClient /etc/fahclient/config.xml --pid-file=/var/run/fahclient/fahclient.pid --daemon
    PIDFile=/var/run/fahclient/fahclient.pid
    User=fahclient
    RuntimeDirectory=fahclient
    WorkingDirectory=~

    [Install]
    WantedBy=multi-user.target
then run

Code: Select all

sudo systemctl enable FAHClient.service
sudo systemctl start FAHClient.service
If it still doesn't work with your card, there are reports that ROCM works with some AMD cards now, so in that case you might try to replace AMD's OpenCL with ROCM's - but try the above first.
Image
Online: GTX 1660 Super + occasional CPU folding in the cold.
Offline: Radeon HD 7770, GTX 1050 Ti 4G OC, RX580
jeffmr4
Posts: 20
Joined: Mon Apr 06, 2020 9:23 am

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by jeffmr4 »

Thank you. I will try this. The power has been out here due to a storm and just came back on so sorry for the late response.
jeffmr4
Posts: 20
Joined: Mon Apr 06, 2020 9:23 am

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by jeffmr4 »

It worked! Thank you! : ) Folding away.
jeffmr4
Posts: 20
Joined: Mon Apr 06, 2020 9:23 am

Re: OpenCL lib not detected AMD 5500XT and Mint 20

Post by jeffmr4 »

Looks like it is folding a little slow though. Over 5 hours to process a unit. Not sure if that is slow or normal?
Post Reply