Linux + AMD Mesa OpenCL: Can't get GPU detected

Message boards : GPUs : Linux + AMD Mesa OpenCL: Can't get GPU detected
Message board moderation

To post messages, you must log in.

AuthorMessage
Rob

Send message
Joined: 6 Oct 16
Posts: 6
Germany
Message 73008 - Posted: 6 Oct 2016, 18:45:32 UTC

Hello,

I'm currently trying to set up BOINC on my Arch Linux system with Mesa drivers (I'm not Linux / Arch expert, but I'm trying to learn). I'd like to see how the open source drivers fare, but I haven't been able to get them detected through BOINC so far.

At first I wasn't sure if OpenCL works at all, but clinfo seems to indicate it is indeed available.
$ clinfo
Number of platforms 1
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 12.0.3
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA

Platform Name Clover
Number of devices 1
Device Name AMD TAHITI (DRM 2.45.0 / 4.7.6-1-ARCH, LLVM 3.8.1)
Device Vendor AMD
Device Vendor ID 0x1002
Device Version OpenCL 1.1 Mesa 12.0.3
Driver Version 12.0.3
Device OpenCL C Version OpenCL C 1.1
Device Type GPU
Device Profile FULL_PROFILE
Max compute units 28
Max clock frequency 925MHz
Max work item dimensions 3
Max work item sizes 256x256x256
Max work group size 256
Preferred work group size multiple 64
Preferred / native vector sizes
char 16 / 16
short 8 / 8
int 4 / 4
long 2 / 2
half 0 / 0 (n/a)
float 4 / 4
double 2 / 2 (cl_khr_fp64)
Half-precision Floating-point support (n/a)
Single-precision Floating-point support (core)
Denormals No
Infinity and NANs Yes
Round to nearest Yes
Round to zero No
Round to infinity No
IEEE754-2008 fused multiply-add No
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
Double-precision Floating-point support (cl_khr_fp64)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
Address bits 32, Little-Endian
Global memory size 1073741824 (1024MiB)
Error Correction support No
Max memory allocation 268435456 (256MiB)
Unified memory for Host and Device Yes
Minimum alignment for any data type 128 bytes
Alignment of base address 1024 bits (128 bytes)
Global Memory cache type None
Image support No
Local memory type Local
Local memory size 32768 (32KiB)
Max constant buffer size 268435456 (256MiB)
Max number of constant args 16
Max size of kernel argument 1024
Queue properties
Out-of-order execution No
Profiling Yes
Profiling timer resolution 0ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
Device Available Yes
Compiler Available Yes
Device Extensions cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_fp64

NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Clover
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [MESA]
clCreateContext(NULL, ...) [default] Success [MESA]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name Clover
Device Name AMD TAHITI (DRM 2.45.0 / 4.7.6-1-ARCH, LLVM 3.8.1)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
Platform Name Clover
Device Name AMD TAHITI (DRM 2.45.0 / 4.7.6-1-ARCH, LLVM 3.8.1)

ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.9
ICD loader Profile OpenCL 2.1


However, even after manually (stopping and) starting BOINC after boot, it is not being detected by BOINC.

