mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2019-11-13, 12:17   #1
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

2·72·109 Posts
Default 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,
Paul

Last fiddled with by xilman on 2019-11-13 at 12:17
xilman is offline   Reply With Quote
Old 2019-11-13, 19:34   #2
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

135910 Posts
Default

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.
preda is offline   Reply With Quote
Old 2019-11-14, 09:19   #3
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

2·72·109 Posts
Default

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.
xilman is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPUOWL AMD Windows OpenCL issues xx005fs GpuOwl 0 2019-07-26 21:37
LL with OpenCL msft GPU Computing 433 2019-06-23 21:11
OpenCL ROCm 2.0 vs. AMDGPU-PRO Linux SELROC GPU Computing 1 2019-01-20 07:10
Can't get OpenCL to work on HD7950 Ubuntu 14.04.5 LTS VictordeHolland Linux 4 2018-04-11 13:44
OpenCL for FPGAs TObject GPU Computing 2 2013-10-12 21:09

All times are UTC. The time now is 12:30.

Sun May 9 12:30:03 UTC 2021 up 31 days, 7:10, 0 users, load averages: 2.18, 1.84, 2.01

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.