Posts by Rob

1) Message boards : GPUs : Linux + AMD Mesa OpenCL: Can't get GPU detected (Message 73144)
Posted 9 Oct 2016 by Rob
Post:
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.
2) Message boards : GPUs : Linux + AMD Mesa OpenCL: Can't get GPU detected (Message 73113)
Posted 8 Oct 2016 by Rob
Post:
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.
3) Message boards : GPUs : Linux + AMD Mesa OpenCL: Can't get GPU detected (Message 73086)
Posted 8 Oct 2016 by Rob
Post:
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!
4) Message boards : GPUs : Linux + AMD Mesa OpenCL: Can't get GPU detected (Message 73055)
Posted 7 Oct 2016 by Rob
Post:
@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?
5) Message boards : GPUs : Linux + AMD Mesa OpenCL: Can't get GPU detected (Message 73051)
Posted 7 Oct 2016 by Rob
Post:
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
6) Message boards : GPUs : Linux + AMD Mesa OpenCL: Can't get GPU detected (Message 73008)
Posted 6 Oct 2016 by Rob
Post:
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!




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.