Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mc68k

macrumors 68000
Apr 16, 2002
1,996
0
Re: About the terminal...

Originally posted by dnte42
First, is there any easy way to script the terminal to open the file or to launch it on startup? OS X just treats it as an unknown document.
That's because there's no default file extension. Appending .command to any file forces it to be opened with terminal, whether it is executable or not. So provided the binary has been made executable, (w/chmod +x) you can have it open w/terminal by default using this method. You can take this a step further and have it automatically run at login using the login control panel and adding the .commad file. This will luanch the binary through terminal automatically.

A second way is to make a symbolic link to the file in your usr/bin subdirectory.
Type ln -s [pathname of F@H binary] /usr/bin/[link name]

You can then type in the linkname anywhere in your terminal session and it will have the same effect as typing the pathname.
Second, is there any way to get the terminal to give status updates (i.e. the frames finished as in the logs)? Thanks.
Not that I have seen. My solution is to create an alias to the logfile in the work directory and open that when I care to know how far I've gone. I know of no way in F@H 3 to display the frames in the terminal.
 

bousozoku

Moderator emeritus
Jun 25, 2002
15,717
1,891
Lard
Re: About the terminal...

Originally posted by dnte42
Got the folding terminal app a few days ago. Have two questions. First, is there any easy way to script the terminal to open the file or to launch it on startup? OS X just treats it as an unknown document. Second, is there any way to get the terminal to give status updates (i.e. the frames finished as in the logs)? Thanks.

I use a shell script to allow me to show lines from the logs so I know how far it's gotten without showing the whole log. If you'd like I'd be glad to give you a copy of it.

Btw, I'm not on the team, how do I sign up? You're all so good and I only have two machines, but I'll add them to your mix, if you want me. :)
 

mc68k

macrumors 68000
Apr 16, 2002
1,996
0
Re: Re: About the terminal...

Originally posted by bousozoku
You're all so good and I only have two machines, but I'll add them to your mix, if you want me. :)
For sure! Just follow this link and download whichever you like. To start off I would use the graphical version, unless you're willing/savvy enough to try the terminal version.

Proteins usually take a while to fold, so be patient.

Our team #: 3446

Good luck, and thanks for your support! :)
 

dnte42

macrumors regular
Jul 17, 2002
176
0
Wonderful. Thanks for the help.

(edit: btw, if you want to add yourself to the team, type in the normal command to run the file, or drag the file on the terminal, and add " -config" to the end of the command. It will ask you to enter your name, team, and one or two other things.)
 

bousozoku

Moderator emeritus
Jun 25, 2002
15,717
1,891
Lard
Oops, I figured it out before I read your posts. Thanks for letting me know.

I would rather run the console versions just because such applications are less processor-intensive so they get more done.

I've noticed some weird, or unexpected, performance. I have two machines, a PowerMac G3/400, 512MB with 9GB Ultra2 SCSI drive plus 40GB ATA100 drive (no ATA accelerator board) and a PowerMac dual G4/800, 512MB, 80GB ATA66.

On the same types of data, the dual processor is only twice as fast as the G3. If I use the ATA drive on the G3, it finishes half as fast (which would make it 25% of the dual).

It looks like the processors are important but a fast hard drive is just as important. It may also be that i don't have enough memory.

Btw, has anyone tried the low latency memory from OtherWorld Computing--PC133, CL2?
 

bousozoku

Moderator emeritus
Jun 25, 2002
15,717
1,891
Lard
I guess I should have just posted this shell script earlier.

This is my sl.sh:

#!/bin/tcsh
# show the logfile contents
cd ../Library/Folding@home/work/
foreach file (logfile_??.txt)
grep "[Ff]rame" $file
end
# also list the file .arc file for time
ls -l *.arc

It will list any line with the word frame in it, whether frame is capitalised or not. It also shows the results file. I use this to calculate the minutes per unit so I can switch the phone line etc. so they are transmitted in a timely fashion.

1. Put the text in a file called sl.sh
2. Use chmod +x sl.sh to make it executable.
3. Run it by typing ./sl.sh and pressing <ENTER> or <RETURN>

You'll get something like:

- Frames Completed: 4, Remaining: 96
Finished a frame (5)
 

Mr. Anderson

Moderator emeritus
Nov 1, 2001
22,568
6
VA
Well, I went and installed it on my machine - running the terminal version on my TiPB 667 - don't know if I'll make all that much difference, but hey, one more grain of sand....

D
 

mc68k

macrumors 68000
Apr 16, 2002
1,996
0
Originally posted by dukestreet
don't know if I'll make all that much difference, but hey, one more grain of sand....
Hehe...we got a moderator on our team!!! Way to represent. :)
 

Mr. Anderson

Moderator emeritus
Nov 1, 2001
22,568
6
VA
ha, well, I'm running in the terminal and its going to be interesting to see how long it takes to do a unit - what's going to happen when the TiPB goes to sleep?

Also I tried running the script, but it didn't work, anyone else have problems with that?

