Folding-community.org Forum Index Portal
 
 • FAQ  • Search  •  Preferences  •  Usergroups  •  Register  •  Profile  •  Log in to check your private messages  •  Log in
 Pandegroup  • Home  • News  • Project Summary  • Server Status  • Client Download  Stats  • Official  • Extreme OC  • Kakao  Other  • Tools  • WIKI
Calendar 
View next topic
View previous topic

Post new topicReply to topic View previous topicEmail to a Friend.List users that have viewed this topicSave this Topic as filePrintable versionLog in to check your private messagesView next topic
Author Message
susato
Site Moderator
Site Moderator



Joined: 18 Oct 2003
Posts: 432
Location: Ithaca, NY
blank.gif
PostPosted: Tue 14 Nov, 2006 14:17  Post subject:  Guides to running the OSX SMP Client from Terminal
Reply with quoteBottom of PageBack to top

RUNNING THE SMP MacOS X CLIENT FROM TERMINAL
A CONCISE INTRODUCTION


Ivoshiee's short and sweet version of the SMP MacOS X FAH client installation procedure.

First, shut down all current instances of conventional Folding clients running in Rosetta.

Go to Terminal: In the Finder ribbon, select Go-> Utilities. Open Terminal.
In the Terminal window you should see a prompt that looks something like this:
Code:
yourcomputername:~ yourusername$

To get the SMP FAH client going, type in the following commands, each line followed by a return:
Code:
mkdir ~/Library/FAH
cd ~/Library/FAH
curl -O http://folding.stanford.edu/release/FAH_SMP_OSX.tgz
tar xzf FAH_SMP_OSX.tgz

Now you should have the SMP FAH client in place and you'll have to configure it. This can be done by running the following command:
Code:
./fah5 -local -configonly

