Linux running multiple BOINC clients

Running multiple copies of the BOINC client at the same time, may utilize the GPU more efficiently.
Check the GPU usage by using NVIDIA X Server (must have NVIDIA drivers installed) or PSensor.
Check the CPU usage by using System Monitor. Make sure the CPU usage is below 100% ,to leave room for the CPU to feed the GPU.

Setup multiple BOINC clients:

First create extra boinc folders:
In Ubuntu, click on “Search your computer” and in the search fiels type ‘terminal’ and select the terminal icon.
In the terminal type:
sudo mkdir /var/lib/boinc2
sudo mkdir /var/lib/boinc3
sudo nautilus

Open /var/lib/boinc-client/cc_config.xml with a text editor ( in nautilus use the right mouse button) and add the following.

<cc_config>
<options>
<use_all_gpus>1</use_all_gpus>
<allow_multiple_clients>1</allow_multiple_clients>
</options>
</cc_config>

If there already is a <cc_config></cc_config> block, do not add another one, but past the part including <options></options> inside the existing <cc_config></cc_config> block.

Next copy cc_config.xml using nautilus to /var/lib/boinc2 and /var/lib/boinc3
Next copy rpc_gui_auth.cfg using nautilus to /var/lib/boinc2 and /var/lib/boinc3

If you haven’t done this already:
In  /var/lib/boinc-client/cc_config.xml, open the file ‘remote_host.cfg‘ and at the end of the file enter the IP address (or addresses on a new line) of your BoincTasks computer. It is best to setup a fixed IP address on the computer running BoincTasks.
Next copy /cc_config.xml using nautilus to /var/lib/boinc2 and /var/lib/boinc3

Now fire up the 2 new BOINC clients:

In the terminal type:
Warning: in copy and paste the — might look OK, but it’s NOT the correct one and generates errors. Type manually or replace the – -with the – on the keyboard.

sudo /usr/bin/boinc −−daemon −−allow_multiple_clients −−gui_rpc_port 31418 −−dir /var/lib/boinc2
sudo /usr/bin/boinc −−daemon −−allow_multiple_clients −−gui_rpc_port 31420 −−dir /var/lib/boinc3

The rpc port must NOT be in use by any computer on the local network.

If you want this to happen every time the system boots.
Edit the cron tasks:
cron sudo crontab -e
Use e.g. @reboot /usr/bin/boinc −−daemon −−allow_multiple_clients −−gui_rpc_port 31418 −−dir /var/lib/boinc2

Setting up BoincTasks:

Select the ‘Computers‘ tab in BoincTasks and select ‘Add computer‘.

If the remote computer has a static IP address add the IP address and leave the MAC address blank.
Otherwise fill in the MAC address and leave the IP address blank.
(How to get the MAC address: On the Ubuntu machine, in the upper right hand corner, click on the two arrow (network) icon, next click on ‘Connection information‘, write down the MAC (Hardware Address).)

In BoincTasks fill in the Port address of the remote computer and if needed the password.
Repeat this for the other computers.

If you have a large number of computers, editing the computers.xml file is quicker.
Go to C:\Users\username\AppData\Roaming\eFMer\BoincTasks\
Make a copy of computers.xml.
Open computers.xml and add  additional <computer></computer> blocks. Best to  copy one from another remote computer.

In BoincTasks click on another tab to apply the changes.

For debugging in BoincTasks select the menu  Show -> log,  select ‘Debug setup‘  anc check ‘Connecting‘.
Close the debug window and check ‘Enable debug mode‘.
Exit BoincTasks and start BoincTasks again, now open the loggig windows by selecting Show -> log.

Only one GPU is used

Sometimes only one GPU is used, the same in all instances.
In that case add in instance 1:

<cc_config>
<options>
<use_all_gpus>1</use_all_gpus>
<allow_multiple_clients>1</allow_multiple_clients>
<exclude_gpu>
<url>http://www.worldcommunitygrid.org/</url>
<device_num>0</device_num>
<type>NVIDIA</type>
</exclude_gpu>
<exclude_gpu>
<url>http://milkyway.cs.rpi.edu/milkyway/</url>
<device_num>0</device_num>
<type>NVIDIA</type>
</exclude_gpu>
</options>
</cc_config>


And in instance 2, the same, but change the device _num to 1

*Tested on a Ubuntu machine, commands and locations for other Linux OS may vary.