PDA

View Full Version : How do I shut down the terminal version of F@H?




kilpajr
Nov 30, 2004, 03:45 PM
The only way I know to quit the terminal version of F@H is to quit the terminal window. But, when I restart F@H, I notice that it says the core was incorrectly terminated. What is the correct way to shut it down?



Dreadnought
Nov 30, 2004, 04:12 PM
Yes, I have the same with the new version V5 in windows. It's very annoying, because it suddenly start automatically another program called folding, which you can't stop or get rid of, and it's folding.... nothing.

Under your terminal on your mac, you just type stop, and folding stops. Type work and starts working again.

daveL
Nov 30, 2004, 04:37 PM
If you running the stuff the way mc68k set it up, it should start up in the background when your system boots up. Once the system is up, you should have the following aliases available in your shell (Terminal window):

alias pause='killall -STOP -m "FahCore*"'
alias resume='killall -CONT -m "FahCore*"'
alias start1='cd ~/F@H1; ./fah4 -local -advmethods > /dev/null &'
alias start2='cd ~/F@H2; ./fah4 -local -advmethods > /dev/null &'
alias stop='killall fah4'
alias work='~/.work'

Note I'm running the DP version, thus the 'start1' and 'start2'. On a SP machine, I believe there's just 'start'. So, you can pause, resume, start, stop and get status (work).

HTH

mc68k
Nov 30, 2004, 04:42 PM
The only way I know to quit the terminal version of F@H is to quit the terminal window. But, when I restart F@H, I notice that it says the core was incorrectly terminated. What is the correct way to shut it down?

find the process number using either ps or top

send it a kill signal with the kill command

%kill PID

there doesnt seem to be a flag that the executable uses to terminate itself, so u have to kill it in this manner. also, if ur closing the window to terminate the process, the process is prob still in the foreground.

Apple Hobo
Nov 30, 2004, 04:56 PM
I use control-c

[15:56:09] Completed 200000 out of 2500000 steps (8)
^C
Folding@Home Client Shutdown.

Nermal
Nov 30, 2004, 09:45 PM
Yeah, Control-C seems to be the 'proper' way to shut it down, because it reports that it's shutting down when you press it.

daveL
Nov 30, 2004, 09:56 PM
I guess I just don't understand why you're doing so much work. Let cron start it up at boot time; usually you won't touch it again. If you want to run a benchmark or dedicate every single cycle to a large rendering job, you can pause and resume (with mc68k's aliases and scripts, permanently posted in this forum). There's no need to open a terminal window and manually start and stop the process(es). Maybe I'm missing something?

kylos
Nov 30, 2004, 11:50 PM
m68k, what are the -local and -advmethods flags for?

kilpajr
Dec 1, 2004, 12:04 AM
Thanks, Apple Hobo. Control-C works.

bousozoku
Dec 1, 2004, 01:29 AM
m68k, what are the -local and -advmethods flags for?

I'm not mc68k, but I can provide the same answers. The -local flag tells folding@home to use the work directory within the directory where the fah client resides. If folding@home is in ~/F@H1/ then the data exists in ~/F@H1/work. The -advmethods flag is to signal that testing work units and cores should be downloaded and used, as available. While the Gromacs WUs were in beta, this flag would allow them to be used.

There is also a -forceasm flag which tells the client to use whatever optimisations the core has available, even if there was a crash.

kylos
Dec 1, 2004, 02:00 AM
I'm not mc68k, but I can provide the same answers. The -local flag tells folding@home to use the work directory within the directory where the fah client resides. If folding@home is in ~/F@H1/ then the data exists in ~/F@H1/work. The -advmethods flag is to signal that testing work units and cores should be downloaded and used, as available. While the Gromacs WUs were in beta, this flag would allow them to be used.

There is also a -forceasm flag which tells the client to use whatever optimisations the core has available, even if there was a crash.

Thanks, so the -local flag is really only necessary for dual processors? And where are the flags specified, at the stanford site or is there some documentation i missed.

I tried folding on my 500mhz ibook a while ago, but I was running too many other processes for it to finish wu's in a timely fashion. Now that I have a 1.33 ghz pbook, folding is able to get a lot more clock cycles. Just submitted a wu recently.

Also, anybody know if entering
bg %foldingjobid > /dev/null
will redirect output so folding won't suspend when outputting progress data. I like to have output from folding visible at times as well, so if the previous command would work as I expect, would the proper command to foreground the app be
fg %foldingjobid > 1

daveL
Dec 1, 2004, 01:30 PM
Thanks, so the -local flag is really only necessary for dual processors? And where are the flags specified, at the stanford site or is there some documentation i missed.

I tried folding on my 500mhz ibook a while ago, but I was running too many other processes for it to finish wu's in a timely fashion. Now that I have a 1.33 ghz pbook, folding is able to get a lot more clock cycles. Just submitted a wu recently.

Also, anybody know if entering
bg %foldingjobid > /dev/null
will redirect output so folding won't suspend when outputting progress data. I like to have output from folding visible at times as well, so if the previous command would work as I expect, would the proper command to foreground the app be
fg %foldingjobid > 1
Why not just put this in your 'crontab' ?

# Start dual Folding@Home engines
@reboot cd ~/F@H1; ./fah4 -local -advmethods &
@reboot cd ~/F@H2; ./fah4 -local -advmethods &
# END

I have a DP, thus the 2 entries. These assume the directory (F@H) is in you home directory. If you have your F@H directory somewhere else, modify the above accordingly.

kylos
Dec 1, 2004, 06:24 PM
Why not just put this in your 'crontab' ?

# Start dual Folding@Home engines
@reboot cd ~/F@H1; ./fah4 -local -advmethods &
@reboot cd ~/F@H2; ./fah4 -local -advmethods &
# END

I have a DP, thus the 2 entries. These assume the directory (F@H) is in you home directory. If you have your F@H directory somewhere else, modify the above accordingly.

I'm interested in backgrounding and foregrounding the app at will. After running it in the background for a while without redirecting the output, I've found that it will come to the foreground when it has something to output. I read somewhere that a background app will be suspended if it tries to output to stdout. Neither situation is desirable. I'd like to fg and bg at will and change the output file at the same time.