Is a parallel build of Maxima (using make -j N), OK?



Regarding parallel lisp system builds in general, see
http://common-lisp.net/project/xcvb/doc/ilc09-xcvb-slides.html

Regarding Maxima in particular: its "macro" files should be loaded
(perhaps in compiled form)  before other files are compiled.  Other 
dependencies
are close to being bugs, though I suppose a compiler is entitled to give 
warnings
when it encounters calls to functions that are not defined yet.  This 
might inhibit
some optimizations, but is not usually considered a bug and would not 
prevent
a program from running.

There is (or was in 1982) a final "cleanup" pass to
initialize or optimize some data and then
  necessarily there is a final dump of the system ... which
has to happen after everything in the "core" system is loaded.


Compiling and loading Maxima does not take very long (unless perhaps the 
stuff that
I never do -- assembling the documentation in different human languages, 
or the
plotting software takes time).  Or the lisp has a very slow compiler.  
In the past CMUCL
took 10X or more time to compile a lisp file compared to Allegro...

Not very long = maybe 5 minutes on an old Pentium computer.


But for Maxima, there may be no need to run your own compilation process 
because
there are images, already made and distributed on the lisp of interest 
to you. Did you
check this out?
   There is no payoff in doing something in parallel if it is already done.
There is not much payoff in doing something in parallel if it hardly 
takes any time.


RJF


On 11/27/2010 6:56 AM, David Kirkby wrote:
> On 27 November 2010 13:53, Raymond Toy<toy.raymond at gmail.com>  wrote:
>> On 11/26/10 5:46 PM, Dr. David Kirkby wrote:
>>> If one sets something like
>>>
>>> MAKE="make -j 20"
>>>
>>> to build maxima with 20 threads in paralllel, is this safe? With well
>>> written Makefiles this is, but unless care was taken to make sure
>>> there are no race conditions, this can be unwise.
>>>
>>> Does anyone know the status of the Maxima makefile?
>> FWIW, I tried "make -j 32" just a couple of days ago.  This worked, I
>> think, and did speed up compilation a little on my Core 2 Duo machine
>> since I normally do builds with clisp, ccl, cmucl, and ecl.  Perhaps I
>> was lucky.
>>
>> I don't think anyone tries to make sure parallel builds work.  That was
>> the first time for me to try that.
>>
>> Ray
> I built it about 10 times without failure. Some of the tests including
> inserting a random delay before gcc was called, to try to detect race
> conditions. Nut it actually failed on a test where there was no delay.
>
> Unless people try to make parallel builds work, they will probably not
> work! One neads to be a lot more careful in listing the dependencies
> in the file used to create the makefile.
>
> See:
> http://www.cmcrossroads.com/ask-mr-make/7483--the-pitfalls-and-benefits-of-gnu-make-parallelization
>
>
> Dave
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima