opencl-index=-1

Moderators: Site Moderators, FAHC Science Team

DocJonz
Posts: 242
Joined: Thu Dec 06, 2007 6:31 pm
Hardware configuration: Folding with: 4x RTX 4070Ti, 1x RTX 3070
Location: United Kingdom
Contact:

Re: opencl-index=-1

Post by DocJonz »

Strange - it was complete enough to Fold on the GPUs, but not complete enough for the log file to be correct ...

I set up a new install of Ubuntu 18.04 LTS, and the drivers were from the Ubuntu graphics-drivers PPA (sudo add-apt-repository ppa:graphics-drivers/ppa), and running the proprietary nVidia 396 driver. (I've been using this repository for nVidia drivers for Folding for a number of years).
Folding Stats (HFM.NET): DocJonz Folding Farm Stats
bollix47
Posts: 2941
Joined: Sun Dec 02, 2007 5:04 am
Location: Canada

Re: opencl-index=-1

Post by bollix47 »

I experienced much the same thing after an update on 18.04 that included numerous nvidia software and I was also using the same ppa. i.e. opencl stopped working properly.
Reinstalling ocl-icd-opencl-dev fixed it up for me too. :ewink:

I now do not use that ppa but after a clean install of 18.04 I just install the drivers (currently 390) from Software & Updates > Additional Drivers and after a reboot I install ocl-icd-opencl-dev before I install the folding software. Hopefully the normal repositories updates won't cause the same mess that the additional repository did although I'm sure they will fix that soon.
DocJonz
Posts: 242
Joined: Thu Dec 06, 2007 6:31 pm
Hardware configuration: Folding with: 4x RTX 4070Ti, 1x RTX 3070
Location: United Kingdom
Contact:

Re: opencl-index=-1

Post by DocJonz »

Interesting experience about the driver ppa - I'll make a note of that.
Anyway, this was the first machine to transition to Ubuntu 18.04, so I installed it on a test machine. Now everything seems to be up and running as it should be that means, when I transition all the other Linux Folding machines, the process should be a piece of cake :D
Folding Stats (HFM.NET): DocJonz Folding Farm Stats
rogeryoung
Posts: 1
Joined: Sat Jun 09, 2018 4:23 pm

Re: opencl-index=-1

Post by rogeryoung »

I am new to folding like 2 days and I got things running but web browser keeps blinking in and out and I get open cl error for both web and Advanced control so its kind of pointless for me fold if all i get is error and the forums don't even know what to do.
Joe_H
Site Admin
Posts: 7856
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: opencl-index=-1

Post by Joe_H »

rogeryoung wrote:I am new to folding like 2 days and I got things running but web browser keeps blinking in and out and I get open cl error for both web and Advanced control so its kind of pointless for me fold if all i get is error and the forums don't even know what to do.
Welcome to the folding support forum.

Actually, members of the forum do know what to do about most errors, in this case a complete install of OpenCL support is required. The details change depending on which OS is being used, and in the case of Linux, which version and distro.

If you could post the details of your system and the specific errors you see in a new topic, you should get suggestions on how to correct the problems. The Welcome to the Forum topic has information on what information is needed and how to post it.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
Aurum
Posts: 296
Joined: Sat Oct 03, 2015 3:15 pm
Location: The Great Basin

Re: opencl-index=-1

Post by Aurum »

[quote="bollix47"]@DocJonz
Open a terminal and try the following after which restart the client and see if the opencl lines look better:

Code: Select all

sudo apt install ocl-icd-opencl-dev
Thanks bollix47. That seems to have fixed my problem as well. I just did new install of Linux 19 Mint Tara with latest 396.54 Nvidia drivers. When I installed by double clicking fahclient_7.5.1_amd64.deb & fahcontrol_7.5.1-1_all.deb it said it needed to also install 24 packages. I'm a Linux neophyte but maybe it does not identify the correct dependencies.
In Science We Trust Image
Theodore
Posts: 118
Joined: Sun Feb 10, 2019 2:07 pm

Re: opencl-index=-1

Post by Theodore »

I think this post should be a sticky.
In my time here, I've needed it 3x; and seen 2 others ask for this.
Vester
Posts: 79
Joined: Sun Dec 02, 2007 4:29 pm
Hardware configuration: Gigabyte Aorus Z590 Pro AX, Intel i9-10850K, 32GB Crucial Ballistix DDR4-2600, Samsung NVMe EVO 980 Pro 256GB, CoolerMaster liquid cooler ML360, Nvidia Titan X (Pascal), Dell Nvidia RTX 3080 10GB 4Y12V, Pop!_OS.
Location: Fair Play, SC

Re: opencl-index=-1

Post by Vester »

Concur that this topic should be a sticky. I spent hours last week trying to install FAH on Ubuntu, OpenSUSE, and Fedora.
MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Re: opencl-index=-1

Post by MeeLee »

I wonder why they don't add it by default in the installation (.deb) file?
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: opencl-index=-1

Post by bruce »

MeeLee wrote:I wonder why they don't add it by default in the installation (.deb) file?
The FAH installer probably should install OpenCL if it's not present, but that would only work when you're doing an install. At least in Windows, there's already a pending bug report wondering what FAH should do about Microsoft's policy of UNinstalling OpenCL whenever they update the NVidia drivers.
matitaccia
Posts: 39
Joined: Tue May 23, 2017 1:14 pm
Hardware configuration: CPU: i5 4670@3.40GHz
Mainboard: ASUS TUF Gryphon Z87
RAM: Corsair Vengeance Pro 2x8GB
HDD: Samsung 840 Pro 256GB, WD Red 1'000GB
GPU: Gigabyte NVIDIA GeForce RTX 2060
Contact:

Re: opencl-index=-1

Post by matitaccia »

This post helped me too. Just finished installing ubuntu and it was not possible to fold on the GPU (GTX970) for the very same reason. Once I reinstalled the Opencl as per the suggested command it worked fine.

Thanks.
Image

Sustain scientific research with the power of you computer. Join the Swiss Folding Team!
trinitronx
Posts: 1
Joined: Sun Mar 15, 2020 10:37 pm

Re: opencl-index=-1

Post by trinitronx »

I can confirm that the ocd-icd-opencl-dev package fixes the issue on Ubuntu 18.04.4 LTS "bionic"

Root Cause:

This is most likely due to an issue with the packaging.
Apparently the .deb package for ocl-icd-libopencl1 does NOT include the symlink for libOpenCL.so (at least on Ubuntu 18.04.4 LTS "bionic"):

Code: Select all

$ dpkg -l ocl-icd-libopencl1 
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                           Version                      Architecture                 Description
+++-==============================================-============================-============================-==================================================================================================
ii  ocl-icd-libopencl1:amd64                       2.2.11-1ubuntu1              amd64                        Generic OpenCL ICD Loader


$ dpkg -L ocl-icd-libopencl1 
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
/usr/share
/usr/share/doc
/usr/share/doc/ocl-icd-libopencl1
/usr/share/doc/ocl-icd-libopencl1/NEWS.Debian.gz
/usr/share/doc/ocl-icd-libopencl1/README
/usr/share/doc/ocl-icd-libopencl1/README.Debian.gz
/usr/share/doc/ocl-icd-libopencl1/changelog.Debian.gz
/usr/share/doc/ocl-icd-libopencl1/copyright
/usr/share/doc/ocl-icd-libopencl1/html
/usr/share/doc/ocl-icd-libopencl1/html/libOpenCL.html
/usr/share/doc-base
/usr/share/doc-base/ocl-icd-libopencl1
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/ocl-icd-libopencl1
/usr/share/man
/usr/share/man/man7
/usr/share/man/man7/libOpenCL.7.gz
/usr/lib/x86_64-linux-gnu/libOpenCL.so.1
/usr/share/man/man7/libOpenCL.so.7.gz
However, the

Code: Select all

-dev
package does include it:

Code: Select all

$ sudo dpkg -L ocl-icd-opencl-dev  
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/OpenCL.pc
/usr/share
/usr/share/doc
/usr/share/doc/ocl-icd-opencl-dev
/usr/share/doc/ocl-icd-opencl-dev/copyright
/usr/lib/x86_64-linux-gnu/libOpenCL.so
/usr/share/doc/ocl-icd-opencl-dev/changelog.Debian.gz

# Symlink for "latest" "libOpenCL.so" now points to versioned shared object binary file: "libOpenCL.so.1.0.0"
$ ls -l /usr/lib/x86_64-linux-gnu/libOpenCL.so
lrwxrwxrwx 1 root root 18 Apr  5  2017 /usr/lib/x86_64-linux-gnu/libOpenCL.so -> libOpenCL.so.1.0.0

$ file  /usr/lib/x86_64-linux-gnu/libOpenCL.so
/usr/lib/x86_64-linux-gnu/libOpenCL.so: symbolic link to libOpenCL.so.1.0.0

# Actual shared object file is versioned with suffix: ".so.1.0.0"
$ ls -l /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
-rw-r--r-- 1 root root 43072 Apr  5  2017 /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0

$ file  /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0
/usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=9006135eaf170c0cacfba217fb3218e8f86499ec, stripped
This is probably due to a packaging issue from conflicts with Nvidia's binary driver or CUDA packages, but without this symbolic link, will result in errors with tools looking for the plain unversioned .so symlink such as FAHClient:

Code: Select all

OpenCL: Not detected: Failed to open dynamic library 'libOpenCL.so'
libOpenCL.so: cannot open shared object file: No such file or directory
There have been issues in the past with packages conflicting over this 'libOpenCL.so' symlink:
  • Code: Select all

    https://bugs.launchpad.net/ubuntu/+source/nvidia-cuda-toolkit/+bug/1311975
  • Code: Select all

    https://lists.launchpad.net/desktop-packages/msg143857.html
Based on the details in those bug reports, there is probably a good reason that the Debian & Ubuntu package maintainers chose to separate that file out from the main "ocl-icd-libopencl1" package.
This is because only 1 package is allowed to install a particular version of a library on a system at one time to avoid dependency hell. People were having problems where Nvidia's binary packages "nvidia-opencl-icd-*", "nvidia-cuda-toolkit" were conflicting with trying to control this file too. Usually packages released for the same OS version of Ubuntu or Debian would settle on one single version of a library to link against, to keep things that share this dependency stable on the system. However, sometimes multiple versions of a single shared library are needed by different pieces of software. This is why the convention is to append a version numbered suffix, and use symbolic link files to link up the filenames that the pre-compiled binaries used against the version of the binary shared object file that they depend on. Nvidia's packages are distributed as pre-compiled binaries also, yet without source code or source packages available. In general, vendor binary packaging may not always follow open source community conventions, and may try to be OS agnostic enough and avoid version locked depdendencies in the binaries. So this can present a problem for OSS community maintainers when these details of conflicting filenames and shared library dependencies crop up.

To sidestep the issue, they removed it from the main package, and placed it in the "ocl-icd-opencl-dev" one. This allows libOpenCL to be co-installed alongside the Nvidia ones. However, it has the unfortunate side-effect that the main symlink that FAHClient links against "libOpenCL.so" is not installed by default unless you know to also install "ocl-icd-opencl-dev" package to get this linked up to point at the library in "ocl-icd-libopencl1" package.

The package maintainer's notes explain some of this here:

Code: Select all

  [Regression Potential]
  This fix only affects the relationships between packages and should not introduce any new bugs.  However, since packages that were previously difficult to install together will now be co-installable, new bugs in those packages may be exposed.

  [Other Info]
  It is possible to work around this issue by first installing the CUDA application, then installing ocl-icd-opencl-dev, and finally installing the OpenCL application. (See comment #7)
nicholaicheck
Posts: 4
Joined: Thu Mar 19, 2020 3:29 am

Re: opencl-index=-1

Post by nicholaicheck »

I'm running FAHControl 7.5.1 on Linux Mint 9.3 XFCE on a laptop and have tried both "sudo apt install ocl-icd-opencl-dev" (to which I'm told "ocl-icd-opencl-dev is already the newest version (2.2.11-1ubuntu1)."), and going into FAHControl>Configure>Expert>removing the gpu=false under "Extra Client Control", and adding a gpu=true entry. I'm still unable to download a WU (though it seems to be trying; in the FAHControl Status tab I see the GPU, and at the right side it'll say "Waiting on WS Assignment", and "Attempts" keeps going up), and I get this error in the log: "ERROR:WU02:FS01:Failed to start core: OpenCL device matching slot 1 not found, try setting 'opencl-index' manually".

I'm at a loss at the moment; does anyone have any idea why my GPU isn't being utilized?
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: opencl-index=-1

Post by bruce »

FAH servers are currently saturated and unable to supply WUs to everyone who wants one. so that may be your answer. See many other topics on this forum.

There may also be driver or configuration issues. the best answer for that can be facilitated by posting portions of FAH's log per my Sig block.
nicholaicheck
Posts: 4
Joined: Thu Mar 19, 2020 3:29 am

Re: opencl-index=-1

Post by nicholaicheck »

bruce wrote:FAH servers are currently saturated and unable to supply WUs to everyone who wants one. so that may be your answer.
That appears to be it. It's picked up a work unit today! The restart overnight might have helped clear up the opencl error I was getting; I don't see it in the log today. All good. Thank you!
Post Reply