D
 

mc68k

macrumors 68000
Apr 16, 2002
1,996
0
Originally posted by dukestreet
ha, well, I'm running in the terminal and its going to be interesting to see how long it takes to do a unit - what's going to happen when the TiPB goes to sleep?
It will still fold.
Also I tried running the script, but it didn't work, anyone else have problems with that?
Try changing this line:

cd ../Library/Folding@home/work/
-to-
cd ~/Library/Folding@home/work/

It worked fine for me after that.
 

Mr. Anderson

Moderator emeritus
Nov 1, 2001
22,568
6
VA
still the same friggin error

"./sl.sh: Command not found."

Which doesn't make sense, because its right there, chmod'd and everything. What should I edit it in?

D
 

mc68k

macrumors 68000
Apr 16, 2002
1,996
0
Originally posted by dukestreet
still the same friggin error

"./sl.sh: Command not found."

Which doesn't make sense, because its right there, chmod'd and everything. What should I edit it in?

D
Are you trying to edit with ./sl.sh? This is the command for executing the script. If ./sl.sh does not execute the script, try source sl.sh. You have to be in the same subdirectory as sl.sh for ./sl.sh to recognize the script.

If you want to edit it, use pico for simplicity.
 

Mr. Anderson

Moderator emeritus
Nov 1, 2001
22,568
6
VA
Originally posted by mc68k

If you want to edit it, use pico for simplicity.

Thanks mk68k! Pico worked great. I tried using vi but its been soooo damn long I was having problems remembering all the silly key commands. I had a bunch of ^M's floating around that messed the whole thing up.

here's the output

Code:
[localhost:~] dja% ./sl.sh
- Frames Completed: 0, Remaining: 100
ls: No match.

so when can I expect to get one frame done?

D
 

bousozoku

Moderator emeritus
Jun 25, 2002
15,717
1,891
Lard
The least I've seen is 4 minutes, the most would be over an hour, depending on the data, the machine, etc.

Sorry you had trouble with the shell script. I'd only tested it on two machines. :(

I always use emacs as an editor because I can't remember all the stupid vi craziness. There are enhanced versions of vi such as stevie though....eeek.
 

Mr. Anderson

Moderator emeritus
Nov 1, 2001
22,568
6
VA
ah, I should have used emacs, that I'm a little more familliar with. Use to do all my coding in that on Sun Workstations - but that was about 4-5 years ago, I can't believe its been that long.

But its been over an hour and nadda - could something be messed up?
 

mc68k

macrumors 68000
Apr 16, 2002
1,996
0
Originally posted by pimentoLoaf


And that one extra grain might provide the cure for a debilitating disease.
True…but F@H is more for aggregation and assembly of proteins. The disease part is more of a long-term goal.
 

mc68k

macrumors 68000
Apr 16, 2002
1,996
0
Originally posted by dukestreet
But its been over an hour and nadda - could something be messed up?
Could be…hard to say w/o anything to go on. I haven't had any frames take over an hour though so something's probably awry.
List your:
~/Library/Folding@home/FAHlog.txt
and
~/Library/Folding@home/work/logfile_0?.txt

Maybe then I can see if anything's screwed up.
 

mc68k

macrumors 68000
Apr 16, 2002
1,996
0
Originally posted by dukestreet
I tried using vi but its been soooo damn long I was having problems remembering all the silly key commands.

Originally posted by bousozoku
I always use emacs as an editor because I can't remember all the stupid vi craziness. There are enhanced versions of vi such as stevie though....eeek.

…and elvis, vile, etc. thanks to all those crazy unix nerds.

I would recommend the book that pimentoLoaf suggests. I read it through on a recent 9-day vacation an have learned lots. I have the opposite problem as you guys w/emacs. I was going to suggest vi, but I know of almost no one who can use it properly. :) It is very powerful though.

For example, to get rid of the ^M's at the end of every line you could have typed:
Code:
:%s/.$//g
vi does have a lot to remember. I tried emacs and it made me appreciate vi. But the battle will always rage on just like Ford vs. Chevy, etc.
 

pimentoLoaf

macrumors 68000
Dec 30, 2001
1,987
21
The SimCity Deli
BTW, I've started a new thread asking what systems y'all are using to crunch with. Click the GO button at the bottom of this thread's page to be returned to the Distributed Computing root level.
 

bousozoku

Moderator emeritus
Jun 25, 2002
15,717
1,891
Lard
Originally posted by dukestreet
ah, I should have used emacs, that I'm a little more familliar with. Use to do all my coding in that on Sun Workstations - but that was about 4-5 years ago, I can't believe its been that long.

But its been over an hour and nadda - could something be messed up?

If you've completely left the machine to itself and nothing has happened, maybe there is but not likely.

When vm_stat shows that virtual memory hits are low, things take longer, of course. The PowerBook drives are generally 4200 rpm units so it may take longer too. You saw what I said about the variious machine/drive combinations earlier, right?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.