After setting the configuration (just answer the questions. Important points:
- Reply yes to allowing units >5 Mb in size
- Reply yes to changing advanced options
- When asked about the memory, set in the proper amount of RAM in Mb, e.g. 512, 768, 1536...
- Set the machineID to 1 higher than any present in existing client.cfg files - this can be checked by opening each client.cfg with TextEdit.

There are a couple of ways to start the SMP FAH client. One way is by typing in the following command each time:
Code:
./fah5 -local -advmethods -forceasm -verbosity 9

To make it a little easier for yourself, you can create a little script by running the following commands:
Code:
echo "./fah5 -local -advmethods -forceasm -verbosity 9" > FAHSMP
chmod +x FAHSMP

Now you'll just have to run
Code:
./FAHSMP
or
Code:
./FAHSMP &
and all those additional FAH client flags will get added by themselves. The client will download the proper core, then a work unit, and you'll be off and running!

All other comments and hints can be found at the susato post just below.

An even shorter shortcut: Just cut the individual commands from this little HOWTO and paste them to the terminal (window) of your machine. The prompt is written as box:~ user%.

Example:
Code:

Welcome to Darwin!
box:~ user% mkdir ~/Library/FAH
box:~ user% cd ~/Library/FAH
box:~/Library/FAH user% curl -O http://folding.stanford.edu/release/FAH_SMP_OSX.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  138k  100  138k    0     0  34461      0  0:00:04  0:00:04 --:--:-- 39789
box:~/Library/FAH user% tar xzf FAH_SMP_OSX.tgz
box:~/Library/FAH user% ls -la
total 960
drwxr-xr-x    5 user  guest     170 Nov  6 23:58 .
drwx------   18 user  guest     612 Nov  6 23:55 ..
-rw-r--r--    1 user  guest  141900 Nov  6 23:56 FAH_SMP_OSX.tgz
-rwxr-xr-x    1 user  guest  282796 Nov  4 07:04 fah5
-rwxr-xr-x    1 user  guest   60156 Oct 27 16:52 mpiexec
box:~/Library/FAH user% ./fah5 -local -configonly
...
box:~/Library/FAH user% echo "./fah5 -local -advmethods -forceasm -verbosity 9" > FAHSMP
box:~/Library/FAH user% chmod +x FAHSMP
box:~/Library/FAH user% ./FAHSMP
...


Edit -UF: Updated download links




Last edited by susato on Thu 16 Nov, 2006 20:51; edited 2 times in total
   OfflinePersonal Gallery of susatoView user's profileSend private message
susato
Site Moderator
Site Moderator



Joined: 18 Oct 2003
Posts: 432
Location: Ithaca, NY
blank.gif
PostPosted: Tue 14 Nov, 2006 14:25  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

RUNNING THE SMP CLIENT FROM TERMINAL

A long detailed version by susato for newcomers to UNIX and the Terminal. (See the post above for Ivoshiee's short, "only the essentials" version)

The SMP client cannot be run from inside InCrease or any other installer/controller package, and will not launch properly with a double-click. You must give it UNIX commands inside a Terminal window. If you're new to UNIX and to using the terminal, don't panic - everything you need is here, and the rest of the folding community can help you with the rest. So jump right in and get started!

GETTING READY

First, stop all conventional work units currently folding under Rosetta, using one of the following methods:

- quitting the GUI or screensaver client.
- Opening Activity Monitor, clicking on the process called fah5, then hitting the red stop sign, and repeating until all fah5 processes have been killed. Don't quit the cores (anything labeled FahCore_xxx.exe) ; just quit the clients, and they will shut down the cores gracefully. - Stopping the units from the InCrease window. In this case be sure to set InCrease not to interfere with your SMP client in future. UNCHECK the InCrease preference items "start folding at boot", "start folding when InCrease launches", and "stop folding when InCrease quits". This makes InCrease totally manual and reduces the possibility that it will try to control the SMP client.

Are you new to [email protected]? If so, welcome! Please decide now what username you want to use and what team you would like to fold for. Check if your username is unique here by typing it into the search field and hitting search. If you see lines like
Quote:
1 username 123558 16685 3446
2 userNamE 56572 265 1971
3 Username 4665 755 0

then pick another name - the username you want is already in use by someone else. Also find out the team number of the team you want to fold for. If you don't want to join a team, that number will be 0.

Now download the new SMP client at the [email protected] download page (at the very bottom of the list)

It will show up as "FAH_SMP_OSX.tar" in whatever location your downloads usually go to.

Now double-click it, or use Stuffit Expander or another unpacking program to "un-tar" it.
It will turn into a folder named "FAH_SMP_OSX Folder".

PREPARING AND RUNNING THE CLIENT

In the Finder ribbon, select Go-> Utilities. Open Terminal. In the Terminal window you should see a prompt that looks something like:

yourcomputername:~ yourusername$

We will start by creating a directory named FAH in the Library directory in your home folder. Yes, you could do this the regular OSX way with Finder ->New Folder, but let's use the Terminal just to get acquainted with it. At the prompt type:

mkdir ~/Library/FAH [return] (the [return] means hit the return key)
Showing this in "code format",

Code:
mkdir ~/Library/FAH

When you see one of these code windows, just type whatever is in the code box at the prompt, then hit return at the end of each line.

The prompt will return; when it does, type

Code:
cd ~/Library/FAH

This command makes the new folder into the "current directory" in which future Terminal instructions will be executed. Now type

Code:
pwd

which is the "print working directory" command. Terminal should type back to you the following:

/Users/yourusername/Library/FAH

and you'll see that the prompt has changed: it's now
yourcomputername:~/Library/FAH yourusername$

Now leave the Terminal aside for a moment, go to the FAH_SMP_OSX Folder, and move the two files in it to the folder you just created. (Just drag and drop in the ordinary OSX way).

We will now go back to the Terminal window and check that the two files have arrived into our new directory. At the prompt type

Code:
ls -la

Terminal should display a response similar to the following:

Quote:
total 680
drwxr-xr-x 4 yourusername yourgroup 136 Nov 6 13:39 .
drwx------ 41 yourusername yourgroup 1394 Nov 6 13:39 ..
-rwxr-xr-x 1 yourusername yourgroup 282796 Nov 4 10:04 fah5
-rwxr-xr-x 1 yourusername yourgroup 60156 Oct 27 19:52 mpiexec

The first two items on the list are hidden files indicating the directory structure (they contain paths to the current directory and its parent directory). The last two are the files you just moved in there.

Now we will ensure that fah5 and mpiexec are designated as executable files. At the prompt type

Code:
chmod +x fah5

and at the next prompt

Code:
chmod +x mpiexec

Now it's time to configure your new SMP client, with the command

Code:
./fah5 -local -configonly

The client will start up in "configure-only" format and start asking you questions. Enter your folding name and team number and answer the rest of the questions. Important points:

- reply YES to using -advmethods
- reply YES to accepting work units > 5 Mb
- for the memory question, enter the correct amount of RAM in Mb - e.g. 512, 1536, 2048, If you don't, it assumes a huge amount.
- reply YES to changing advanced options
- Set the Machine ID as described below.

MachineID is critical. If you have Rosetta units already folding on your computer, set the Machine ID of the new client to a value one higher than the currently highest Machine ID you're using. You can find out what this value is by going to the Finder menu, selecting File-->Find and searching on the file name client.cfg. Open the resulting files one at a time with TextEdit (don't change them!) and figure out what the largest MachineID number is - then select the next higher one. If you usually fold just as many clients as you have processors, the largest machine ID will probably be 2 for a dual-processor machine or 4 for a quad - so pick "3" or "5". If you haven't folded before, let the machineID take the default value of "1".

After you finish answering the questions Terminal will type out a summary of your answers to the questions, so you can make sure your user name and team are set correctly. If you find any problems, just repeat the last command when the prompt returns.

Everything ok? Great. Now we'll run the client.

Before you start, decide if you want to keep your Terminal window open all the time when Folding is running, or if you want to be able to close it and continue folding. If this is your first time using Terminal, you should probably leave it open - you can always minimize it to get it out of your way.

To leave the Terminal window open, type at the prompt:

Code:
./fah5 -local -advmethods -forceasm -verbosity 9

To be able to close the window, type

Code:
./fah5 -local -advmethods -forceasm -verbosity 9 &

As soon as you hit return, the client should start up, download a unit, download the SMP core and start processing.

------

MONITORING YOUR FOLDING
(With contributions from daveb - Thanks, Dave!)

To see if it's running: Open up Activity Monitor and click on CPU in the bar about 2/3 of the way down the window. You'll see two graphs, one for each processor, which start out mostly black but turn to mostly blue after your first unit begins running.

If you click on the column labeled Process Name, all your processes will be displayed in alphabetical order. You should see one named bash, which is your Terminal shell window; one named fah5, which is the new client, and four named FahCore_a1.exe which are four cores controlled by the new client, operating symmetrically on your protein. They probably won't take up similar amounts of CPU power - that is normal. Finally, you'll see mpiexec, which helps to coordinate between the single client and the multiple cores.

Methods to check on the progress of your unit:

- Unitinfo.txt: Minimalist. In the directory with fah5 there should be a file called unitinfo .txt that will open in text edit if you double click on it and will display the most recent % completed. You could also just type cat unitinfo.txt at the terminal prompt. This file will only display the name, download time, due date and % complete of the current unit. It can also sometimes lag the unit by 1 %.

- FAHlog.txt: The play-by-play. Also in the same directory is the current folding log file, FAHlog.txt, which contains most (or all) of the info that would be displayed in the terminal window. FAHlog.txt has frame completion and checkpoint info with timestamps so that you can see how the unit is progressing. The end of the file has the very latest information on your work unit. To open FAHlog.txt in TextEdit just double click on it in the Finder. You could also use the command cat FAHlog.txt in the Terminal window, but be prepared - the output can easily be hundreds of lines long.

- queue.dat: What the servers need to know. In the same directory, your queue.dat file holds info on all work units in your queue (uploaded or not) and estimates the eventual finishing time for your current unit. Though queue.dat is not in human-readable form, you can display it using a helper application called qd, short for "queue dump". First download qd from qd tools and move it into the folder where the FAH client and the queue.dat file reside. This can be done using the terminal, or in the 'normal' way using the Finder. Then open a new Terminal window and type

Code:
cd ~/Library/FAH
chmod +x qd
./qd

and the qd program will display info on your work unit right there in the window. Next time you use it, you can skip the chmod command.

------

COMMON QUESTIONS & ERROR MESSAGES

1) YIKES! WHAT'S GOING OUT OVER THE NETWORK?

If you click on the Network tab above the graphs, you'll see what looks like a huge amount of data going out over your network. Don't sweat it - it's NOT actually going out, but is traveling between the processors in your machine. Activity Monitor interprets the inter-core data transfer as network data transfer - but it's all happening inside your computer. If you unplug your ethernet cable, or deactivate Bluetooth or AirPort, the folding client may stop - this is a known bug that is being worked out.

2) WHY SO MUCH VERBIAGE IN THE TERMINAL WINDOW?

The Terminal window will start to accumulate a lot of text. This is normal. If you uncover a problem in this open beta test, such as early unit ends or problems uploading, the extra info will come in handy for the PandeGroup's developers. By the way, if you start getting a lot of gobbledygook error messages, save them into a TextEdit file before exiting the Terminal window. Some of those messages won't make it into the FAHlog.txt but may be helpful anyway.

3) I GET AN ERROR MESSAGE ABOUT DELETING WORK UNIT FILES

[03:20:23] - Warning: Could not delete all work unit files (4): Core returned invalid code

Don't worry about this message coming at the end of a work unit. It's working right but reporting wrong :) and it's on the known bugs list.

4) I GET AN ERROR MESSAGE ABOUT "PAST RUN STATEMENT"

[03:19:58] In GuardedRun past run statement
[03:19:58] Leaving Run
[03:20:03] In main() past run statement

This is OK too. It just looks a little scary.

5) GEE, HOW MUCH MEMORY DOES IT THINK I HAVE?

[02:11:39] - Will indicate memory of 4294965248 MB

This means you accepted the default amount of memory when configuring the client. It's not serious, but the next time you start up folding, go back to the configuration step (./fah5 -local -configonly) and correct your answer to the memory question.

6) IT'S NOT CONNECTING ME TO THE WORK SERVER, E.G.

[21:48:33] Initial: 0000; + Could not connect to Work Server
[21:48:33] - Error: Attempt #1 to get work failed, and no other work to do.
Waiting before retry.

If this keeps happening, stop folding (see below) then restart it using the same command you used to start it in the first place. It may work better the second or third time. If that doesn't help, shut down folding, report the problem, and switch back to any Rosetta units you had left over when you started using the SMP client.

7) HOW DO I STOP FOLDING?

If you *didn't* use the & on the end of your run command, click in the Terminal window and type control-c (e.g. hold down the control button and hit the letter c). You don't have to wait for the prompt to do this. The control-c will interrupt and shut down folding.

if you *did* use the &, control-c won't do anything. In this case, go to the Activity Monitor window, select the process named fah5 and hit the red stop sign. Don't do this if the client is about to write a checkpoint, because shutting down in the middle of recording a checkpoint could corrupt the checkpoint data. Then when you restart, the client will be forced to start from the beginning of the work unit. Wait until you're safely between checkpoints to stop the client.

If you want to stop at the very end of a work unit, wait until you see messages like the following:

[00:55:22] [email protected] Core Shutdown: FINISHED_UNIT
[00:55:28] CoreStatus = 64 (100)
[00:55:28] Unit 3 finished with 99 percent of time to deadline remaining.
[00:55:28] Updated performance fraction: 0.9323

Then it's safe to hit control-c or quit the client from inside Activity Monitor.

8) HOW DO I RESTART FOLDING AFTER STOPPING IT?