Thu Oct 6 20:24:29 2016 | | Starting BOINC client version 7.6.33 for x86_64-pc-linux-gnu
Thu Oct 6 20:24:29 2016 | | log flags: file_xfer, sched_ops, task, coproc_debug
Thu Oct 6 20:24:29 2016 | | Libraries: libcurl/7.50.3 OpenSSL/1.0.2j zlib/1.2.8 libidn/1.33 libssh2/1.7.0
Thu Oct 6 20:24:29 2016 | | Data directory: /var/lib/boinc
Thu Oct 6 20:24:29 2016 | | [coproc] launching child process at /usr/bin/boinc_client
Thu Oct 6 20:24:29 2016 | | [coproc] relative to directory /
Thu Oct 6 20:24:29 2016 | | [coproc] with data directory /var/lib/boinc
Thu Oct 6 20:24:29 2016 | | [coproc] NVIDIA: libcuda.so: cannot open shared object file: No such file or directory
Thu Oct 6 20:24:29 2016 | | [coproc] ATI: libaticalrt.so: cannot open shared object file: No such file or directory
Thu Oct 6 20:24:29 2016 | | [coproc] OpenCL library present but no OpenCL-capable devices found
Thu Oct 6 20:24:29 2016 | | No usable GPUs found
Thu Oct 6 20:24:29 2016 | | Host name: Northern-Lights
Thu Oct 6 20:24:29 2016 | | Processor: 4 GenuineIntel Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz [Family 6 Model 42 Stepping 7]
Thu Oct 6 20:24:29 2016 | | Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
Thu Oct 6 20:24:29 2016 | | OS: Linux: 4.7.6-1-ARCH
Thu Oct 6 20:24:29 2016 | | Memory: 7.77 GB physical, 3.05 GB virtual
Thu Oct 6 20:24:29 2016 | | Disk: 14.64 GB total, 3.65 GB free
Thu Oct 6 20:24:29 2016 | | Local time is UTC +2 hours
Thu Oct 6 20:24:29 2016 | | Config: use all coprocessors
Thu Oct 6 20:24:29 2016 | | No general preferences found - using defaults
Thu Oct 6 20:24:29 2016 | | Preferences:
Thu Oct 6 20:24:29 2016 | | max memory usage when active: 3976.18MB
Thu Oct 6 20:24:29 2016 | | max memory usage when idle: 7157.12MB
Thu Oct 6 20:24:29 2016 | | max disk usage: 3.55GB
Thu Oct 6 20:24:29 2016 | | don't use GPU while active
Thu Oct 6 20:24:29 2016 | | suspend work if non-BOINC CPU load exceeds 25%
Thu Oct 6 20:24:29 2016 | | (to change preferences, visit a project web site or select Preferences in the Manager)
Thu Oct 6 20:24:29 2016 | | This computer is not attached to any projects
Thu Oct 6 20:24:29 2016 | | Visit http://boinc.berkeley.edu for instructions


Does anyone perhaps have an idea if Mesa should work with BOINC at all, and if so, where I may find the error?

I already tried the "xhost local:boinc" command I've seen mentioned during my research, but with no effect.

If it is relevant (I saw it mentioned at some point), libOpenCL is present as well.
$ sudo find / -name 'libOpenCL*'
/usr/lib/libOpenCL.so.1
/usr/lib/libOpenCL.so
/usr/lib/libOpenCL.so.1.0.0


Thank you a lot in advance for any input!
ID: 73008 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 73012 - Posted: 6 Oct 2016, 19:25:09 UTC - in response to Message 73008.  

Does anyone perhaps have an idea if Mesa should work with BOINC at all, and if so, where I may find the error?


Mesa does work, there are others who have it working.

I already tried the "xhost local:boinc" command I've seen mentioned during my research, but with no effect.


Is there any difference if you use the correct form "xhost si:localuser:boinc"?

If it doesn't help could you try running the client from terminal
+ using the full path (iow, /usr/bin/boinc-client)
+ in a temp directory (the client will try to use it as data directory)
+ with coproc_debug on (you need to copy cc_config.xml to the directory).

The client won't actually start because it can't open the port for GUI RPC, don't worry about that. I'm interested in just the GPU detection.
ID: 73012 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 73016 - Posted: 6 Oct 2016, 19:57:26 UTC - in response to Message 73012.  

Mesa does work, there are others who have it working.

Doesn't it need at least working videocard drivers to work correctly, though?
ID: 73016 · Report as offensive
Profile Agentb
Avatar

Send message
Joined: 30 May 15
Posts: 265
United Kingdom
Message 73023 - Posted: 6 Oct 2016, 22:21:58 UTC - in response to Message 73016.  
Last modified: 6 Oct 2016, 22:25:05 UTC

Ageless wrote:
Doesn't it need at least working videocard drivers to work correctly, though?


Hmm, i don't see Rob (*) saying the video is working/not working, perhaps that does need to be confirmed. The fact that clinfo reports something sane, is a good sign.

That said, with the nvidia on other linux versions the usual missing step is often the [nvidia-]modprobe, and there is probably something similar to force the icds to be loaded.

The xhost weirdness was an AMD fgrlx dependency.

The version running is Mesa 12.0.3 - looks to be rather "new" so it may have never been tested with your hardware. Maybe step back to 11.x

See https://bbs.archlinux.org/viewtopic.php?id=195691 you might need to post something there.

