Hacker News new | ask | show | jobs
by natch 2285 days ago
I wish they would spend five minutes documenting how to use the GPU on Ubuntu. My 1080ti is just sitting idle while my CPU is busy folding. Any instructions I came across said something like “make sure you have the libraries” but then failed to describe even at a high level how to locate and install those libraries. Last time I installed any CUDA libraries it involved adding an Nvidia repo or something.

Edit: I’d be glad to be proven wrong with a link to an FAQ or some part of the docs.

5 comments

As mentioned, you'll need to ensure your /etc/fahclient/client.xml includes:

  <config>
    <!-- Folding Slots -->
    <slot id='0' type='CPU'/>
    <slot id='1' type='GPU'/>
  </config>
If you check your logs in /var/lib/fahclient/logs, you'll probably see something like:

  CUDA Device 0: Platform:0 Device:0 Bus:51 Slot:0 Compute:7.5 Driver:10.2
         OpenCL: Not detected: Failed to open dynamic library 'libOpenCL.so':
                 libOpenCL.so: cannot open shared object file: No such file or
                 directory
Take that missing library over to the Ubuntu Package Search[0] and it will lead you to ocl-icd-opencl-dev

  apt install ocl-icd-opencl-dev
Restart fahclient and you should see something like:

   CUDA Device 0: Platform:0 Device:0 Bus:51 Slot:0 Compute:7.5 Driver:10.2
  OpenCL Device 0: Platform:0 Device:0 Bus:51 Slot:0 Compute:1.2 Driver:440.64
[0] https://packages.ubuntu.com/search?suite=bionic&arch=amd64&m...
This doesn't fix the problem, since ocl-icd* and nvidia-libopencl* provide libOpenCL.so.1 and FAHClient looks for libOpenCL.so, so you need to add a symlink, in the same directory.
I think I got it to work by editing the config file at /etc/fahclient/config.xml and adding: <slot id='1' type='GPU'/>, then restarting the client. Took me some googling and trial and error though, so I agree this should be made clearer.
I followed every instruction to configure ROCM and OpenCL in Ubuntu 18 with my Vega 56 card. All the samples and such work but Folding@Home refuses to believe its there. It might be nice if someone at FAH actually tried using it on Linux.

I would also like a FAQ.

Useful documentation would also be good.
You have to symlink from libOpenCL.so.1 to libOpenCL.so, then restart and it should find your GPU.
I had to run $ sudo apt install nvidia-opencl-dev and than manually add a GPU slot to F@H.