xmr-stak-amd icon indicating copy to clipboard operation
xmr-stak-amd copied to clipboard

WARNING: CL_DEVICE_NOT_FOUND when calling clGetDeviceIDs for of devices.

Open umeshgarg1 opened this issue 7 years ago • 17 comments

Get above error while trying to run the XMR-Stack , I have a AMD 590 GPU below is the "clinfo" detail

Number of platforms 1 Platform Name Clover Platform Vendor Mesa Platform Version OpenCL 1.1 Mesa 17.2.4 Platform Profile FULL_PROFILE Platform Extensions cl_khr_icd Platform Extensions function suffix MESA

Platform Name Clover Number of devices 1 Device Name Radeon RX 580 Series (AMD POLARIS10 / DRM 3.20.0 / 4.13.0-31-generic, LLVM 5.0.0) Device Vendor AMD Device Vendor ID 0x1002 Device Version OpenCL 1.1 Mesa 17.2.4 Driver Version 17.2.4 Device OpenCL C Version OpenCL C 1.1 Device Type GPU Device Profile FULL_PROFILE Max compute units 36 Max clock frequency 1340MHz Max work item dimensions 3 Max work item sizes 256x256x256 Max work group size 256 Preferred work group size multiple 64 Preferred / native vector sizes
char 16 / 16
short 8 / 8
int 4 / 4
long 2 / 2
half 0 / 0 (n/a) float 4 / 4
double 2 / 2 (cl_khr_fp64) Half-precision Floating-point support (n/a) Single-precision Floating-point support (core) Denormals No Infinity and NANs Yes Round to nearest Yes Round to zero No Round to infinity No IEEE754-2008 fused multiply-add No Support is emulated in software No Correctly-rounded divide and sqrt operations No 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 Correctly-rounded divide and sqrt operations No Address bits 64, Little-Endian Global memory size 8583028736 (7.994GiB) Error Correction support No Max memory allocation 6008120115 (5.595GiB) Unified memory for Host and Device No Minimum alignment for any data type 128 bytes Alignment of base address 1024 bits (128 bytes) Global Memory cache type None Image support No Local memory type Local Local memory size 32768 (32KiB) Max constant buffer size 2147483647 (2GiB) Max number of constant args 16 Max size of kernel argument 1024 Queue properties
Out-of-order execution No Profiling Yes Profiling timer resolution 0ns Execution capabilities
Run OpenCL kernels Yes Run native kernels No Device Available Yes Compiler Available Yes Device Extensions 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_byte_addressable_store cl_khr_fp64

NULL platform behavior clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Clover clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [MESA] clCreateContext(NULL, ...) [default] Success [MESA] clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1) Platform Name Clover Device Name Radeon RX 580 Series (AMD POLARIS10 / DRM 3.20.0 / 4.13.0-31-generic, LLVM 5.0.0) 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 Clover Device Name Radeon RX 580 Series (AMD POLARIS10 / DRM 3.20.0 / 4.13.0-31-generic, LLVM 5.0.0)

ICD loader properties ICD loader Name OpenCL ICD Loader ICD loader Vendor OCL Icd free software ICD loader Version 2.2.8 ICD loader Profile OpenCL 1.2 NOTE: your OpenCL library declares to support OpenCL 1.2, but it seems to support up to OpenCL 2.1 too.

umeshgarg1 avatar Jan 23 '18 06:01 umeshgarg1

I am kind of stuck any help will be much appriceated

umeshgarg1 avatar Jan 23 '18 18:01 umeshgarg1

please try the amd driver instead of the mesa driver.

psychocrypt avatar Jan 23 '18 18:01 psychocrypt

I installed the AMD drivers only from AMD site

umeshgarg1 avatar Jan 23 '18 19:01 umeshgarg1

Which OS do you use. I got my new amd test system and had the same issues with linux mint 18.3 I will extent the documentation how to solve the issue for linux. I install the amd app sdk 3.x and the amd pro driver run 'amdgpu-pro-install --compute' Then goto the amd app sdk folder to 'lib/x86_64' remove libOpenCL.so and create a symlink to the amd pro driiver. 'ln -s /opt/amdgpu-pro/lib/x86_64-linux-gnu/libOpenCL.so.1 libOpenCL.so'

psychocrypt avatar Jan 23 '18 20:01 psychocrypt

I am using Ubuntu 16.04... I did the amdgpu-pro-install without --compute option . DO you think that could have caused the issue

umeshgarg1 avatar Jan 23 '18 20:01 umeshgarg1

No thats fine. But you need to add the symlinc with ln within your amd app sdk installation

psychocrypt avatar Jan 23 '18 20:01 psychocrypt

@psychocrypt correct me if I'm wrong but isn't the lowest version of CL supported by the miner 1.2? It looks like @umeshgarg1 has OpenCL 1.1 which is below the minimum requirement

android-dep avatar Jan 25 '18 23:01 android-dep

