LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   how i setup folding@home as a background process (https://www.linuxquestions.org/questions/slackware-14/how-i-setup-folding%40home-as-a-background-process-685323/)

ninja master 11-22-2008 01:20 AM

how i setup folding@home as a background process
 
one point i will make, if you use this how to, please fold for team 12776 linux questions, who is supplying you with this how to!!!

that being said, i downloaded folding @ home from folding.stanford.edu under my users account. i simply ran
Code:

mkdir folding
then
Code:

cd folding
to get into the folding folder. then run
Code:

wget http://www.stanford.edu/group/pandegroup/folding/release/FAH6.02-Linux.tgz
then i ran

Code:

tar -xzf FAH6*
now that it is unpacked issue
Code:

./fah6 -configonly
set it up with a user name
then team number 12776
then enter your pass key that you get from here
http://fah-web.stanford.edu/cgi-bin/getpasskey.py


now as super user aka root
Code:

cd /etc/rc.d
make a file called folding by issuing
Code:

vi folding
Code:

i
to get vi into insert mode
then edit yourusername to fit the user name your using
Code:

echo "cd /home/yourusername/folding; ./fah6 -verbosity 9 >> /dev/null &" | su yourusername
your ALMOST DONE!

now press esc a few times then
Code:

:wq
this stands for command mode write quit, you have to enter the colon your self. shift q also generates a colon to enter commands into vi.

now make the file executable by running

Code:

chmod 755 folding
then
Code:

vi rc.M
(yes that is a capital m, unix is case sensitive)
press the down key untill you reach the bottom of the script.

press
Code:

i
to get into insert mode again, and then add this to your rc.M script

Code:

# Start the folding
if [ -x /etc/rc.d/folding ]; then
  . /etc/rc.d/folding
fi

any support past that, ask stanford. the stanford model for setting this up as a background process trubbled me enough to post exactly how i did it here for this distribution.

edit to say that i recently got a quad core, but with the smp support from the folding program not really being there, i run multiple instances of folding. to do this i have 2 folders, one named folding and another named folding0. i just repeated the process for everything and added a 0 to the end of everything.

ninja master 11-22-2008 01:23 AM

if your processor is less than 1ghz i suggest you use small packets, if its greater than 1ghz and less than a dual core, i suggest normal packets, and if your processor is greater than a dual core, go all out with the gigantic packages.

now your folding at home will run in the background every time your computer goes up or reboots. i had the specification "if im gone for a month, and the power goes out, i want folding @ home to start automatically with out me issuing a startx, or even touching the pc"

fietser 02-04-2012 02:50 PM

Hello forum,
I translate with babelfish, so it is not a good English.

update done
wget http://www.stanford.edu/group/pandeg...34-Linux64.tgz
With/fah6 -configonly it's not starting.
-configonly flag given, so exiting.

With/fah6 -config it is started..

The rest is all done the same.

They are now better ways to boot folding@home?

have fun.

Martinus2u 02-05-2012 03:03 AM

just an additional idea: if you want to run something as a background process while using the machine interactively for something else it makes sense to give the process the scheduling priority SCHED_IDLEPRIO. Mainline doesn't have this feature, but you can get Con Kolivas' kernel patch and a program called schedtool to achieve it.

fietser 02-05-2012 03:56 AM

It seemed to start
with top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2013 fietser 20 0 11300 660 536 R 100 0.0 37:10.48 fah6
and
bash-4.1$ ps ux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
fietser 2013 99.5 0.0 11300 660 ? R 09:21 41:16 ./fah6 -verbosity 9

But it dit not.

changed in /etc/rc.d/folding

echo "cd /home/folding; ./fah6 -verbosity 9 >> /dev/null &"
cd /home/folding; ./fah6 -verbosity 9 >> /dev/null &

a now that it does work.
In FAHlog.txt
Arguments: -verbosity 9

[09:42:19] Completed 15000 out of 250000 steps (6%)


@Martinus2u
Thank you for your answer
I do not understand.
But let the folds run faster?
What is the difference between the both of which are better.

Martinus2u 02-05-2012 04:07 AM

Quote:

Originally Posted by fietser (Post 4594182)
But let the folds run faster?
What is the difference between the both of which are better.

Folding won't run faster, but the rest of the system will be smoother. You won't even notice that folding is running in the background - the cpu fan will be the only indication that something is different. ;)

And yes, I think running background tasks at idle priority is better, as is the whole scheduler.

fietser 02-05-2012 10:34 AM

Okay, thanks for your information
I still have some gegoogle.

http://www.linuxquestions.org/questi...isk-io-914322/

http://slackbuilds.org/repository/13...tem/schedtool/

Perhaps it is better that I do not start this.

ninja master 02-06-2012 05:50 AM

in terminal....

man nice



all linux distributions have NICE process scheduling priority....

Martinus2u 02-06-2012 05:40 PM

Quote:

Originally Posted by ninja master (Post 4594958)
in terminal....

man nice



all linux distributions have NICE process scheduling priority....

true, but bear in mind that even a nice level of 19 in SCHED_NORMAL class is not the same as SCHED_IDLEPRIO.


All times are GMT -5. The time now is 10:13 AM.