teekay wrote:Hello all! I am currently crunching for both FAH and BOINC on a single-cpu linux system. I would like to give some priority to FAH, so I'd like BOINC to work whenever the folding@home client is not working on a WU (no WUs available, internet disconnect etc). Is there some sort of bash script or anything that I can use to achieve that?
Thanks in advance!
Since it's single-core, this is fairly easily done, but I'll still make a few assumptions at the start:
a: You do want to run both FAH and one or more BOINC-projects, and don't intend to use BOINC just as "backup" in case FAH is down. (backup would really need for FAH to release a FAH-BOINC-application to work very well).
b: Each FAH-wu takes N hours to run, something that generally isn't true but still assumes this.
c: The deadline of BOINC-work is so long that you reliably can finish FAH-wu before continuing on BOINC-work.
d: I'll assuming 50/50 split between FAH and BOINC, but can easily use different variations.
How to configure FAH-client:
I don't run Linux, so don't know exact setup for Linux, but atleast it will be something similar to the following batch-file that's usable under windows:
Code: Select all
:batchfile_start
call fah_client.exe -oneunit
sleep 86400
goto batchfile_start
This batchfile will loop indefinitely, and will sleep for 24 hours before re-starting FAH-client. (atleast under windows, you'll need to get yourself a sleep-application yourself).
For Linux, would guess it's to remove the "call", and use ./fah_client.exe or something similar instead.
Also, no idea how to re-loop a batch-file under Linux, someone else will probably know this...
As for the actual FAH-client, in other regards than running client with a batch-file, configure this as if you're not running BOINC.
How to configure BOINC-client:
After installation of BOINC-client, locate it's data-directory. (this is listed at start of message-log after client-start).
In the BOINC data-directory, make a file called cc_config.xml (under windows, use notepad or similar, not a word-processor). Linux atleast once-upon-a-time did have vi, but likely there's "better" options available now.
cc_config.xml should atleast include the following lines:
Code: Select all
<cc_config>
<options>
<exclusive_app>FahCore_78.exe</exclusive_app>
<exclusive_app>FahCore_a1.exe</exclusive_app>
</options>
</cc_config>
After saving cc_config.xml, to start using it, either re-start BOINC-client, or goto Advanced view, Advanced, Read config file.
The important part is to list all the different <exclusive_app>, there are more than the 2 I've listed, just add these on new line(s). Also, for Linux would guess it's called differently...
Please note, the application is case-sensitive, and you must include the .exe-extension (on windows).
The big advantage of using the FAH-cores as exclusive apps instead of the FAH-client is, the FAH-cores will exit when the wu is finished, and BOINC can continue running while FAH-client would otherwise sit idle doing file-upload. In case of FAH-client having problems downloading work, BOINC will continue crunching.
Also, another advantage by using <exclusive_app> instead of setting FAH to "low" priority is, by running "low" you'll still use some cpu-resources on BOINC. Also, atleast on windows, running "low" can interfere with other work you'll do on computer, something that won't happen if FAH is configured as "idle".
By using <exclusive_app>, FAH will get 100% of cpu-resources when new FAH-wu finished downloading, while BOINC will get 100% of cpu-resources when FAH-science-core aren't running.
BTW, as indicated, can also use the same method for SMP-client, but there's been atleast one disadvantage with the old a1-core, if you've got more than 4 real or HT-cores, chances are you'll not exit both at the same time.
In theory it's also possible to use <exclusive_gpu_app>, in case runs windows and wants tol run both FAH-GPU-client and BOINC-GPU-application, but atleast in my experience FAH had a tendency to error-out if used the fah_core as exclusive. Using the FAH-GPU-client would possible work better in this regard, but in case of problems downloading work it's still not a very good option.