BOINC GPU Detection in Linux

Message boards : Number crunching : BOINC GPU Detection in Linux
Message board moderation

To post messages, you must log in.

AuthorMessage
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1514483 - Posted: 10 May 2014, 20:10:21 UTC

This might be something better suited for the BOINC forums, but more people probably read these threads, so I thought I'll try here first.

I've read through a lot of other queries about this, but haven't found anything that will resolve this for me. I have run BOINC GPUs on Linux in the past, but back then all that was necessary was to install BOINC and the appropriate proprietary drivers. Now it looks like other packages are necessary to ensure libcuda.so, libOpenCL.so and libaticalrt.so are available. Even after doing that (or at least trying to), I still can't get BOINC to pick up the GPUs.

For the record I'm using Ubuntu x64 and I'm getting this problem on two desktops. This is what I'm getting from the coproc debug output for the AMD machine:

No NVIDIA library found
calInit() returned 1
OpenCL library present but no OpenCL-capable GPUs found
No usable GPUs found

...and for NV:

NVIDIA drivers present but no GPUs found
No ATI library found
No OpenCL library found
No usable GPUs found

I've poked around the BOINC source code for the required shared objects and as mentioned I've tried to ensure they're available in /usr/lib/. Nothing seems to be detected on BOINC restart. Seems as though this is a somewhat recent problem as CUDA/OpenCL/CAL libraries got moved out of the driver packages. Does anyone have any suggestions, please?
Soli Deo Gloria
ID: 1514483 · Report as offensive
TBar
Volunteer tester

Send message
Joined: 22 May 99
Posts: 5204
Credit: 840,779,836
RAC: 2,768
United States
Message 1514501 - Posted: 10 May 2014, 21:25:13 UTC - in response to Message 1514483.  

I had a problem with the ATI OpenCL libraries with the proprietary driver. Look at this thread for the fix;
BOINC doesn't like the OpenCL in the AMD Proprietary Drivers for Ubuntu?
I opened Nautilus with gksu, went to usr/lib and made a link to libOpenCL.so.1.
Then I copied the link to usr/lib/x86_64-linux-gnu, renamed it libOpenCL.so, now it works.

Once BOINC sees OpenCL, maybe it will see the cards? Everything else will see OpenCL with the standard proprietary driver install...
ID: 1514501 · Report as offensive
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1514515 - Posted: 10 May 2014, 22:22:42 UTC
Last modified: 10 May 2014, 22:32:01 UTC

Yes, I tried linking to the libraries, but I'm not really sure where BOINC is looking for them. I'm pretty sure that's the problem - I just need to find out where BOINC is actually looking.

Edit: I had also installed ocl-icd-libopencl1, which includes /usr/lib/x86_64-linux-gnu/libOpenCL.so already. Doesn't seem to help.
Soli Deo Gloria
ID: 1514515 · Report as offensive
TBar
Volunteer tester

Send message
Joined: 22 May 99
Posts: 5204
Credit: 840,779,836
RAC: 2,768
United States
Message 1514522 - Posted: 10 May 2014, 22:55:06 UTC - in response to Message 1514515.  
Last modified: 10 May 2014, 23:02:18 UTC

It appears you are using the New Ubuntu. I spent weeks trying to get 14.4 working on my older Mac. I finally went back to 12.4 and it finally worked, except it only sees half of the video ram. I think I will stay with 12.4 for a while.
Good Luck.
ID: 1514522 · Report as offensive
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1514630 - Posted: 11 May 2014, 3:44:46 UTC
Last modified: 11 May 2014, 4:18:32 UTC

Oh, so all this started with 14.04? Well, that's a bummer but at least it gives me a starting point. I know for certain that I had it working on older releases, so I'll give it a try.

Edit: Taking a look at the package file lists it looks like the libraries were moved out of the main driver package with 14.04. I'll see how it goes with 13.10.
Soli Deo Gloria
ID: 1514630 · Report as offensive
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1514722 - Posted: 11 May 2014, 12:23:05 UTC
Last modified: 11 May 2014, 12:23:53 UTC

