Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

distributed compiler

by vxp (Pilgrim)
on Jul 23, 2004 at 15:35 UTC ( [id://376904]=perlquestion: print w/replies, xml ) Need Help??

vxp has asked for the wisdom of the Perl Monks concerning the following question:

I've a 26 node cluster at my full disposal. 3.06Ghz CPU, 2 of them per node. I thought it might be an interesting idea to write a client/server set of scripts that would basically act as a distributed compiler.

Say you have a large project to compile (example: linux kernel). Its a collection of small(ish) .c files, basically. Master node would run the preprocessor locally, so there would be no need to have the identical header files across the compute nodes (nevermind the fact that compute nodes _are_ identical.. but why not do this for the people who dont have identical 26 machines at their disposal).

Then it would take the .c files and distribute them over to the compute nodes, which would gladly compile them and return them over to the master node when done, for linking. That is it, in a very brief nutshell.

What do you, fellow monks, think about this idea? Good? Bad? Any CPAN modules you'd recommend to use for this task? Any wisdom to share at all, about the idea?

May perl be with you.

Replies are listed 'Best First'.
Re: distributed compiler
by valdez (Monsignor) on Jul 23, 2004 at 15:41 UTC

    Have a look at distcc, it is exactly what you described:

    distcc is a program to distribute builds of C, C++, Objective C or Objective C++ code across several machines on a network. distcc should always generate the same results as a local build, is simple to install and use, and is often two or more times faster than a local compile.
    See also Parallel::Pvm on CPAN, it could be a good starting point.

    Ciao, Valerio

Re: distributed compiler
by pbeckingham (Parson) on Jul 23, 2004 at 15:46 UTC

    Don't forget that there are often several lengthy link operations that could themselves be distributed, so the master is not doing all of that work.

    But I would use distcc.

      of course you would, because there's no perl-distcc yet! :D

      just kidding of course.
      but, i'm going to try and out-do distcc and prolly take a bit less lines of code to do it :)

        Then best wishes to you! I imagine you'll enjoy the challenge, and learn lots from it. Nice project.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://376904]
Approved by tye
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-19 01:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found