mc68k's script

Discussion in 'Distributed Computing' started by Dreadnought, Mar 26, 2005.

  1. Dreadnought macrumors 68020

    Dreadnought

    Joined:
    Jul 22, 2002
    Location:
    Almere, The Netherlands
    #1
    Hi all,

    I'm folding with mc68k's script for my dual, only I also game a lot, so then I shut down the script, I type "stop" in terminal. To get it going again the first couple of times I typed "work", but after a while this command didn't work anymore, so I typed "start", which also didn't work, but "start1" and "start2" do work and get folding going again, if a window in terminal is opened, else it shuts down...

    How can I repair this so it will automatically starts folding without having a window in terminal open? I don't want to reinstall the script.
     
  2. daveL macrumors 68020

    daveL

    Joined:
    Jun 18, 2003
    Location:
    Montana
    #2
    What do you mean: "automatically starts folding without having a window in terminal open"? You want some AI function that detects that you aren't gaming anymore? I think you are imagining things, because "work" is simply a status command; it does not start the folding processes. If you want to temporarily cease folding, use "pause". When you want to start folding again, use "resume". Sorry if I'm being short with you, but what's the big deal about typing half a dozen characters in a terminal window? BTW, "alias" in a terminal window will show you the shortcuts created by m68k's script:

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

    Also, "stop" will drop any work done by the cores since the last checkpoint, while "pause" will not.
     
  3. Dreadnought thread starter macrumors 68020

    Dreadnought

    Joined:
    Jul 22, 2002
    Location:
    Almere, The Netherlands
    #3
    Only when a terminal window is opened f@h is folding, else its ceases. Don't know why, but I just want to get this fixed. Do you know how?
     
  4. daveL macrumors 68020

    daveL

    Joined:
    Jun 18, 2003
    Location:
    Montana
    #4
    Hmmm ... it sounds like you are starting it by hand. You shouldn't have to do that. Can you run "crontab -l" (that's an L) in a terminal window and tell me what you get? It should look like this:

    [david@monster]> crontab -l
    @reboot cd ~/F@H1; ./fah5 -local -advmethods &
    @reboot cd ~/F@H2; ./fah5 -local -advmethods &

    If thats what you get, then both folding processes should be starting up in the background when your system starts up. You shouldn't have to do a thing, and you don't need a Terminal window open, unless you want to check the status ('work'), 'pause', 'resume' etc. When the system shuts down, the folding processes terminate normally, leaving off at the last checkpoint, and that's where they start back up when the system is booted up again.

    You should never have to run 'fah5' by hand in Terminal, but if you do, start them with the 'start1' and 'start2' commands, which starts them up as background processes; you won't need to leave Terminal open after you start them.

    Is this making sense to you? If not, let me know, and I'll try to help you further.

    Again, sorry for being a bit short with you in my first reply.
     
  5. wdlove macrumors P6

    wdlove

    Joined:
    Oct 20, 2002
    #5
    Since I installed mine, just leave it running 24/7. My understanding is that if the processor power is needed by another program, then folding will decrease to accommodate.
     
  6. Lacero macrumors 604

    Lacero

    Joined:
    Jan 20, 2005
    #6
    Happens to me too..

    When I type "stop" to stop the folding in terminal, it stops. But when I want to resume, I type "start", I get this error message "-bash: start: command not found"

    So I type "start1" and I get "[1] xxxx", xxxx being the PID number.
    Next, I type "start2" and the second F@H starts up.

    However, once I exit terminal, like Dreadnought, both F@Hs close. I can tell because Activity Monitor no longer shows the F@H cores and my Dock CPU Usage History icon doesn't show any activity.

    To prevent this, I start up Terminal again, and I have to type "start1" and "start2" again, then type "exit" to close the session. I then can Cmd+Q to close Terminal without the F@H process closing.
     
  7. daveL macrumors 68020

    daveL

    Joined:
    Jun 18, 2003
    Location:
    Montana
    #7
    Hmmm ... I guess I've never run "stop" before. I always use "pause" and "resume", since you don't waste the work that's been done since the last checkpoint. Even at that, I rarely pause them, unless I'm doing a benchmark or something along those lines. I'm not a gamer.

    Anyway, the way the OS X process scheduler works, the only time the Folding processes run is when there are *no* other processes ready to run; Folding only uses the CPU(s) when they are idle, doing nothing else.

    I guess the real answer is to use "pause" and "resume" rather than "start[1,2]" and "stop" when you need to temporarily keep the Folding process(es) from running.

    HTH
     
  8. Dreadnought thread starter macrumors 68020

    Dreadnought

    Joined:
    Jul 22, 2002
    Location:
    Almere, The Netherlands
    #8
    I see I'm not the only one that has this problem. I shut folding down because a game (Never Winter Nights) crashes on it, or if I'm doing a networking game I have a really high ping or it crashes (MOHAA). I used stop because I couldn't remember the other commands. Thanks for replying daveL, and I just used the "crontab -l" command, and I get precisely what you said:
    newpc:~ rodygeertsema$ crontab -l
    @reboot cd ~/F@H1; ./fah5 -local -advmethods &
    @reboot cd ~/F@H2; ./fah5 -local -advmethods &
    but unfortunately it doesn't work. Haven't tried rebooting yet, I try that first, maybe it works, still have to install the security update, so I have to reboot anyhow! I'll let you.
     
  9. devman macrumors 65816

    devman

    Joined:
    Apr 19, 2004
    Location:
    AU
    #9
    The uniprocessor version uses start. The dual processor version does not - it uses start1 and start2.

    I infer from the rest of what you've said that somehow the processes are connected to your foreground session until you do an exit. Thus, it seems that's the workaround.
     
  10. Dreadnought thread starter macrumors 68020

    Dreadnought

    Joined:
    Jul 22, 2002
    Location:
    Almere, The Netherlands
    #10
    I restarded, after I used the "crontab -l" command and everything works how it should. Thanks daveL!
     
  11. daveL macrumors 68020

    daveL

    Joined:
    Jun 18, 2003
    Location:
    Montana
    #11
    That's great! Now, when you need to stop folding while you play a game or something, make sure you use "pause" in a Terminal window, then "resume" to continue folding.
     
  12. Dreadnought thread starter macrumors 68020

    Dreadnought

    Joined:
    Jul 22, 2002
    Location:
    Almere, The Netherlands
    #12
    I will!! Thanks again.
     
  13. Dreadnought thread starter macrumors 68020

    Dreadnought

    Joined:
    Jul 22, 2002
    Location:
    Almere, The Netherlands
    #13
    Oke, I have it again... and this time it's not because I didn't use pause and resume, I did! This time it is because of updating os X. I have it with every update of os X (even opened a thread not to update to X.4 because folding would stop, but it seems only that my G5 is affected).

    Every time I now restart I type in terminal start1, start2 and exit. Now that I have put a schedule to start my Mac up every day (don't leave it on anymore), folding doesn't start automatically. I even tried the crontab -l, but in terminal it says:
    "crontab: no crontab for Dreadnought"
    Any suggestions without installing folding again?!?! With the next update I have the same problem.
     

Share This Page