Use Activity Monitor to make sure that your folding client is really, really stopped. Look for a process named "fah5" in the Activity Monitor window - easier if the processes are alphabetized If you see fah5, click on it and select "inspect process". The parent of your SMP client process should be "bash", which is the Terminal shell. (The parent of a standard fah5 process running under InCrease will be InCrease) If you see any fah5 processes with parent "bash" in activity monitor, select them and hit the red stop sign to quit them. If you don't do this, there will be a conflict when you start a new client, and it will shut down automatically.

Now get to the prompt in your Terminal window (close the current window and open another one if you have to) and at the prompt type

Code:
cd ~/Library/FAH 
./fah5 -local -advmethods -forceasm -verbosity 9
(add an & before the return if you want to keep folding after you close the terminal window)

9a) IT'S SENDING ME TO SERVER 0.0.0.0 WHICH DOESN'T EXIST

The Assignment Server does this if server .56 is down - it's preferable to what used to happen during earlier testing (9b, if you see that one, please report it). Going to server 0.0.0.0, which is nowhere, just makes the client wait and try again later. If you want to play with it, try the directions in 6) or just go back to folding your old Rosetta units for a while.

9b) IT'S TRYING TO DOWNLOAD THE WRONG CORE (OBSOLETE BUG)

In early testing, if server .56 was down or occupied, the assignment server sometimes decided to assign work from a different server. Unfortunately, since the SMP client won't accept a standard Gromacs or Tinker core, the attempt generated messages like:

Quote:
[02:11:39] Trying to send all finished work units
[02:11:39] + No unsent completed units remaining.
[02:11:39] - Preparing to get new work unit...
[02:11:39] + Attempting to get work packet
[02:11:39] - Will indicate memory of 2048 MB
[02:11:39] - Connecting to assignment server
[02:11:39] Connecting to http://assign.stanford.edu:8080/
[02:11:40] Posted data.
[02:11:40] Initial: 41AB; - Successful: assigned to (171.65.103.160).
[02:11:40] + News From [email protected]: Welcome to [email protected]
[02:11:40] Loaded queue successfully.
[02:11:40] Connecting to http://171.65.103.160:8080/
[02:11:40] Posted data.
[02:11:40] Initial: 0000; - Receiving payload (expected size: 42010)
[02:11:41] - Downloaded at ~41 kB/s
[02:11:41] - Averaged speed for that direction ~181 kB/s
[02:11:41] + Received work.
[02:11:41] Trying to send all finished work units
[02:11:41] + No unsent completed units remaining.
[02:11:41] + Closed connections
[02:11:41]
[02:11:41] + Processing work unit
[02:11:41] Core required: FahCore_78.exe
[02:11:41] Core not found.
[02:11:41] - Core is not present or corrupted.
[02:11:41] - Attempting to download new core...
[02:11:41] + Downloading new core: FahCore_78.exe
[02:11:41] Downloading core (/~pande/OSX/x86//Core_78.fah from www.stanford.edu)
[02:11:41] - Error: HTTP GET returned error code 404
[02:11:41] + Error: Could not download core
[02:11:41] + Core download error (#2), waiting before retry...

This shouldn't happen any longer (bug fixed). If by some mischance you get this error, report it, then stop folding using either the control-c or the stop sign method, and restart the client using the regular run command
Code:
./fah5 -local -advmethods -forceasm -verbosity 9

(adding the & is still an option) and see if it will go to server .56 after a fresh start.

10. HOW DO I CLOSE THE TERMINAL WINDOW SAFELY?
The Terminal window is like a mini operating system. When you close it, you also close all the processes that were started inside it, unless they are finished already, or they are specifically designated to continue after the window is closed (by typing the & at the end of the command to run a process).

Simply closing the terminal window using the red close button often generates a warning about the fate of ongoing processes. To avoid that message, exit the shell by typing

Code:
exit


which closes out all of those processes gracefully. Terminal will then reply
Quote:
logout
[Process completed]

at which point you can close the window without seeing the warning box.

11. MY WORK UNIT EARLY ENDED WITH A MEMORY ALLOCATION (malloc) ERROR

Active bug - please report it in the forum.

12. FOLDING JUST BARELY STARTS, THEN IT HANGS OR CRASHES AFTER THE 4 NNODES/MYRANK LINES:

For example,
Quote:
[16:21:02] - Starting from initial work packet
[16:21:02]
[16:21:02] Project: 3006 (Run 7, Clone 0, Gen 2)
[16:21:02]
[16:21:02] Assembly optimizations on if available.
[16:21:02] Entering M.D.
[16:21:19] on if available.
[16:21:19] Entering M.D.
NNODES=4, MYRANK=0, HOSTNAME=mybox.myusername.net
NNODES=4, MYRANK=1, HOSTNAME=mybox.myusername.net
NNODES=4, MYRANK=2, HOSTNAME=mybox.myusername.net
NNODES=4, MYRANK=3, HOSTNAME=mybox.myusername.net

If you see something like the above, followed either by a fatal MPI error or a long period of inactivity, please report it; it's an active bug.

-------

WHAT ABOUT MY OLD ROSETTA WORK UNITS?

Many of us are beginning to test SMP units while old Rosetta units remain resident on the computer. What to do with them? PLEASE finish them! All the work units are essential to the folding project, so we don't want to lose even one. Here are four options to consider:

a) Move the work units to another Mac without any Folding installed, under InCrease
b) Move the work units to another Mac already folding with InCrease.
c) Move the old units to another Mac and fold them with the conventional console client
d) Run the Rosetta units in parallel with the SMP client on your Intel Mac

a) Moving the work units to another Mac without any Folding installed, under InCrease

Go to ~/Library/InCrease and find the folders containing the data on your old work unit(s). If InCrease created them, these folders should have names like cpu, cpu1, cpu2, cpu3 etc.

Move all of these folders to a key drive or your iDisk, then trash them on your Intel Mac. Create a ~/Library/InCrease folder on a second Internet-connected Mac running OSX, move the cpu folders into it, and download InCrease. Enter your name and team number into the InCrease preferences. Under "Client Preferences" set the CPU number to as many units as you've transferred over. Also, set InCrease NOT to start on boot and NOT to start when InCrease starts - that is, keep it totally manual. Now, run the units with the -oneunit flag in the InCrease preferences. As each unit finishes, delete its folder and lower the CPU number by one.

b) Moving the work units to another Mac already folding with InCrease.

Go to ~/Library/InCrease and find the folders containing the data on your old work unit. If InCrease created them, these folders should have names like cpu, cpu1, cpu2, cpu3 etc.

Look in the ~/Library/InCrease folder in the destination machine to figure out what names are already in use for the cpu folders. Before you move any new cpu folders onto the key drive, rename them to higher numbers, e.g. cpu5, cpu6 etc. Also use TextEdit to open the client.cfg files in each of the renamed folders and edit the machineID numbers to match the numbers in the cpu folder name, e.g. machineID = 5 for a folder renamed cpu5.

Move the renamed folders into the ~/Library/InCrease folder on the new machine. Under InCrease's "Client Preferences" set the CPU number to the total number of cpu folders in the ~/Library/InCrease folder. If they don't show up in the main InCrease window, use the Add Group command to find them and add them. Then run them with the -oneunit flag, deleting each folder after its work unit finishes and setting the CPU number one lower.

c) Move the old units to another Mac and fold them with the conventional console client
This assumes no existing folding on the machine.

Open a new Terminal window and type
Code:
 mkdir ~/Library/Folding1
cd ~/Library/Folding1
curl -O http://folding.stanford.edu/OSX/OSX.html#console


This creates a new folder "Folding1" in your user Library, downloads the console client into it, and creates a file called FAH502-Console.exe which you can see by typing
Code:
 ls -la


Now run this standard client in configure-only mode:
Code:
 ./FAH502-Console.exe -local -configonly


You can use the same settings as you did for configuring your SMP client. Do this again for as many clients as you're moving over, naming the new directories Folding2, Folding3 etc, and taking care that each time you configure, the machineID matches the folding directory name.

Now move the work folders of your Rosetta instances into the newly created folders.

Finally, run the clients. The following code runs the client in the first newly created directory, Folding1:

Code:
cd ~/Library/Folding1
./FAH502-Console.exe -local -forceasm -oneunit -verbosity 9

Repeat for the other clients (or allow the units to run one at a time). You can add the & after "-verbosity 9" if you like. Each client will stop when the unit finishes and uploads; at that point you can delete its folder and everything in it.

If you have units already Folding on the computer, change the machine ID's of the moved units first as described in (b) to avoid having duplicate clients with the same machine ID on the host box.

d) Run the Rosetta units in parallel with the SMP client. The advantage is that you won't have to move the units to another machine. The disadvantage is that they will run even more slowly than they did, and will also slow down your SMP units.

Always run parallel Rosetta clients from the command line (e.g. in the Terminal window) rather than in InCrease, because InCrease is not yet configured to work gracefully with the SMP client, and has been observed to shut down the SMP client when InCrease or a unit controlled through InCrease is stopped.

If you have a work unit that's getting near its deadline, you might want to move it to another machine, or just postpone using the SMP client until the old one is finished. In any case, don't try running SMP and conventional clients in parallel right away - wait until you have folded a few SMP units first and are more comfortable with Terminal commands.

OK, here's how to run in parallel.

In OSX, copy the fah5 client from the bin folder, usually at

~/Library/"Application Support"/InCrease/bin (note the quotes around a file or folder name containing a space)

into the folder containing your conventional Folding core (FahCorexxx.exe) and your work folder. Typically this folder is at

~/Library/InCrease/cpu or possibly ~/Library/InCrease/cpu1 or ~/Library/InCrease/cpu2.

Copy over the qd file, too - this will help you keep track of your units. The Terminal commands are:

Code:
 cp  ~/Library/"Application Support"/InCrease/bin/fah5 ~/Library/InCrease/cpu/fah5
cp ~/Library/"Application Support"/InCrease/bin/qd ~/Library/InCrease/cpu/qd