I would also be interested in seeing if we have these links

/usr/lib/libOpenCL.so -> /usr/lib/libOpenCL.so.1 -> /usr/lib/libOpenCL.so.1.0.0

(*) welcome Rob to the boinc forums.
ID: 73023 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 73026 - Posted: 6 Oct 2016, 23:37:47 UTC - in response to Message 73023.  

Ageless wrote:
Doesn't it need at least working videocard drivers to work correctly, though?


Hmm, i don't see Rob (*) saying the video is working/not working, perhaps that does need to be confirmed.

I was asking as it looks like he doesn't have the regular videocard drivers installed, only Mesa.

Because BOINC reports:
Thu Oct 6 20:24:29 2016 | | [coproc] NVIDIA: libcuda.so: cannot open shared object file: No such file or directory
Thu Oct 6 20:24:29 2016 | | [coproc] ATI: libaticalrt.so: cannot open shared object file: No such file or directory

ID: 73026 · Report as offensive
Rob

Send message
Joined: 6 Oct 16
Posts: 6
Germany
Message 73051 - Posted: 7 Oct 2016, 13:55:05 UTC
Last modified: 7 Oct 2016, 13:59:15 UTC

Hello again,

thanks for so many replies. :)
I'll work through the suggestions as I write the reply.

Juha, I did try it with that variation of the xhost command that you mentioned, but it did not have an effect either - which probably makes sense, as Agentb (thanks for the welcome!) mentioned this was only a fglrx thing (which I don't currently use - my Tahiti GPU isn't yet fit for amdgpu-pro and Arch-patched fglrx version is quite outdated by now, as AMD deprecated those. I'm not even sure it runs with the currently installed X server versyion).

Drivers work fine so far, at least I have played some games via Steam Linux.

Since I was curious if OpenCL actually functions on the system, I cloned this git repository, compiled and executed the tests, which gave me
71 passes, 0 fails.
https://cgit.freedesktop.org/~tstellar/opencl-example/
So it does seem to have functionality, which probably leads us into a "BOINC looks for something else than Mesa advertises"-like direction?

I checked the links in the /usr/lib folder:

[rob@Northern-Lights /]$ readlink -f /usr/lib/libOpenCL.so
/usr/lib/libOpenCL.so.1.0.0
[rob@Northern-Lights /]$ readlink -f /usr/lib/libOpenCL.so.1
/usr/lib/libOpenCL.so.1.0.0


I just tried downgrading to the latest available mesa packages of the 11.2 branch on Arch, including opencl-mesa.
Acceleration works fine and the above mentioned tests ran fine as well. Sadly, nothing changed.

Fri Oct 7 15:09:42 2016 | | Starting BOINC client version 7.6.33 for x86_64-pc-linux-gnu
Fri Oct 7 15:09:42 2016 | | log flags: file_xfer, sched_ops, task, coproc_debug
Fri Oct 7 15:09:42 2016 | | Libraries: libcurl/7.50.3 OpenSSL/1.0.2j zlib/1.2.8 libidn/1.33 libssh2/1.7.0
Fri Oct 7 15:09:42 2016 | | Data directory: /var/lib/boinc
Fri Oct 7 15:09:42 2016 | | [coproc] launching child process at /usr/bin/boinc_client
Fri Oct 7 15:09:42 2016 | | [coproc] relative to directory /
Fri Oct 7 15:09:42 2016 | | [coproc] with data directory /var/lib/boinc
Fri Oct 7 15:09:42 2016 | | [coproc] NVIDIA: libcuda.so: cannot open shared object file: No such file or directory
Fri Oct 7 15:09:42 2016 | | [coproc] ATI: libaticalrt.so: cannot open shared object file: No such file or directory
Fri Oct 7 15:09:42 2016 | | [coproc] OpenCL library present but no OpenCL-capable devices found
Fri Oct 7 15:09:42 2016 | | No usable GPUs found
...

with clinfo giving (I stripped the redundant parts)

Number of platforms 1
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 MESA 11.2.2
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA

Platform Name Clover
Number of devices 1
Device Name AMD TAHITI (DRM 2.45.0, LLVM 3.8.0)
Device Vendor AMD
Device Vendor ID 0x1002
Device Version OpenCL 1.1 MESA 11.2.2
Driver Version 11.2.2
Device OpenCL C Version OpenCL C 1.1
Device Type GPU
Device Profile FULL_PROFILE


I tried reverting even further to the 11.1 branch, but this prevents KDE Plasma from starting, so it messes something up. That may require some further reverting, so I'm going to not do that for now, if not needed. :)



Okay, so as I'm working through the suggestions (temporary folder, entering full path and made sure to copy the cc_config.xml with the coproc debug flag), I just noticed this:


[rob@Northern-Lights tempboinc]$ /usr/bin/boinc_client
07-Oct-2016 15:53:35 [---] Starting BOINC client version 7.6.33 for x86_64-pc-linux-gnu
07-Oct-2016 15:53:35 [---] log flags: file_xfer, sched_ops, task, coproc_debug
07-Oct-2016 15:53:35 [---] Libraries: libcurl/7.50.3 OpenSSL/1.0.2j zlib/1.2.8 libidn/1.33 libssh2/1.7.0
07-Oct-2016 15:53:35 [---] Data directory: /home/rob/tempboinc
07-Oct-2016 15:53:35 [---] [coproc] launching child process at /usr/bin/boinc_client
07-Oct-2016 15:53:35 [---] [coproc] relative to directory /home/rob/tempboinc
07-Oct-2016 15:53:35 [---] [coproc] with data directory /home/rob/tempboinc
07-Oct-2016 15:53:35 [---] OpenCL: AMD/ATI GPU 0: AMD TAHITI (DRM 2.45.0 / 4.7.6-1-ARCH, LLVM 3.8.1) (driver version 12.0.3, device version OpenCL 1.1 Mesa 12.0.3, 1024MB, 1024MB available, 2072 GFLOPS peak)
07-Oct-2016 15:53:35 [---] [coproc] NVIDIA: libcuda.so: cannot open shared object file: No such file or directory
07-Oct-2016 15:53:35 [---] [coproc] ATI: libaticalrt.so: cannot open shared object file: No such file or directory
07-Oct-2016 15:53:35 [---] Creating new client state file
07-Oct-2016 15:53:35 [---] Host name: Northern-Lights
07-Oct-2016 15:53:35 [---] Processor: 4 GenuineIntel Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz [Family 6 Model 42 Stepping 7]
07-Oct-2016 15:53:35 [---] Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
07-Oct-2016 15:53:35 [---] OS: Linux: 4.7.6-1-ARCH
07-Oct-2016 15:53:35 [---] Memory: 7.77 GB physical, 3.05 GB virtual
07-Oct-2016 15:53:35 [---] Disk: 16.61 GB total, 7.09 GB free
07-Oct-2016 15:53:35 [---] Local time is UTC +2 hours
07-Oct-2016 15:53:35 [---] Config: use all coprocessors
07-Oct-2016 15:53:35 [---] No general preferences found - using defaults
07-Oct-2016 15:53:35 [---] Preferences:
07-Oct-2016 15:53:35 [---] max memory usage when active: 3976.18MB
07-Oct-2016 15:53:35 [---] max memory usage when idle: 7157.12MB
07-Oct-2016 15:53:35 [---] max disk usage: 6.99GB
07-Oct-2016 15:53:35 [---] don't use GPU while active
07-Oct-2016 15:53:35 [---] suspend work if non-BOINC CPU load exceeds 25%
07-Oct-2016 15:53:35 [---] (to change preferences, visit a project web site or select Preferences in the Manager)
07-Oct-2016 15:53:35 [---] This computer is not attached to any projects
07-Oct-2016 15:53:35 [---] Visit http://boinc.berkeley.edu for instructions
07-Oct-2016 15:53:35 Initialization completed
07-Oct-2016 15:53:35 [---] Suspending GPU computation - computer is in use


As can be seen, this way the GPU gets detected! I am not quite sure what this tells us about the error, though. But I think we are a step closer now. :)

Greetings
Rob
ID: 73051 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 73053 - Posted: 7 Oct 2016, 14:20:51 UTC - in response to Message 73026.  

Ageless wrote:
Doesn't it need at least working videocard drivers to work correctly, though?


Hmm, i don't see Rob (*) saying the video is working/not working, perhaps that does need to be confirmed.

I was asking as it looks like he doesn't have the regular videocard drivers installed, only Mesa.


I think I'd call Mesa high-level driver for OpenGL and other related stuff. Wikipedia says it needs low-level drivers to talk to the hardware. The Linux graphics stack has (imho) too many components and that page doesn't make it that much clearer to me though.

The driver packages from AMD and NVIDIA have both low-level drivers and more or less higher-level parts too replacing Mesa.

Thu Oct 6 20:24:29 2016 | | [coproc] ATI: libaticalrt.so: cannot open shared object file: No such file or directory


That shouldn't be a problem, it's the CAL library. As far as I have understood, AMD has dropped support for CAL. Do they still include CAL libraries in their driver package?


@Rob

How do you restart BOINC?
ID: 73053 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 73054 - Posted: 7 Oct 2016, 15:03:05 UTC - in response to Message 73053.  

him wrote:
me wrote:
Thu Oct 6 20:24:29 2016 | | [coproc] ATI: libaticalrt.so: cannot open shared object file: No such file or directory