Made a clean installation of Kubuntu 13.10 and nvidia-319 + BOINC 7.2.7 (most recent versions on the default repositories) on top of that, and were GPUs detected without any extra packages. Hopefully the AMD machine will have it just as easy.

Disappointing that the driver packages seem to have had CAL/CUDA/OpenCL stripped from them in 14.04. I presume most programs that rely on those libraries will work fine with the subsidiary packages installed, but looks like BOINC's GPU detection is broken, in part at least, due to this change.
Soli Deo Gloria
ID: 1514722 · Report as offensive
TBar
Volunteer tester

Send message
Joined: 22 May 99
Posts: 5204
Credit: 840,779,836
RAC: 2,768
United States
Message 1514769 - Posted: 11 May 2014, 16:20:56 UTC - in response to Message 1514722.  

The main problem I had with Ubuntu 14.04 was having the OS use both GPUs and the Mac EFI. The EFI install always ended with Grub rescue with none of the 'suggestions' working. The BIOS install ended with only 1 GPU being used. I never got to BOINC. In the process of trying to get it to work, I edited the partition map with g-part. Then I went to Ubuntu 13.10. I was able to use both GPUS however BOINC was causing a large number of system interrupts driving the CPUs to 100%, and I was getting disk errors. I ended up copying everything off the drive and reformatting in OSX. After that, I just installed Ubuntu 12.04 and gave up on it for now. I still had to make the link to the OpenCL library with Catalyst 13.12 and Ubuntu 12.04. I'm having the same 'Half Video Ram' problem on a different machine using different GPU cards, so, I'm guessing it's BOINC related since the rest of the OS sees all 1024mb on the cards. Other than that, 12.04 seems to work perfectly fine for me.
ID: 1514769 · Report as offensive
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1514821 - Posted: 11 May 2014, 20:35:13 UTC

That's quite the drama. In my case I got it working with 13.10. I wonder if xorg-edgers dropped CUDA/OpenCL support as well because when I tried nvidia-331 I lost GPU detection in BOINC again. But everything is working okay with nvidia-319 so I'm leaving it at that for now.
Soli Deo Gloria
ID: 1514821 · Report as offensive
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1514850 - Posted: 11 May 2014, 23:28:57 UTC
Last modified: 11 May 2014, 23:29:13 UTC

Unfortunately, things haven't gone so well with trying 13.10 on the AMD machine. I know I've run BOINC GPU in Linux on my C-50 netbook previously, so it looks like library detection might not be the specific problem here. Considering also that fglrx in 14.04 has libOpenCL and libaticalrt. clinfo can read the GPUs just fine.

I'm still trying to work out the significance of 'calInit() returned 1'. I can't pick up anything obvious from the source code...
Soli Deo Gloria
ID: 1514850 · Report as offensive
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1514882 - Posted: 12 May 2014, 3:43:03 UTC

The mystery continues. Running the stand-alone BOINC downloaded from Berkeley detects the GPUs. I'm so confused...
Soli Deo Gloria
ID: 1514882 · Report as offensive
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1514923 - Posted: 12 May 2014, 5:43:18 UTC

So calInit() is returning 0 (CAL_RESULT_OK) on success and 1 on some sort of error (CAL_RESULT_ERROR). Problem is that I don't know what that error is and I can't find much in the way of clues in the source code. I think I may have to resort to using Berkeley's stand-alone BOINC build even if that's not my preferred installation. If I can get at least something working I'll have to be content with that.
Soli Deo Gloria
ID: 1514923 · Report as offensive
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1514940 - Posted: 12 May 2014, 8:17:26 UTC

I can't believe I forgot about this: for some reason the xhost denies BOINC access to the GPUs even though this is set-up in the initialisation script. So I worked around it by disabling access control (okay since I don't have concerns about collisions on my LAN) with 'xhost +'. Then BOINC can see the GPUs.

Hope this might help others struggling with BOINC on Linux. Or at least Ubuntu.
Soli Deo Gloria
ID: 1514940 · Report as offensive
Profile ML1
Volunteer moderator
Volunteer tester

