Re: "6 day compile" (1 GHz G4) DONE in 7 hours (8 core Intel 3.0 GHz over SSH)
Re: "6 day compile" (1 GHz G4) DONE in 7 hours (8 core Intel 3.0 GHz over SSH)
- Subject: Re: "6 day compile" (1 GHz G4) DONE in 7 hours (8 core Intel 3.0 GHz over SSH)
- From: Michael Wild <email@hidden>
- Date: Mon, 18 Jun 2007 08:39:14 +0200
Helmut Brandt wrote:
[...]
> Here was my approach:
I started 8 Terminal shells on my machine, each with an SSH login to the
remote 8 core machine.
There's a very useful program for such things. It is called screen. It
allows you to start multiple "windows" in a single session, to switch
between them, split the terminal and display them above one another, and
many more useful things. What's best though: you only need open one ssh
connection (not 8 as in your case) and the screen session survive a
disconnect. If this should happen, just log back in, and type "screen
-r", and you are where you left off. Very, very useful. You can even
detach and reattach on purpose, or have the same screen session attached
to multiple terminals (with some work you can even share it with
somebody else, e.g. for instructional purposes).
see:
http://www.kuro5hin.org/story/2004/3/9/16838/14935
man screen
I gave each shell a single file to compile, and
watched for the execution to complete, at which time I pasted in a new
gcc compile command for a different file. Using this method was
extremely fast. However, due to my Unix ignorance I did not know how to
load multiple commands to a shell which would execute *consecutively*
rather than *concurrently* (I found before that I could seriously bog
down the system if I loaded too many compile requests to the cores).
Either write a shell script or create a Makefile and then pass the -j to
make, as others have already mentioned. However, I personally prefer to
use SCons (www.scons.org). Simpler to use, no cryptic syntax. Just plain
Python. You can install it
a) manually from the tar-ball
b) using fink (www.finkproject.org)
c) with MacPorts (www.macports.org)
So, I just did it manually. In this manner, each core chewed on a single
compile, and then got (manually) another one from me when it was done.
I had written a python script to generate a file of the commands, so I
just copied from that text file and pasted to the shell (yeah, I know,
gross).
Must have been a royal pain ;-)
[...]
I just wonder what you are going to do if you have to recompile (parts)
or your code... Doing it by hand will be very tedious, tracking the
dependencies properly almost impossible.
My 2 cent.
Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden