Message boards : GPUs : Linux + AMD Mesa OpenCL: Can't get GPU detected
Message board moderation
Author | Message |
---|---|
Send message Joined: 6 Oct 16 Posts: 6 |
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 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 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*' Thank you a lot in advance for any input! |
Send message Joined: 20 Nov 12 Posts: 801 |
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. |
Send message Joined: 29 Aug 05 Posts: 15560 |
Mesa does work, there are others who have it working. Doesn't it need at least working videocard drivers to work correctly, though? |
Send message Joined: 30 May 15 Posts: 265 |
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. |
Send message Joined: 29 Aug 05 Posts: 15560 |
Ageless wrote:Doesn't it need at least working videocard drivers to work correctly, though? 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 |
Send message Joined: 6 Oct 16 Posts: 6 |
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:
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.
with clinfo giving (I stripped the redundant parts)
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:
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 |
Send message Joined: 20 Nov 12 Posts: 801 |
Ageless wrote:Doesn't it need at least working videocard drivers to work correctly, though? 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? |
Send message Joined: 29 Aug 05 Posts: 15560 |
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 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. |
Send message Joined: 6 Oct 16 Posts: 6 |
@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? |
Send message Joined: 20 Nov 12 Posts: 801 |
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. |
Send message Joined: 20 Nov 12 Posts: 801 |
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? |
Send message Joined: 30 May 15 Posts: 265 |
07-Oct-2016 15:53:35 [---] This computer is not attached to any projects Rob, have you attached this host to a project with GPU tasks? |
Send message Joined: 6 Oct 16 Posts: 6 |
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! |
Send message Joined: 30 May 15 Posts: 265 |
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: 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. |
Send message Joined: 20 Nov 12 Posts: 801 |
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. |
Send message Joined: 6 Oct 16 Posts: 6 |
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. |
Send message Joined: 30 May 15 Posts: 265 |
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 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? |
Send message Joined: 6 Oct 16 Posts: 6 |
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. |
Send message Joined: 1 Jul 16 Posts: 146 |
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. |
Send message Joined: 30 May 15 Posts: 265 |
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. |
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.