Ubuntu – AMD A4-5300 and GPU computing on BOINC

14.04atiboincgpuopencl

I have an AMD A4-5300 APU, which is a dual-core CPU and GPU. It is OpenCL capable.

I am trying to get BOINC to recognise the GPU but it seems unable to.

Log (snipped):

[---] Starting BOINC client version 7.4.22 for x86_64-pc-linux-gnu
[---] OpenCL CPU: AMD A4-5300 APU with Radeon(tm) HD Graphics (OpenCL driver vendor: Advanced Micro Devices, Inc., driver version 1642.5 (sse2,avx,fma4), device version OpenCL 1.2 AMD-APP (1642.5))
[---] No usable GPUs found

I've been Googling for an answer for two days and I'm sorry to say that I have given up.

I'm using the latest fglrx (Catalyst 14.12) from AMD and the latest BOINC (7.4.22), though I've tried older versions of both with no luck.

I installed the relevant OpenCL and ICD packages which got the CPU recognised as OpenCL, but BOINC refuses to recognise the GPU. User:boinc is part of group:video, but I tried setting xvideo + anyway which made no difference.

I tried everything suggested on the BOINC forum but none of it works. It works if 7.4.22 is downloaded and run as the user (1001) currently logged in (though I tried it again and it wouldn't!), but not setting the BOINC user to that same user when it's run (after changing ownership on all the files), as suggested in that post. Running as root doesn't work either, but I really shouldn't have to do either of these things.

Can anyone help at all? I literally don't know where else to look.

Best Answer

The problem originally stems from running SSH with X forwarding (SSH -X) when connecting to the server. This sets $DISPLAY which blocks GPU detection.

Once I realised this it became apparent that due to restrictions in Ubuntu (and probably other distros), BOINC has to be run as the logged-in (via X) user.

Assuming the user is user1:

  1. sudo service boinc-client stop
  2. Change BOINC_USER=boinc to BOINC_USER=user1 in /etc/default/boinc (some parts of the init script can be cleaned up too)
  3. Add "sleep 10" to startup() in /etc/init.d/boinc-client to allow the user to log in (needed)
  4. sudo chown -R user1: /etc/boinc-client/*
  5. sudo chown -R user1: /var/lib/boinc-client
  6. sudo service boinc-client start

BOINC now correctly detects the GPU and crunches work units accordingly.

Related Question