That shouldn't be a problem, it's the CAL library.

That could be it.
Juha wrote:
As far as I have understood, AMD has dropped support for CAL. Do they still include CAL libraries in their driver package?

They do have CAL still for Windows. I have Crimson 16.8.3 installed and have:
07/10/2016 16:58:34 |  | CAL: ATI GPU 0: AMD Radeon HD 7850/7870 series (Pitcairn) (CAL version 1.4.1848, 2048MB, 2008MB available, 6400 GFLOPS peak)
07/10/2016 16:58:34 |  | OpenCL: AMD/ATI GPU 0: AMD Radeon HD 7850/7870 series (Pitcairn) (driver version 2117.9 (VM), device version OpenCL 1.2 AMD-APP (2117.9), 2048MB, 2008MB available, 6400 GFLOPS peak)

I forgot that AMD dropped CAL support, and they probably don't have it in their Linux drivers. I was reading about the requirement for low level drivers as well, to get X working with hardware support, and that Mesa requires X with hardware support(?). Hence my question.
ID: 73054 · Report as offensive
Rob

Send message
Joined: 6 Oct 16
Posts: 6
Germany
Message 73055 - Posted: 7 Oct 2016, 15:19:41 UTC

@Juha: I usually stop or start it (if I do it manually) with systemctl start/stop boinc.service, and I do have it enabled on boot via systemctl enable boinc.service. Is that the correct way to do it? I had orientated myself at this page in the ArchWiki: https://wiki.archlinux.org/index.php/BOINC
But perhaps that is where the error is?
ID: 73055 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 73072 - Posted: 7 Oct 2016, 19:04:31 UTC - in response to Message 73054.  

I was reading about the requirement for low level drivers as well, to get X working with hardware support, and that Mesa requires X with hardware support(?).


I have to admit I'm not sure how to requirements go. Does Mesa require X or vice versa or is either one no good without the other or something.
ID: 73072 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 73073 - Posted: 7 Oct 2016, 19:06:00 UTC - in response to Message 73055.  

I usually stop or start it (if I do it manually) with systemctl start/stop boinc.service, and I do have it enabled on boot via systemctl enable boinc.service. Is that the correct way to do it?


That sounds good. Did you remember to add boinc to video group?
ID: 73073 · Report as offensive
Profile Agentb
Avatar

Send message
Joined: 30 May 15
Posts: 265
United Kingdom
Message 73079 - Posted: 7 Oct 2016, 20:26:51 UTC - in response to Message 73051.  
Last modified: 7 Oct 2016, 20:27:12 UTC

07-Oct-2016 15:53:35 [---] This computer is not attached to any projects
07-Oct-2016 15:53:35 [---] Visit http://boinc.berkeley.edu for instructions


Rob, have you attached this host to a project with GPU tasks?
ID: 73079 · Report as offensive
Rob

Send message
Joined: 6 Oct 16
Posts: 6
Germany
Message 73086 - Posted: 8 Oct 2016, 2:27:26 UTC