Did a reinstall of prodrives also did created the lync still getting the same error [2018-02-06 22:21:48] : Start mining: MONERO [2018-02-06 22:21:49] : Found AMD platform index id = 0, name = Advanced Micro Devices, Inc. [2018-02-06 22:21:49] : WARNING: CL_DEVICE_NOT_FOUND when calling clGetDeviceIDs for of devices. [2018-02-06 22:21:49] : WARNING: No AMD device found. [2018-02-06 22:21:49] : WARNING: backend AMD disabled. [2018-02-06 22:21:49] : CPU configuration stored in file 'cpu.txt' [2018-02-06 22:21:49] : Starting 1x thread, affinity: 0. [2018-02-06 22:21:49] : hwloc: memory pinned

umeshgarg1 avatar Feb 07 '18 04:02 umeshgarg1

I have used command "cmake .. -DCUDA_ENABLE=OFF -DOpenCL_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include -DOpenCL_LIBRARY=/opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so " to make the file

umeshgarg1 avatar Feb 07 '18 21:02 umeshgarg1

I am having the same issue too.

kidrobot2k4 avatar Feb 15 '18 06:02 kidrobot2k4

Am pretty new at this yet i managed to get xmr-stak using my puny AMD GPU (an R2) from the first time. But it only lasted until reboot - got an unusable system and took me quite some time to restore it.

System is Lubuntu 16.04.3 kernel 4.13.0-32, so HWE. Latest AMDAPP 3.0 and amd-gpu-pro 17.40. So far so good except amd-gpu-pro fails to build DKMS for the kernel due to some api mismatches, wrong number of args and the likes. So i got an unbootable system, quite hard to restore.

Since amd-gpu-pro was no longer an option for this system as i couldn't get DKMS to build i switched back to the native amdgpu hwe driver, which needs "radeon.cik.support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1" passed to kernel at boot. The AMD-APP does link to /usr/lib/libOpenCL.so.1 so as @psychocrypt commented i linked the amd-gpu-pro one. To do that, instead of running its install script (--compute tried installing DKMS too), i extracted the amd-gpu-pro .deb files with dpkg-deb as i didn't want it to start building DKMS and fail partially. Next step was link the extracted tree under /opt/amdgpu-pro (probably a default hardwired if no install is done). Last step was LD_LIBRARY_PATH to there for xmr-stak. So now it's mining a wee bit faster :). This is a low end laptop, 2 CPU threads achieve like 14 H/s, one GPU thread like 21 H/S.

plamencurso avatar Feb 20 '18 22:02 plamencurso

After pulling the xmr-stak master branch and recompiling I'm having same issue here.

[2018-04-07 09:59:24] : Mining coin: monero7 [2018-04-07 09:59:24] : Found AMD platform index id = 0, name = Advanced Micro Devices, Inc. [2018-04-07 09:59:24] : WARNING: CL_DEVICE_NOT_FOUND when calling clGetDeviceIDs for of devices. [2018-04-07 09:59:24] : WARNING: No AMD device found. [2018-04-07 09:59:24] : WARNING: backend AMD disabled.

Note that can't be a driver issue because with the same setup I was mining monero fine one month ago.

aicastell avatar Apr 07 '18 08:04 aicastell

Check in the amd app sdk folder where the symlink of libOpenCL.so is pointing to. By default the symlink points into the nirvana.

psychocrypt avatar Apr 07 '18 08:04 psychocrypt

Thank you for your fast answer! :) The link was already fixed in my compilation a month ago. So, the issue was not related with that. It was related with cmake configuration.

This doesn't work:

cmake -DCUDA_ENABLE=OFF -D OpenCL_LIBRARY=/opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so -D OpenCL_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include/ ..

But this works fine!

cmake -DCUDA_ENABLE=OFF -D OpenCL_LIBRARY=/opt/amdgpu-pro/lib/x86_64-linux-gnu/libOpenCL.so -D OpenCL_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include/ ..

Now it works perfectly. Hope this helps somebody else. Thank you!

aicastell avatar Apr 07 '18 08:04 aicastell

Yes the opencl.so shipped in the sdk folder is not working in the most cases. The problem it I do not know how I can warn for it in the docs because if I say do not use the opencl.so from the sdk I need alao provide a which opencl.so can be used but this depends on the system :(

psychocrypt avatar Apr 07 '18 08:04 psychocrypt

I see this is a very common issue with all xmr-stak users, and its a shame because its a great mining software! Maybe you can provide an editable wiki where users with success in compiling all this stuff can provide working steps. I work with Ubuntu 16.04, with AMD 17.40 drivers and with latest (master branch) xmr-stak sources. I could repeat all steps from scratch and provide you a working recipe.

aicastell avatar Apr 07 '18 08:04 aicastell

such a wiki needs moderation and will increase our work much more. What I like are mining blogs posts. There are a blogpost on how you get 2k H/s out of a vega gpu this post is shared a lot on reddit. If the post is good we can add links to our install guide for amd.

psychocrypt avatar Apr 07 '18 09:04 psychocrypt