gcl-devel
[Top][All Lists]
Advanced

[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: Camm Maguire
Subject: Re: [Gcl-devel] Re: [Maxima] Bugs in gcl cause maxima build failures
Date: 21 May 2002 23:20:17 -0400

Greetings!

Raymond Toy <address@hidden> writes:

> >>>>> "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.
> 

OK, so it shouldn't matter how the array is allocated as long as it is
contiguous, right?

> 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

Why is this?

> about 8 MB of malloc space for external routines.  It's much larger
> now, but still quite a bit smaller than the Lisp heap.
> 

Well, there could be some good news here for gcl too.  there is an
implementation specific option :static to make-array and friends,
which basically specifies that the body is contiguous, and
non-relocateable, to my understanding.  So if I implement some
(staticp function and check it on blas/lapack entry, I should be in
business, no?

>     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 
> maxima? 
> 
> I think it's useful.  I personally probably wouldn't use it, but I
> don't use maxima everyday for symbolic stuff either.
> 

Thanks again,


> Ray
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



reply via email to

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