Fighting COVID-19 with Folding@home and Multi-GPU rigs
By: James Dietle
Tags: Covid 19, Coronaviruses, Folding At Home, Ubuntu

Years ago, I played with distributed computing like SETI@home and even bought a Playstation 3 for Folding@home. So began an obsession with building, overclocking, and breaking computers. I have many hours collaborating with others on password cracking, ethereum mining, and deep learning matrix multiplying rigs. Imagine my surprise when Folding@home released a statement about Corvid-19:

Folding@home team has released an initial wave of projects simulating potentially druggable protein targets from SARS-CoV-2 (the virus that causes COVID-19)

Let’s get on this!

While very simple to do, I wanted to make an even easier reference for those using Ubuntu with multiple rigs. It took me a few hours, I want it to take you a few minutes.

Install all the things

If you have a monitor or are running windows, these commands are not for you. Everything I did from the command line via ssh into all my headless instances.

When you get a prompt for a username, team, and pass. It doesn’t matter what you choose. These are identifiers so that you can prove you did the work. If you have a favorite “team,” feel free.



wget

wget wget https://download.foldingathome.org/releases/public/release/fahclient/debian-testing-64bit/v7.4/fahclient_7.4.4_amd64.deb wget https://download.foldingathome.org/releases/public/release/fahcontrol/debian-testing-64bit/v7.4/fahcontrol_7.4.4-1_all.deb wget https://download.foldingathome.org/releases/public/release/fahviewer/debian-testing-64bit/v7.4/fahviewer_7.4.4_amd64.deb sudo dpkg -i --force-depends fahclient_7.4.4_amd64.deb

sudo dpkg -i --force-depends fahcontrol_7.4.4-1_all.deb

Multi GPU Configuration

If you have multiple GPUs, you should change your configuration to take advantage of them. This config file is also where you can alter your name and pass.

sudo vi /etc/fahclient/config.xml

You can use the following code and change as needed. Bolded changes highlight how I set GPU to true, slot id =0 is a GPU and added slot 2.

<config>

<!-- Client Control -->

<fold-anon v='true'/> <!-- Folding Slot Configuration -->

<gpu v='true'/> <!-- Slot Control -->

<power v='full'/> <!-- User Information -->

<team v='XXXXXX'/>

<user v='XXXXX'/> <!-- Folding Slots -->

<slot id='0' type='GPU'/>

<slot id='1' type='GPU'/>

</config>

Once complete you will need to reboot the service

sudo /etc/init.d/FAHClient restart -v

Hopefully, everything will work, but let’s verify.

Verifying your work

After it restarted, you should be able to check out the log to see it working.

sudo /etc/init.d/FAHClient log

It should look something like this. We can see the project chosen along with two work units (WU01 and WU00). It did take some time before I received a work unit from the server for each of the GPUs. I have Nvidia GPUs, and when checking, I used

nvidia-smi

We can see that two processes labeled FahCore_22 are running. Both are at 99%+ utilization. So everything appears to be in order.

Work complete

When work complete, everything is sent over to Folding@home. It might take a little while to get another work unit from the server.

Great success!