Richard Fateman | 13 Jan 02:32 2013
Picon

compiling Maxima 5.29.1 on Allegro Common Lisp, 16X speedup

The recipe I gave previously didn't seem to quit work, but I plowed on 
and got it going.

1. download the source for Maxima.

2. start up allegro common lisp ALISP  (ansi)
:cd to the directory maxima-5.29.1/src

3. type (asdf::load-system :maxima)

4. when it finishes compiling and loading everything,
type

(in-package :maxima)
(continue)

Now not everything is set up.  in particular, plotting, info. Also the 
front end is just ascii,
not wxmaxima.

And also I changed the maxima-5.29.1/src/maxima.asd file to exclude 
numerical module

.. line 114
   #+ignore
      (:module numerical

... because of compiler messages about f2cl-lib:integer4 unrecognized, 
and stalling in
compiling j4save.lisp.
(Continue reading)

Adam | 13 Jan 17:07 2013
Picon

Re: compiling Maxima 5.29.1 on Allegro Common Lisp, 16X speedup

Thx for this recipe.
Compiling Maxima is the time when one can allocate more memory.
Can you describe it ?

Regards

Adam

On 13.01.2013 02:32, Richard Fateman wrote:
> The recipe I gave previously didn't seem to quit work, but I plowed on
> and got it going.
>
> 1. download the source for Maxima.
>
> 2. start up allegro common lisp ALISP  (ansi)
> :cd to the directory maxima-5.29.1/src
>
> 3. type (asdf::load-system :maxima)
>
> 4. when it finishes compiling and loading everything,
> type
>
> (in-package :maxima)
> (continue)
>
>
> Now not everything is set up.  in particular, plotting, info. Also the
> front end is just ascii,
> not wxmaxima.
>
(Continue reading)

Richard Fateman | 13 Jan 17:29 2013
Picon

Re: compiling Maxima 5.29.1 on Allegro Common Lisp, 16X speedup

On 1/13/2013 8:07 AM, Adam wrote:
> Thx for this recipe.
> Compiling Maxima is the time when one can allocate more memory.
> Can you describe it ?
There's lots of information on Allegro Common Lisp--- it is commercially 
supported, though
I think that all you need is the trial version for Maxima.  It is my 
impression that you can
allocate more memory in Allegro at any time, not just when you start it up.

There is a function aclmalloc.  This is described in the Franz Inc 
documentation on garbage collection.
If you download a copy of the lisp you will have it in  doc/gc.htm. 
Presumably it is online somewhere too.

I think the free trial version is sufficient to run Maxima, though I 
haven't figured out all the numerical module issues.

RJF
Raymond Toy | 14 Jan 18:14 2013
Picon

Re: compiling Maxima 5.29.1 on Allegro Common Lisp, 16X speedup

>>>>> "Richard" == Richard Fateman <fateman <at> eecs.berkeley.edu> writes:

    Richard> And also I changed the maxima-5.29.1/src/maxima.asd file
    Richard> to exclude numerical module

    Richard> .. line 114
    Richard>   #+ignore
    Richard>      (:module numerical

    Richard> ... because of compiler messages about f2cl-lib:integer4
    Richard> unrecognized, and stalling in compiling j4save.lisp.

Hmm.  Can you say what error you get about f2cl-lib:integer4?  This is
probably some really simple oversight in f2cl-lib.lisp.  j4save.lisp
is pretty simple; it shouldn't cause acl to stall.

I also remember that the the free version of ACL can't compile the
slatec code because there isn't enough heap.

    Richard> The nice thing about this recipe is that it uses just
    Richard> lisp.  No perl, make, config, gcc, m4, awk.  No
    Richard> makefiles, (except for maxima.asd).

Yes, that's nice.  But I can't live without the documentation, so this
doesn't appeal to me. :-)  There is a branch of maxima that uses
cl-ppcre to build the documentation.  This is nice, but I think it was
a little buggy.

    Richard> why did I do this?  I wanted to try out some
    Richard> functionality that runs in Allegro but not in GCL, but
(Continue reading)

Robert Dodier | 15 Jan 05:24 2013
Picon

Re: compiling Maxima 5.29.1 on Allegro Common Lisp, 16X speedup

On 2013-01-13, Richard Fateman <fateman <at> eecs.berkeley.edu> wrote:

> Now not everything is set up.  in particular, plotting, info.

Plotting with gnuplot should work -- I see src/plot.lisp has a #+allegro
to launch Gnuplot. So if it doesn't work, it might be pretty easy to
fix. Here is the current version of the code (line 130 in
src/plot.lisp):

  #+allegro (setf *gnuplot-stream* (excl:run-shell-command
                    path :input :stream :output nil :wait nil))