(in general the syntax is, cp oldpath newpath where oldpath is the path to the file's original location and newpath the path to the copy you want to make.)

Now go to the file containing the conventional unit you want to finish. Supposing that it's in folder cpu, type
Code:
cd ~/Library/InCrease/cpu


Make sure that the fah5 file, the qd file and the work folder are all there by listing the directory contents:
Code:
ls -la


Now start up your conventional unit with the same command you used to start your SMP unit, but adding the -oneunit flag to shut down the client after the finished unit is returned.
Code:
./fah5 -local -advmethods -forceasm -oneunit -verbosity 9 


or
Code:
./fah5 -local -advmethods -forceasm -oneunit -verbosity 9  &


To check on the progress of your Rosetta unit, open a fresh Terminal window, go to the directory where that unit is located and run qd, e.g.
Code:
cd ~/Library/InCrease/cpu
./qd


and qd will display the info on the work unit.

Now you have one conventional work unit folding along with your SMP client. When it finishes and uploads successfully, trash the folder that held it, and select the next conventional work unit. Keep going until you have finished them all.

-----

THANK YOU for folding with the SMP client. Please send feedback on this draft FAQ to susato by PM, or just add it to the thread. Your input is valuable and will be very much appreciated!




Last edited by susato on Sat 25 Nov, 2006 04:43; edited 2 times in total
   OfflinePersonal Gallery of susatoView user's profileSend private message
kennys
Folders 'r Us
Folders 'r Us



Joined: 06 Jul 2004
Posts: 92

sao_tome.gif
PostPosted: Thu 16 Nov, 2006 13:29  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

just one initial comment

Quote:

b) Moving the work units to another Mac already folding with InCrease.

Go to ~/Library/InCrease and find the folders containing the data on your old work unit. If InCrease created them, these folders should have names like cpu, cpu1, cpu2, cpu3 etc.

Look in the ~/Library/InCrease folder in the destination machine to figure out what names are already in use for the cpu folders. Before you move any new cpu folders from the key drive, rename them to higher numbers, e.g. cpu5, cpu6 etc. Also edit the client.cfg file in each of the renamed folders so that the machineid matches the number in the cpu folder's name, e.g. machineID = 5 for a folder renamed cpu5.


you mention "Also edit the client.cfg file ..." but clarification on how to do this is important, IMHO of course ..

The client.cfg file association is with InCrease so one can't just double click this file to make any changes ... a simple way is to hold down the 'ctrl' key and then click on the client.cfg file and then choose the 'Open With -> Other' menu, I then choose the app located in the Applications folder called 'TextEdit' wihch is a default installed app.

thanks for your consideration and I'm sure you will be any to reword my instructions so they are in plain English.

thanks again for the instructions .. hopefully appreciated, read and used by many.


   OfflinePersonal Gallery of kennysView user's profileSend private message
susato
Site Moderator
Site Moderator



Joined: 18 Oct 2003
Posts: 432
Location: Ithaca, NY
blank.gif
PostPosted: Thu 16 Nov, 2006 21:27  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

Thanks for catching that, utopia-i, I've clarified it in the guides.


   OfflinePersonal Gallery of susatoView user's profileSend private message
WesleyMac
My First Folding
My First Folding



Joined: 19 Nov 2006
Posts: 2
Location: Portland, Oregon
usa.gif
PostPosted: Sun 19 Nov, 2006 08:36  Post subject:  Checking on progress of a unit
Reply with quoteBottom of PageBack to top

Thanks for the deatialed instructions. I am a relative newbie to Terminal and they helped me very much. It all worked fine, except that I was not able to check on the progress of my newly let loose SMP client. Your instructions say:

To check on the progress of your unit, open a new Terminal window and type

cd ~/Library/FAH
./qd
and the qd program will display info on your work unit right there in the window.

But I just get:

-bash: ./qd: No such file or directory

Should the command be on two lines, with a return between, or ??

Also, I do not see such a file or directory in my FAH directory, and it wasn't listed when the list command was run.

What did I miss?

And thanks again for all the work it must have taken to make the instructions


   OfflinePersonal Gallery of WesleyMacView user's profileSend private message
susato
Site Moderator
Site Moderator



Joined: 18 Oct 2003
Posts: 432
Location: Ithaca, NY
blank.gif
PostPosted: Sun 19 Nov, 2006 15:01  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

Hi WesleyMac - Oops, you're right - please excuse the oversight. I will shortly post directions on how to download, set up and run qd and qdinfo.

Likewise qfix, which is useful for correcting the situation where a WU does not return properly because it's too big. (Does everyone have BigWU set?)

Meanwhile, use TextEdit to open FAHlog.txt and look in there for your progress. It doesn't update automatically, but it's fine for an occasional snapshot, especially if you used the "&" after your run command and are folding with the Terminal window closed.


   OfflinePersonal Gallery of susatoView user's profileSend private message
daveb
Regular Folder
Regular Folder



Joined: 18 Feb 2003
Posts: 139
Location: San Diego, CA
blank.gif
PostPosted: Sun 19 Nov, 2006 15:49  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

Wesley
You first need to download qd from qd tools and move it into the folder where the FAH client and the queue.dat file reside. This can be done using the terminal, or in the 'normal' way using the Finder.

As another alternative, there should also be a file called unitinfo .txt in that same folder that will open in text edit if you double click on it and will display the most recent % completed. You could also just type cat unitinfo.txt. This is much less inforamtive than qd as it will only display the name, download time, due date and % complete of the current unit. It can also sometimes lag the unit by 1 %.

Finally, there is also a file called FAHlog.txt. This contains most (or all) of the info that would be printed out in the terminal window. This has frame completion info with timestamps so that you can see how the unit is progressing. Again, it can be double clicked for use with text edit, or accessed using cat in the terminal.

