Page 2 of 3

Re: opencl-index=-1

Posted: Sun Jun 10, 2018 3:06 pm
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).

Re: opencl-index=-1

Posted: Sun Jun 10, 2018 4:17 pm
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.

Re: opencl-index=-1

Posted: Sun Jun 10, 2018 4:38 pm
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

Re: opencl-index=-1

Posted: Mon Jun 11, 2018 12:34 am
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.

Re: opencl-index=-1

Posted: Mon Jun 11, 2018 4:01 pm
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.

Re: opencl-index=-1

Posted: Sat Sep 29, 2018 11:02 pm
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.

Re: opencl-index=-1

Posted: Fri Mar 01, 2019 12:43 pm
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.

Re: opencl-index=-1

Posted: Thu Mar 07, 2019 11:36 pm
by Vester
Concur that this topic should be a sticky. I spent hours last week trying to install FAH on Ubuntu, OpenSUSE, and Fedora.

Re: opencl-index=-1

Posted: Fri Mar 08, 2019 5:47 am
by MeeLee
I wonder why they don't add it by default in the installation (.deb) file?

Re: opencl-index=-1

Posted: Fri Mar 08, 2019 5:27 pm
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.

Re: opencl-index=-1

Posted: Fri Nov 22, 2019 11:48 pm
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.

Re: opencl-index=-1

Posted: Sun Mar 15, 2020 11:24 pm
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)

Re: opencl-index=-1

Posted: Thu Mar 19, 2020 3:36 am
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?

Re: opencl-index=-1

Posted: Thu Mar 19, 2020 4:54 am
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.

Re: opencl-index=-1

Posted: Thu Mar 19, 2020 9:15 pm
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!