[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Re: [Maxima] Bugs in gcl cause maxima build failures

From: Raymond Toy
Subject: Re: [Gcl-devel] Re: [Maxima] Bugs in gcl cause maxima build failures
Date: 21 May 2002 17:32:52 -0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (beets)

>>>>> "Camm" == Camm Maguire <address@hidden> writes:

Note: I've removed James Amundson and maxima from the CC list since
this doesn't have anything to do with that anymore.  Apologies if they
wanted to follow!

    >> So, if you don't mind having BLAS completely in Lisp, then yes, f2cl
    >> will give that to you.  If you really wanted to have an interface from
    >> a precompiled BLAS library to Lisp, then, no, f2cl doesn't really do
    >> that.  In principle f2cl could write out the necessary code to a
    >> foreign-function interface that you could use.  I haven't actually
    >> done this though.
    >> If you're interested in connecting Lisp with BLAS and/or LAPACK, you
    >> may want to look at Matlisp (see sourceforge.net).  It only supports
    >> ACL and CMUCL right now.  Could work with GCL in principle, but GCL
    >> must store (simple-array double-float (*)) just like C would store
    >> double x[n], and you also need to provide some means for getting at
    >> the actual storage.

    Camm> The latter I can do, but I'm unsure about how to ensure the former,
    Camm> epsecially with garbage collecting.  Do other lisps avoid splitting

Matlisp takes care to turn off GC before grabbing the array storage
address.  It does what it needs to do, calls the external Fortran
routine, and then turns GC back on.

Note that having external routines scribble into Lisp's own data
structures is a great source of hard-to-find bugs that crash your
Lisp.  This was a historical design decision back when CMUCL only had
about 8 MB of malloc space for external routines.  It's much larger
now, but still quite a bit smaller than the Lisp heap.

    Camm> arrays across pages?

What are you going to do with an double-float simple-array of 1 million
elements?  CMUCL certainly has it in one contiguous piece of memory of
8 MB or so.

    >> I think that's up to you to decide what to bundle with gcl.

    Camm> Wow -- what power! :-) I just thought this might be useful vis-a-vis
    Camm> maxima because one typically does some symbolic work, gets to a point
    Camm> where no further progress is possible, and then wants to investigate
    Camm> things numerically, at least in my work.  Maybe its better to just
    Camm> copy/paste into octave?  Would anyone else find this useful in 

I think it's useful.  I personally probably wouldn't use it, but I
don't use maxima everyday for symbolic stuff either.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]