Dave


   OfflinePersonal Gallery of davebView user's profileSend private message
WesleyMac
My First Folding
My First Folding



Joined: 19 Nov 2006
Posts: 2
Location: Portland, Oregon
usa.gif
PostPosted: Sun 19 Nov, 2006 18:05  Post subject:  Checking Progress
Reply with quoteBottom of PageBack to top

Thanks to you, Dave, for the tips and the link. I installed qd and it works as advertised. P.S. The SMP beta seems really fast - I'm seeing 60+ % in just 12 hours on a large WU.


   OfflinePersonal Gallery of WesleyMacView user's profileSend private message
susato
Site Moderator
Site Moderator



Joined: 18 Oct 2003
Posts: 432
Location: Ithaca, NY
blank.gif
PostPosted: Wed 22 Nov, 2006 18:10  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

FIXING THE "WU TOO BIG TO RETURN" ISSUE WITH QFIX

Thanks to uncle_fungus, daveb and Plutronics for the content here. All I had to do was stitch it together. If you like it, send them your thanks. If you don't, send me your suggestions and corrections. Thanks for reading!

First download the mac binary version of qfix from smoking2000's site.
It is a PPC file which will run for you under Rosetta - and will also be usable on your PPC macs to fix similar problems.

Info on qfix:
http://linuxminded.xs4all.nl/mirror/www.boston.quik.com/rph/fah.html#qfix

The download:
http://linuxminded.xs4all.nl/mirror....qfix.gz

Unstuff it if it doesn't unstuff itself; it will end up a file named mac_qfix with no suffix. Put it in the same directory as the queue.dat file for the stuck work unit. (Probably something like /Users/yourname/Library/FoldingAtHome) Then stop folding, and make a backup copy of queue.dat.

Open a new Terminal window. At the prompt type cd, then a space, then drag the directory containing the mac_qfix file into the Terminal window and hit return. This copies the path from the file into the Terminal window and makes the desired directory the "current directory" in which your Terminal commands will be executed.

First rename the mac_qfix binary to qfix ,then designate qfix as an executable file with the chmod command, and at the next prompt, run qfix as in the box below.
Code:
Last login: Mon Nov 20 22:04:31 on ttyp1
Welcome to Darwin!
[Susatos-Computer:~] susato% cd /Users/susato/Library/[email protected]
[Susatos-Computer:~/Library/[email protected]] susato% mv mac_qfix qfix
[Susatos-Computer:~/Library/[email protected]] susato% chmod +x qfix
[Susatos-Computer:~/Library/[email protected]] susato% ./qfix


After running qfix, if it says the file is OK:
Quote:
[QS:~/Desktop/CPU1] pluto% ./qfix
entry 7, status 0, address 0.0.0.0
< SNIP>
entry 6, status 1, address 171.65.103.162:8080
Found results <work/wuresults_06.dat>: proj 2414, run 70, clone 29, gen 18
-- queue entry: proj 2414, run 70, clone 29, gen 18
-- queue entry isn't empty
File is OK

then delete the Queue entry like this:
Quote:
[QS:~/Desktop/CPU1] pluto% ./fah5 -local -delete 06 -forceasm -verbosity 9
[12:52:45] Loaded queue successfully.
[12:52:45] Deleting work unit #6 from work queue...
[12:53:11] ***** Got a SIGTERM signal (15)

[email protected] Client Shutdown.

and then rerun qfix:
Quote:
[QS:~/Desktop/st1] pluto% ./qfix
entry 7, status 0, address 0.0.0.0
< SNIP >
entry 6, status 0, address 171.65.103.162:8080
Found results <work/wuresults_06.dat>: proj 2414, run 70, clone 29, gen 18
-- queue entry: proj 2414, run 70, clone 29, gen 18
-- requeued for upload
File needed repair. Errors fixed: 1.

then run with the send all flag:
Quote:
[QS:~/Desktop/st1] pluto% ./fah5 -local -send all -forceasm -verbosity 9
Using local directory for configuration

Note: Please read the license agreement (fah5 -license). Further
use of this software requires that you have read and accepted this agreement.

< SNIP >
[12:55:22] Attempting to return result(s) to server...
[12:55:22] Trying to send all finished work units


[12:55:22] + Attempting to send results
[12:55:22] - Reading file work/wuresults_06.dat from core
[12:55:22] (Read 117789 bytes from disk)
[12:55:22] Connecting to http://171.65.103.162:8080/
[12:55:23] Posted data.
[12:55:23] Initial: 0000; - Uploaded at ~116 kB/s
[12:55:23] - Averaged speed for that direction ~51 kB/s
[12:55:23] + Results successfully sent
[12:55:23] Thank you for your contribution to [email protected]
[12:55:23] + Number of Units Completed: 3

[12:55:24] + Sent 1 of 1 completed units to the server
[12:55:24] ***** Got a SIGTERM signal (15)

[email protected] Client Shutdown.
[QS:~/Desktop/st1] pluto%


and you are done !

The best time to fix a queue is when the current work unit is quite new, or after finishing a unit using the -oneunit flag so that the current part of the queue stays empty. Sometimes when qfix is fixing the problematic part of the queue, it "fixes" the current work unit as well, forcing the client to restart it from zero. This is why you made the backup - so you can revert to the original queue if necessary.

