ghostlander / nsgminer

NeoScrypt OpenCL GPU Miner
https://bitcointalk.org/index.php?topic=712650.0
GNU General Public License v3.0
97 stars 68 forks source link

Failed to load OpenCL library, no GPUs usable #13

Closed mburknoe closed 6 years ago

mburknoe commented 7 years ago

Hey guys, I just compiled this and it's saying that it can't load OpenCL, I tried installing opencl with apt but I'm not sure I did it correctly. Does anyone know what's missing?

apt install nvidia-libopencl1-375


root@SDC-R091-DWN-001:/home/root/nsgminer# ./nsgminer -n
[2017-09-28 15:46:39] Failed to load OpenCL library, no GPUs usable                    
[15:46:39] 0 OpenCL GPU devices detected

[15:46:39] Unable to load the AMD Display Library                    
[15:46:39] NVML found 4 devices:                    
[15:46:39] GPU 0: GeForce GTX 970 [0000:06:00.0]

[15:46:39] GPU 1: GeForce GTX 970 [0000:07:00.0]

[15:46:39] GPU 2: GeForce GTX 1070 [0000:08:00.0]

[15:46:39] GPU 3: GeForce GTX 970 [0000:0B:00.0]

root@SDC-R091-DWN-001:~# nvidia-smi  | grep Driver
| NVIDIA-SMI 375.66                 Driver Version: 375.66                    |    |
ghostlander commented 7 years ago

Not sure about packages of your Linux distro, but something like nvidia-375-dev could be missing. Another option is to download and install NVIDIA-Linux-x86_64-384.69.run or whatever is the latest. It just works.

teshy commented 7 years ago

Same issue as OP export DISPLAY=:0 marco@compaq:~/Downloads/nsgminer$ ./nsgminer -n [2017-11-03 19:28:55] Failed to load OpenCL library, no GPUs usable
[19:28:55] 0 OpenCL GPU devices detected

[19:28:55] NVML found 4 devices:
[19:28:55] GPU 0: GeForce GTX 1070 [0000:03:00.0]
[19:28:55] GPU 1: GeForce GTX 1070 [0000:04:00.0]
[19:28:55] GPU 2: GeForce GTX 1060 6GB [0000:05:00.0]
[19:28:55] GPU 3: GeForce GTX 1070 [0000:06:00.0]

| NVIDIA-SMI 384.90 Driver Version: 384.90

ghostlander commented 7 years ago

Short answer. Are you sure that you have OpenCL installed? Is libOpenCL.so available for linking?

Long answer. Put the following code into clquery.cpp, place into your NSGminer source directory, compile with "g++ -O2 -o clquery -I. clquery.cpp -lOpenCL" and run it.

https://gist.github.com/ghostlander/8e8ea74176539042bcdcf0290a57274b

If it detects your GPUs with "TEST PASSED", NSGminer also will.

teshy commented 7 years ago

Thanks this gets me:

/usr/bin/ld: cannot find -lOopenCL collect2: error: ld returned 1 exit status

I searched for what package I may be missing but came up with nothing, any hints? On Centos 7.3

ghostlander commented 7 years ago

It's -lOpenCL with a single 'O'.

teshy commented 7 years ago

nOoob mistake,

Thanks, this issue was I was missing opencl-headers and had to reboot.

yum install opencl-headers reboot

jruillier commented 6 years ago

Same problem solved on Ubuntu with sudo apt install nvidia-opencl-dev