About the info system, the *.info and index files are generated by make
when a tarball is generated (via make dist-gzip). So if one builds from
an unpacked tarball, the info system should work. If it doesn't, it
would probably be pretty easy to fix.

best

Robert Dodier
Richard Fateman | 15 Jan 07:55 2013
Picon

Re: compiling Maxima 5.29.1 on Allegro Common Lisp, 16X speedup

On 1/14/2013 8:24 PM, Robert Dodier wrote:
> On 2013-01-13, Richard Fateman <fateman <at> eecs.berkeley.edu> wrote:
>
>> Now not everything is set up.  in particular, plotting, info.
> Plotting with gnuplot should work -- I see src/plot.lisp has a #+allegro
> to launch Gnuplot.
It is apparently not quite so simple... this is what happens

  (continue)
(%i1) x+x;
(%o1)                                 2 x
(%i2) plot2d(sin(x),[x,0,10]);
Error: Attempt to take the value of the unbound variable
        `*MAXIMA-TEMPDIR*'.
   [condition type: UNBOUND-VARIABLE]

setting *maxima-tempdir* to "c:/temp"  and trying again , tracing 
run-shell-command ...

  (continue)
(%i4) ''%i2;
  0[4]: (EXCL:RUN-SHELL-COMMAND "gnuplot"
          :INPUT :STREAM
          :OUTPUT NIL
          :WAIT NIL)
Error: "starting shell command" resulted in
        error: No such file or directory [errno=2].
   [condition type: SYSCALL-ERROR]
Rupert Swarbrick | 15 Jan 12:19 2013
Picon

Re: compiling Maxima 5.29.1 on Allegro Common Lisp, 16X speedup

Richard Fateman <fateman <at> eecs.berkeley.edu> writes:
> setting *maxima-tempdir* to "c:/temp"  and trying again , tracing
> run-shell-command ...
>
>
>  (continue)
> (%i4) ''%i2;
>  0[4]: (EXCL:RUN-SHELL-COMMAND "gnuplot"
>          :INPUT :STREAM
>          :OUTPUT NIL
>          :WAIT NIL)
> Error: "starting shell command" resulted in
>        error: No such file or directory [errno=2].
>   [condition type: SYSCALL-ERROR]

Isn't that just saying gnuplot isn't in PATH?

Rupert
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Robert Dodier | 15 Jan 19:46 2013
Picon

Re: compiling Maxima 5.29.1 on Allegro Common Lisp, 16X speedup

On 2013-01-15, Richard Fateman <fateman <at> eecs.berkeley.edu> wrote:

> (%i2) plot2d(sin(x),[x,0,10]);
> Error: Attempt to take the value of the unbound variable
>         `*MAXIMA-TEMPDIR*'.

Oh -- *MAXIMA-TEMPDIR* and other such global variables are set up by
configure.lisp -- see INSTALL.lisp for details.

>   0[4]: (EXCL:RUN-SHELL-COMMAND "gnuplot"
>           :INPUT :STREAM
>           :OUTPUT NIL
>           :WAIT NIL)
> Error: "starting shell command" resulted in
>         error: No such file or directory [errno=2].

I assume Gnuplot is installed. I don't know what directories
RUN-SHELL-COMMAND will search. Maybe the command name has to be fully
qualified? Just guessing.

best

Robert Dodier
Richard Fateman | 15 Jan 22:29 2013
Picon

Re: compiling Maxima 5.29.1 on Allegro Common Lisp, 16X speedup

On 1/15/2013 10:46 AM, Robert Dodier wrote:
> On 2013-01-15, Richard Fateman <fateman <at> eecs.berkeley.edu> wrote:
>
>> (%i2) plot2d(sin(x),[x,0,10]);
>> Error: Attempt to take the value of the unbound variable
>>          `*MAXIMA-TEMPDIR*'.
> Oh -- *MAXIMA-TEMPDIR* and other such global variables are set up by
> configure.lisp -- see INSTALL.lisp for details.
Well, then the asdf::load-system should maybe know about it.

also, loading configure.lisp and executing (configure)
leads to this.

Error: File #P"configure.in" does not exist.
   [condition type: FILE-ERROR]

..........

Oh, with asdf::load-system
there is also a problem with this..

; Fast loading C:\maxima-5.29.1\src\binary-ecl\xmaxima_def.fasl
Error: File #P"c:\\maxima-5.29.1\\src\\share-subdirs.lisp" does not
        exist.
   [condition type: FILE-ERROR]

Restart actions (select using :continue):
  0: Prompt for a different filename to compile
  1: Retry compiling #<CL-SOURCE-FILE "maxima" "final" "share-subdirs">.
  2: Continue, treating
(Continue reading)


Gmane