If this doesn't work, there is one more thing you can try, suggested by daveb at f-c.org: move the SMP client (fah5) to another folder (or rename it temporarily); move a copy of the old PPC fah5 client into the [email protected] directory in its place, and run that one with the -send all flag as shown above. This works because the PPC client doesn't have to fold anything - it just acts as a delivery service, and then shuts down as soon as it sends the data. Then replace the PPC client with the SMP client before continuing.




Last edited by susato on Sat 25 Nov, 2006 04:49; edited 1 time in total
   OfflinePersonal Gallery of susatoView user's profileSend private message
kennys
Folders 'r Us
Folders 'r Us



Joined: 06 Jul 2004
Posts: 92

sao_tome.gif
PostPosted: Wed 22 Nov, 2006 18:23  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

susato wrote:
FIXING THE "WU TOO BIG TO RETURN" ISSUE WITH QFIX

<snip>

The download:
http://linuxminded.xs4all.nl/mirror....qfix.gz

Unstuff it if it doesn't unstuff itself; it will end up a file named qfix with no suffix. Put it in the same directory as the queue.dat file for the stuck work unit. (Probably something like /Users/yourname/Library/FoldingAtHome) Then stop folding, and make a backup copy of queue.dat.
<snip>


thanks for the details and example ... the download link you mention [and the Unstuff part] created a file called:-

mac_qfix

I presume this is the same as qfix in the example, just a mv perhaps?


   OfflinePersonal Gallery of kennysView user's profileSend private message
uncle_fungus
Site Admin
Site Admin


Age: 22
Joined: 21 Dec 2005
Posts: 3346
Location: York
uk.gif
PostPosted: Wed 22 Nov, 2006 18:25  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

utopia-i wrote:
susato wrote:
FIXING THE "WU TOO BIG TO RETURN" ISSUE WITH QFIX

<snip>

The download:
http://linuxminded.xs4all.nl/mirror....qfix.gz

Unstuff it if it doesn't unstuff itself; it will end up a file named qfix with no suffix. Put it in the same directory as the queue.dat file for the stuck work unit. (Probably something like /Users/yourname/Library/FoldingAtHome) Then stop folding, and make a backup copy of queue.dat.
<snip>


thanks for the details and example ... the download link you mention [and the Unstuff part] created a file called:-

mac_qfix

I presume this is the same as qfix in the example, just a mv perhaps?


Yes, that's correct. I've made the appropriate edits to the info above.




Last edited by uncle_fungus on Wed 22 Nov, 2006 19:12; edited 1 time in total
Cancer Gender:Male Buffalo OnlinePersonal Gallery of uncle_fungusView user's profileSend private messageSend e-mailVisit poster's websiteYahoo MessengerMSN MessengerICQ Number
susato
Site Moderator
Site Moderator



Joined: 18 Oct 2003
Posts: 432
Location: Ithaca, NY
blank.gif
PostPosted: Wed 22 Nov, 2006 19:08  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

Thanks Kenny and Andrew - on my Intel mini running OS 10.4.8, the download window initially showed the file under the name mac_qfix, but by the time it auto-unstuffed, its name had already changed to qfix.


   OfflinePersonal Gallery of susatoView user's profileSend private message
rprather
My First Folding
My First Folding


Age: 65
Joined: 09 Nov 2006
Posts: 1

usa.gif
PostPosted: Wed 22 Nov, 2006 20:20  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

Does it matter if you rename mac_qfix to qfix or just run it as mac_qfix?

It seems to work fine for me just running mac_qfix.


Taurus  Horse OfflinePersonal Gallery of rpratherView user's profileSend private messageAIM AddressYahoo MessengerICQ Number
uncle_fungus
Site Admin
Site Admin


Age: 22
Joined: 21 Dec 2005
Posts: 3346
Location: York
uk.gif
PostPosted: Wed 22 Nov, 2006 20:25  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

rprather wrote:
Does it matter if you rename mac_qfix to qfix or just run it as mac_qfix?

It seems to work fine for me just running mac_qfix.


Technically it makes no difference, the renaming operation is just to bring it in line with the Windows and Linux naming convention for qfix.


Cancer Gender:Male Buffalo OnlinePersonal Gallery of uncle_fungusView user's profileSend private messageSend e-mailVisit poster's websiteYahoo MessengerMSN MessengerICQ Number
cmillard
My First Folding
My First Folding



Joined: 16 Nov 2006
Posts: 1

usa.gif
PostPosted: Fri 24 Nov, 2006 17:23  Post subject:  (No subject)
Reply with quoteBottom of PageBack to top

Thanks for taking the time to put this together.


 Gender:Male  OfflinePersonal Gallery of cmillardView user's profileSend private message
Display posts from previous:      
Post new topicReply to topic View previous topicEmail to a Friend.List users that have viewed this topicSave this Topic as filePrintable versionLog in to check your private messagesView next topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


All times are GMT

Board Security

36151 Attacks blocked
Powered by phpBB2 Plus based on phpBB© phpBB Group :: Funded by WW of Cable Modems UK on 1&1 Servers :: Mods and Credits

[ Time: 1.2932s ][ Queries: 16 (0.3696s) ][ GZIP on - Debug on ]