Blog

Folding@Home Setup Notes

April 25, 2020

I’ll start by saying that Folding@Home is an old project, but it’s seen a resurgence of activity due to COVID. The project anounced at the end of March that the combined computing power had broken the exaflop barrier! For reference, F@H is a distributed computing project where participants donate compute cycles to run protein folding simulations. It sure would be nice to know more about corona’s nasty protein spikes, wouldn’t it?

Anyways, I had been running F@H on my laptop for a couple weeks during this shelter-in-place, trying to contribute in some small way. Unfortunately the mac client doesn’t support GPU folding! Knowing this became more annoying by the day, and a quick glance at the spare parts shelf yielded a 10 year old desktop and a collection of old graphics cards. It was time to bring some old hardware out of retirement.

But I already mentioned that F@H is an old project, remember? A lot of knowledge is scattered around various message boards, some of it in pretty old threads. Now that my folding rig is up and running smoothly, I’m documenting information that I found useful in one place.

Hardware

Since I setup up F@H with AMD cards half of this information won’t be relevant for people with NVIDIA cards. The section Remote Access applies to everyone, however.

Linux Attempt

If you’re setting up F@H on Linux with AMD graphics you have some options (open source vs. proprietary). The key thing seems to be that you need to install OpenCL support in addition to the regular display drivers.

I first attempted to setup F@H on Ubuntu 18.04, which ended up being a dead end because the GPUs are just barely too old. Regardless, this section details information I found and things I tried.

Womp Womp

If your GPUs are too old neither the open source nor proprietary drivers will be very helpful. As it turned out all of my graphics cards are GCN 1 (colloquially called the “South Islands” family). This generation is not supported by the open source Radeon Open Compute Platform (ROCm), and the proprietary drivers (catalyst) have not been updated since 2015. AMD’s old catalyst drivers tend to be picky about kernel and xorg version, so if anybody wants to give it a shot it would probably require a matching 2015 distro.

Funny enough, the one model higher R9 290x is GCN 2 (Sea Islands) and has better Linux driver support. Live and learn.

Open Source Driver Stack

If you go the open source route you have a display driver (amdgpu) provided out of the box, but you still need OpenCL support. The Radeon Open Compute Platform (ROCm) should provide everything you need. This is the path I chose to go down, and installation on Ubuntu was smooth with the project’s provided dkms package that compiles some kernel modules and installs some OpenCL utilities.

ROCm Installation Instructions: here

Forum Thread Where I Learned About ROCm: here

My journey ended here after installation because my GPUs are not supported by the project. This manifested as clinfo being unable to query the cards in the system even when running as root.

Proprietary Driver Stack

The proprietary driver (amdgpu-pro) includes both the display driver and OpenCL support. If you follow the installation instructions for your distro this should be enough to get F@H running with GPU support, but again I was unable to try this myself.

Incase it’s useful for anyone else, there also appears to be a hybrid method that uses the open source display driver with OpenCL support taken from the proprietary driver.

Forum Thread Describing Hybrid Method: here

Windows

After my adventures with Ubuntu that ended up being a bust I resigned myself to using Windows. There’s not much to report here. Install Windows. Install the AMD drivers that apparently are now called “Adrenalin”.

The only snag was that F@H would not detect any GPUs until I restarted the machine one last time after installing the client. In my case the GPU slots magically appeared after the restart and the cards started crunching on work units. As a note, a friend running NVIDIA had to manually add the GPU slots using FAHControl, so this part seems a bit inconsistent. If F@H can see them at all your GPUs should show up in the System Info tab of FAHControl.

Points

If you’re a competitive person and care about the points get a passkey for your name right away. The docs say that passkey users get a “bonus”, but it’s more like a multiplier somewhere in the range of 3-5x depending on the work unit. It takes 10 work units for the bonus to kick in, but it really kicks in.

Remote Access

There’s some terminology to go over, and yes F@H comes with two different GUIs.

Both of the UIs can be made remotely accessible by editing settings stored in config.xml, but the specific settings involved are slightly different.

NOTE 1: Changing the remote options in config.xml requires a full restart of the FAHClient service to take effect. The output in the log tab of FAHControl makes it look like new settings have taken effect dynamically, but that is a lie.

NOTE 2: ENABLING REMOTE ACCESS OF EITHER FAHCONTROL OR WEB CONTROL PROVIDES ESSENTIALLY NO ENCRYPTION OR AUTHENTICATION WHATSOEVER. Be specific about the IP address range allowed, and only use this on a private network. You absolutely need to use something extra like an SSH tunnel or a VPN if you want to make your F@H machine accessible over the internet.

FAHControl

FAHControl is relatively easy to configure for remote access, but the settings still get written to config.xml and require a service restart. The settings are located under Configure > Remote Access.

The remote machine now needs FAHControl installed. Add a new client using the button in the lower left where you’ll need to enter the IP address, port, and password (if set) of the target machine running F@H.

These settings get written into config.xml and look like the following:

    <allow v='127.0.0.1 192.168.0.0/24'/>
    <password v='hunter2'/>

Web Control

It’s not clearly stated, but enabling remote access for FAHControl does not enable remote access for Web Control. It’s controlled by a different setting in the config.xml file.

This can still be done in FAHControl by going to Configure > Expert.

These settings get written into config.xml and look like the following:

    <web-allow v='127.0.0.1 192.168.0.0/24'/>

File Locations

For the record these are the default locations of config.xml on both platforms.