mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   Help with OpenCL under Linux and nouveau (https://www.mersenneforum.org/showthread.php?t=24937)

xilman 2019-11-13 12:17

Help with OpenCL under Linux and nouveau
 
I've never writted anything in OpenCL and would appreciate some help from the good folk here. For information: I'm running Ubuntu 19.10 and would prefer to use the C API, though C++ would do at a pinch. The hardware has 6 cores and an Nvidia GTX1060. After wasting many hours trying to get the Nvidia drivers and CUDA working i gave up and reverted to the free nouveau free device driver. I've run apt-get for most everything I can find which refers to OpenCL.

There are two major issues. The show stopper is that clinfo reports "Number of platforms 0". I would have thought that it would have found the cpus at the very least.

The other is that I have yet to find a good tutorial for the language which goes beyond presenting the source code of (effectively) "Hello world." I have downloaded the C API spec.

Can anyone help?

Thanks,[INDENT]Paul[/INDENT]

preda 2019-11-13 19:34

Indeed, you want to get clinfo to report more that 0 platforms/devices.

You need an OpenCL implementation even for the CPUs. I seem to remember that Intel offers one for download (for Intel CPUs) but I don't have a link. OTOH I don't expect OpenCL on CPUs to be actually useful other than for trying out/debugging.

For an Nvidia GPU, it is my impression that the CUDA *toolkit* brings the OpenCL driver. (I don't have experience with Nouveau)

For an AMD GPU, one may use either ROCm, or amdgpu-pro, which both have different OpenCL compilers.

So the first step is to get clinfo to recognize something.

Afterwards when starting programming, you may have a look at clwrap.h in gpuowl source code for some utils like compiling a kernel etc.

xilman 2019-11-14 09:19

I think I found the problem. It looks like "apt install mesa-opencl-icd" wasn't successful. Trying it just now indicates that the system gcc is too new for that package --- 9.2.1-9ubuntu2 is installed but 9.1.0-2ubuntu2~19.04 is required.

Ho hum.


All times are UTC. The time now is 07:51.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.