Send message
Joined: 25 Nov 01
Posts: 20283
Credit: 7,508,002
RAC: 20
United Kingdom
Message 1514983 - Posted: 12 May 2014, 13:02:46 UTC - in response to Message 1514940.  
Last modified: 12 May 2014, 13:04:27 UTC

I can't believe I forgot about this: for some reason the xhost denies BOINC access to the GPUs even though this is set-up in the initialisation script. So I worked around it by disabling access control (okay since I don't have concerns about collisions on my LAN) with 'xhost +'. Then BOINC can see the GPUs.

Hope this might help others struggling with BOINC on Linux. Or at least Ubuntu.

Odd... That's a real old one to trip over!

In the dim distant past, I've used:

xhost +si:localuser:boinc_user

where "boinc_user" is whatever username is used by the boinc processes. Often, that is just the username "boinc". That also restricts to only the boinc processes on your machine rather than the "allow everything" carefree workaround.


Another occasional 'gotcha' is to check that the boinc process is added to the video group to be able to access the GPU hardware. That should be handled automatically if you use the normal installer for your distribution of Linux.


Anyhow, good sleuthing there! (I'd have not guessed the xhost restriction!!)

Happy fast crunchin',
Martin
See new freedom: Mageia Linux
Take a look for yourself: Linux Format
The Future is what We all make IT (GPLv3)
ID: 1514983 · Report as offensive
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1515166 - Posted: 12 May 2014, 21:24:12 UTC

Thanks for the tip. I remember trying to specify boinc user for access in the past, but probably just gave up and was happy to have anything running and so made do with a blanket disabling of access control. Next time I reboot I'll give that command a try.

I don't recall having issue with the user groups before - I find the package installation handles that, but still good to know.
Soli Deo Gloria
ID: 1515166 · Report as offensive
Profile jay_e

Send message
Joined: 6 Apr 03
Posts: 62
Credit: 1,072,112
RAC: 0
United States
Message 1525818 - Posted: 8 Jun 2014, 8:52:28 UTC - in response to Message 1515166.  

Greetings,

I went through compiling Catalyst for an AMD 7750 about a year ago.
Then I found the fglrx-updates package worked right out of the box-
except I have to restart the boinc-client for the GPU to be seen
Recently ( 2 or 3 months?) there has been another release of CAL libraries that improved performance.
I'm using Ubuntu 14.04 and the fglrx-updates with only one problem-
I have to do an /etc/init.d/boinc-client restart (as root) after every boot.
I looked at the code until ...... Never figured it out. Just do the restart.

Did you try these drivers? Did they work for you?
Hope this helps,
Jay
ID: 1525818 · Report as offensive
Richard Haselgrove Project Donor
Volunteer tester

Send message
Joined: 4 Jul 99
Posts: 14650
Credit: 200,643,578
RAC: 874
United Kingdom
Message 1525835 - Posted: 8 Jun 2014, 9:54:00 UTC - in response to Message 1525818.  

I have to do an /etc/init.d/boinc-client restart (as root) after every boot.
I looked at the code until ...... Never figured it out. Just do the restart.

The usual explanation for this (I have no idea to what extent it's really true) is that the initial BOINC client daemon start occurs too early in the boot sequence, before catalyst and the X-server are fully ready. By re-starting once the boot sequence is complete, you're allowing the graphics components to complete their initialisation, and BOINC can see the components it needs for GPU detection.
ID: 1525835 · Report as offensive
Wedge009
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 451
Credit: 431,396,357
RAC: 553
Australia
Message 1525840 - Posted: 8 Jun 2014, 10:37:37 UTC

From what I've observed, I believe this to be a satisfactory explanation. I remember having to do this on an older (Athlon XP based system) with NV GPUs many years ago. My current NV system that's on Linux does not require this.

The X access is a separate issue - restarting BOINC will not resolve this. The GPUs are set-up, X just doesn't allow access from BOINC. Only by allowing X access and then restarting BOINC allows BOINC to 'see' the GPUs.
Soli Deo Gloria
ID: 1525840 · Report as offensive

Message boards : Number crunching : BOINC GPU Detection in Linux


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.