Juha, thank you! You just solved this mystery. I checked whether the 'boinc' user had been a member of group 'video' and indeed, it was not! I fixed this and now, finally, the on-boot started BOINC gives the following note:
Sat Oct 8 04:15:43 2016 | | OpenCL: AMD/ATI GPU 0: AMD TAHITI (DRM 2.45.0 / 4.7.6-1-ARCH, LLVM 3.8.1) (driver version 12.0.3, device version OpenCL 1.1 Mesa 12.0.3, 1024MB, 1024MB available, 2072 GFLOPS peak)

I'm not quite sure why it worked when I manually started the client and not when systemd did it for me, but it's alright now (even though I'm a bit embarrassed that I forgot adding the user...)! :) I'm a bit confused why BOINC says it has 1024MB, though, as this HD 7950 (Boost Edition) actually has 3GB. But maybe that's just some wrong value displayed or limitations in the Mesa OpenCL implementation.

Agentb, I indeed don't have *any* projects connected on this system yet. I had only set this up freshly, and now I will go ahead and get productive on this system.

Again, thanks for all the help and support!
ID: 73086 · Report as offensive
Profile Agentb
Avatar

Send message
Joined: 30 May 15
Posts: 265
United Kingdom
Message 73101 - Posted: 8 Oct 2016, 8:29:50 UTC - in response to Message 73086.  
Last modified: 8 Oct 2016, 8:59:31 UTC

Juha, thank you! You just solved this mystery. I checked whether the 'boinc' user had been a member of group 'video' and indeed, it was not! I fixed this and now, finally, the on-boot started BOINC gives the following note:
Sat Oct 8 04:15:43 2016 | | OpenCL: AMD/ATI GPU 0: AMD TAHITI (DRM 2.45.0 / 4.7.6-1-ARCH, LLVM 3.8.1) (driver version 12.0.3, device version OpenCL 1.1 Mesa 12.0.3, 1024MB, 1024MB available, 2072 GFLOPS peak)

I'm not quite sure why it worked when I manually started the client and not when systemd did it for me, but it's alright now (even though I'm a bit embarrassed that I forgot adding the user...)! :)

That's interesting, https://wiki.archlinux.org/index.php/users_and_groups expains what the video group is for, basically you need access to the GPU, and running in an X session grants that. systemd is deprecating the group membership approach (to udev), but i guess the boinc installer or systemd might not be doing this properly - in any regards the approach you have - works, and is permanent so i would not worry too much.

I'm a bit confused why BOINC says it has 1024MB, though, as this HD 7950 (Boost Edition) actually has 3GB. But maybe that's just some wrong value displayed or limitations in the Mesa OpenCL implementation.

That figure agrees with the clinfo, and this is the maximum that OpenCL can use, i see it dynamically changing on amdgpu (RX-480) 7.6GB on a 8GB card.

Agentb, I indeed don't have *any* projects connected on this system yet. I had only set this up freshly, and now I will go ahead and get productive on this system.


OK, that is good news, please post back you results and performance, or any further problems, i'm curious about how mesa will work compared to the old fgrlx or (in future) amdgpu drivers.
ID: 73101 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 73110 - Posted: 8 Oct 2016, 12:55:32 UTC - in response to Message 73101.  

That's interesting, https://wiki.archlinux.org/index.php/users_and_groups expains what the video group is for, basically you need access to the GPU, and running in an X session grants that. systemd is deprecating the group membership approach (to udev), but i guess the boinc installer or systemd might not be doing this properly - in any regards the approach you have - works, and is permanent so i would not worry too much.


It was mentioned in ArchWiki BOINC page. I had a hunch that Rob had overlook that.
ID: 73110 · Report as offensive
Rob

Send message
Joined: 6 Oct 16
Posts: 6
Germany
Message 73113 - Posted: 8 Oct 2016, 14:13:17 UTC
Last modified: 8 Oct 2016, 14:56:21 UTC

Yes, that ArchWiki page mentioned it, that's what made this incredibly embarassing.. but, well, perhaps it was an academic exercise to get to know BOINC better. ;)

I'm currently running a few Einstein@Home tasks, here's a little screenshot.. GPU usage seems good to me.


I'm not sure how much I'll be able to crunch on this system for now, but here's the computer's tasks: https://einsteinathome.org/host/12441112/tasks
I did notice lines like
[14:09:09][5707][ERROR] Error in OpenCL context: Shader Stats: SGPRS: 24 VGPRS: 8 Code Size: 9052 LDS: 0 Scratch: 0 Max Waves: 10

in the log(s) of already finished tasks, but I am not sure if this is relevant, and if, if that makes the results unusable. They are still awaiting validation at the moment. The tasks in question were all beta app tasks though, so I deactivated tests, got some non-test-app-tasks and will compare later when validations come in.

Also thank you for explaining the 1024MB reported memory, now I understand. Same as the necessity for adding the user boinc to the video group.
ID: 73113 · Report as offensive
Profile Agentb
Avatar

Send message
Joined: 30 May 15
Posts: 265
United Kingdom
Message 73121 - Posted: 8 Oct 2016, 16:07:03 UTC - in response to Message 73113.  
Last modified: 8 Oct 2016, 16:13:00 UTC

Yes, that ArchWiki page mentioned it, that's what made this incredibly embarassing.. but, well, perhaps it was an academic exercise to get to know BOINC better. ;)

Thinking about it, there could be a simple installer in the repo boinc-opencl-mesa to handle such things. You might want to suggest that and pass that on your findings the repo maintainers.

You might want to see the effect of xhost -local:boinc just to confirm it's not needed.

I'm currently running a few Einstein@Home tasks, here's a little screenshot.. GPU usage seems good to me.

found it here looks good.

I'm not sure how much I'll be able to crunch on this system for now, but here's the computer's tasks: https://einsteinathome.org/host/12441112/tasks
I did notice lines like
[14:09:09][5707][ERROR] Error in OpenCL context: Shader Stats: SGPRS: 24 VGPRS: 8 Code Size: 9052 LDS: 0 Scratch: 0 Max Waves: 10

in the log(s) of already finished tasks, but I am not sure if this is relevant, and if, if that makes the results unusable. They are still awaiting validation at the moment. The tasks in question were all beta app tasks though, so I deactivated tests, got some non-test-app-tasks and will compare later when validations come in.


I seem to recall over at E@H errors for another Mesa case - but not impacting results. See E@H ubuntu-1604-lts-deprecating-amds-fglrx

The times look good ~1275s, to compare my RX-480 is completing these in about 1100. By any chance did you complete any BRP4G tasks under a different OS?
ID: 73121 · Report as offensive
Rob

Send message
Joined: 6 Oct 16
Posts: 6
Germany
Message 73144 - Posted: 9 Oct 2016, 0:50:15 UTC
Last modified: 9 Oct 2016, 0:53:00 UTC

Passing the info on to the maintainer definitely sounds like an idea worth exploring.
I executed xhost -local:boinc and restarted boinc via systemd and it still works, so it truly seems to be not needed.

I booted up Windows 10 on this same computer earlier and let it do some work with BRP4G tasks, as you can see here. Seems to be going faster, but I definitely expected that compared to the Mesa implementation. Furthermore, those error messages don't seem to have any implications on validity here, too. Both beta and stable (v1.52 and v1.39) app show those messages, and both have successfully validated results now.
ID: 73144 · Report as offensive
mmonnin

Send message
Joined: 1 Jul 16
Posts: 146
United States
Message 73467 - Posted: 20 Oct 2016, 18:58:30 UTC

I ran into this issue last week when I added a GPU to a Linux machine. I thought it was just had drivers even though all info point it OpenCL being OK. The issue for me was that BOINC starts too soon after booting. Before OpenCL so it thinks there is no appropriate GPU. A restart of the BOINC client and it fired right up.
ID: 73467 · Report as offensive
Profile Agentb
Avatar

Send message
Joined: 30 May 15
Posts: 265
United Kingdom
Message 73468 - Posted: 20 Oct 2016, 19:23:28 UTC - in response to Message 73467.  
Last modified: 20 Oct 2016, 19:26:20 UTC

A restart of the BOINC client and it fired right up.


You can add a delay easily into the init sequence. Most based Debian releases put

a variable into /etc/defaults/boinc-client

you'll see

# wait seconds before start.  Some GPUs are slow and boinc can be detecting before they are ready.
BOINC_WAIT=5


Which can be easily increased. If this doesn't not work then it the restart within an Xwindow which grants permissions for boinc access the GPU.
ID: 73468 · Report as offensive

Message boards : GPUs : Linux + AMD Mesa OpenCL: Can't get GPU detected

Copyright © 2024 University of California.
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.