From: ·········@yahoo.com
Subject: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <2b77f800.0302101941.680103fe@posting.google.com>
Hi, 

I've started teaching myself lisp, mainly for fun & enlightenment.  My
profession sometimes requires some numerical analysis and
number-crunching.

I am wondering: does anyone know of any recent numerical/scientific
project done in common lisp?

I googled, and found some simpler numerical algorithms implemented in
the "CMU Artificial Intelligence Repository", circa mid-1990s,

http://www-2.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/math/numrecip/0.html

but these seem to be meant for demonstration/prototyping rather than
serious numerical work.

So my first questions are:

1.  Does anyone know of any numerical/scientific project done recently
in common lisp?  Or using some lisp variant, like scheme?

2.  Is there a collection of lisp numerical libraries, similar to the
GNU Scintific Library (GSL) for numerical work in C?

3.  I looked at the webpage for the "lush" project; I didn't try using
it but it looked like their language is lisp-like in syntax only; does
anyone have actual experience with this tool?

A related (more general) question:  

4.  Does the functional programming style afford any advantages over
currently-mainstream languages, in scientific programming?  Surely
there must be abstractions in numerical analysis that are natural to
express using lisp's macro facility?  (I can't think of any, that's
why I'm asking.)

Two points to note in connection to the last question:  

(A)  A cursory look at the recipes in the CMU AI repository shows
mainly defuns, I couldn't spot any higher-order features (mapcar, or
defmacro).  Not surprising, since these lisp recipes were translated
from Pascal recipes.  Perhaps the benefits of functional programming
in numerical work have never been explored properly?  (So hard to
believe.  Please prove me wrong and point me to relevant discussions!)

(B)  I've heard about successful numerical work in OCaml, but I don't
know if the functional paradigm was relevant in such work.


In short, I would appreciate all pointers to numerical work in lisp,
or the application of  functional programming concepts to
numerical/scientific programming.

Thanks, 
Masud

From: Bradley J Lucier
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <b2a14d$6fs@arthur.cs.purdue.edu>
In article <····························@posting.google.com>,
 <·········@yahoo.com> wrote:
>1.  Does anyone know of any numerical/scientific project done recently
>in common lisp?  Or using some lisp variant, like scheme?

Try the web page for software for my course

http://www.math.purdue.edu/~lucier/615/software

We're planning to add a few new things this semester (Dirichlet boundary
conditions, faster multigrid, better grid generator, perhaps some other stuff).

Brad Lucier
From: Larry Clapp
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <8b6a2b.bi.ln@theclapp.ddts.net>
In article <····························@posting.google.com>,
·········@yahoo.com wrote:
> I've started teaching myself lisp, mainly for fun & enlightenment.
> My profession sometimes requires some numerical analysis and
> number-crunching.
> 
> I am wondering: does anyone know of any recent numerical/scientific
> project done in common lisp?

Does MAXIMA count?
http://maxima.sourceforge.net/referencemanual/maxima_toc.html says:

"MAXIMA is a fairly complete computer algebra system. 

This system MAXIMA is a COMMON LISP implementation due to William F.
Schelter, and is based on the original implementation of Macsyma at
MIT, as distributed by the Department of Energy."

If you require portable number number crunching, this may help:
http://web.njit.edu/~rxt1077/clisp-maxima-zaurus.html ("CLISP and
MAXIMA for the Sharp Zaurus SL-5000D")

-- 
Larry Clapp / ·····@theclapp.org
Use Lisp from Vim: VILisp: http://vim.sourceforge.net/script.php?script_id=221


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Rolf Wester
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <b2ab17$os9$1@nets3.rz.RWTH-Aachen.DE>
Larry Clapp wrote:

>In article <····························@posting.google.com>,
>·········@yahoo.com wrote:
>  
>
>>I've started teaching myself lisp, mainly for fun & enlightenment.
>>My profession sometimes requires some numerical analysis and
>>number-crunching.
>>
>>I am wondering: does anyone know of any recent numerical/scientific
>>project done in common lisp?
>>    
>>
>
>Does MAXIMA count?
>http://maxima.sourceforge.net/referencemanual/maxima_toc.html says:
>
>If you require portable number number crunching, this may help:
>http://web.njit.edu/~rxt1077/clisp-maxima-zaurus.html ("CLISP and
>MAXIMA for the Sharp Zaurus SL-5000D")
>
>  
>
Is MAXIMA really for number crunching? Besides this CLISP is much to 
slow to be suitable
for real number crunching.

Rolf Wester
From: Larry Clapp
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <pdqa2b.rj7.ln@theclapp.ddts.net>
In article <············@nets3.rz.RWTH-Aachen.DE>, Rolf Wester wrote:
> Larry Clapp wrote:
>>In article <····························@posting.google.com>,
>>·········@yahoo.com wrote:
>>>I've started teaching myself lisp, mainly for fun & enlightenment.
>>>My profession sometimes requires some numerical analysis and
>>>number-crunching.
>>>
>>>I am wondering: does anyone know of any recent numerical/scientific
>>>project done in common lisp?
>>
>>Does MAXIMA count?
>>http://maxima.sourceforge.net/referencemanual/maxima_toc.html says:
>>
>>If you require portable number number crunching, this may help:
>>http://web.njit.edu/~rxt1077/clisp-maxima-zaurus.html ("CLISP and
>>MAXIMA for the Sharp Zaurus SL-5000D")
>>
> Is MAXIMA really for number crunching?

I dunno.  You can do numerical analysis on it, though.  (Or, at least,
I got that impression from the brief tutorial I read, and from other
stuff I've heard over the years about it.  I welcome corrections on
this matter.)

> Besides this CLISP is much to slow to be suitable for real number
> crunching.

Well, Maxima runs on several platforms.  I mentioned clisp
specifically because I haven't seen any other Lisps ported to the
Sharp Zaurus PDA (though I think I've seen a Scheme or two).

On the other hand, he'd probably prefer a laptop for portable
numerical analysis, so I'll shut up now.  :)

-- 
Larry Clapp / ·····@theclapp.org
Use Lisp from Vim: VILisp: http://vim.sourceforge.net/script.php?script_id=221


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Masud Haque
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <Pine.GSO.4.53.0302120055160.26341@sliderule.rutgers.edu>
On Tue, 11 Feb 2003, Larry Clapp wrote:

OP> I am wondering: does anyone know of any recent numerical/scientific
OP>  project done in common lisp?
>
> Does MAXIMA count?
> http://maxima.sourceforge.net/referencemanual/maxima_toc.html says:


I'm the OP; thanks to everyone who replied.

Special thanks to Matthias Heiler who pointed out John Hughes' "Why
Functional Programming Matters"; I had come across this article before
but not realized that it gives numerical-analysis examples.

Thanks also to the people who pointed out maxima; I haven't used it
yet.  (First attempt at installing failed: depecndency problem).  I
would indeed like to check if it's a viable alternative to mathematica
and maple.

I had asked about "numerical/scientific projects done in common lisp".
I meant to ask about real (large-scale?) numerical work done recently
using lisp code (as opposed to applications like maxima written in
lisp).  I suppose the question still stands.

Bradley and Marc pointed to numerical software they wrote or are
involved in (http://www.math.purdue.edu/~lucier/615/software, and
http://www.femlisp.org).  Questions:

1) Have any of these been used to get "real" (publishable :-)
   scientific resuls? (or something used in industry?)

2) Would it be meaningful, at this stage, to put together a collection
   of all such lisp numerical code in some repository?


Thanks again to everyone who replied!


Masud

--------------------------------------------------------
If you need to send me email in person, masud1011 is
the username, at yahoo,D0T,com.
--------------------------------------------------------
Ph.D. Student, Dept of Physics & Astronomy (Rutgers, NJ)
--------------------------------------------------------
From: Robbie Sedgewick
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <d375fcee.0302120939.119e1c9b@posting.google.com>
Masud Haque <·····@not.real.address> wrote in message news:<·································@sliderule.rutgers.edu>...
> 
> I had asked about "numerical/scientific projects done in common lisp".
> I meant to ask about real (large-scale?) numerical work done recently
> using lisp code (as opposed to applications like maxima written in
> lisp).  I suppose the question still stands.
> 

I am also a graduate student in physics and interested in this
question as well.
My guess is that lisp would be useful on large-scale numerical
problems for the "glue" that calls C and fortran routines.  I don't
know of anyone who does this with CL but check out
http://ab-initio.mit.edu/ for some infomation on doing this with
scheme.

Does anyone know if the common free lisps play nicely with the mpi
implementations normally found on supercomputers?

I think that lisp would also be very useful to analyze the results
produced by large-scale numerical research.  My work has a lot of
post-simulation analysis that requires flexibility more than speed at
any cost.


> Bradley and Marc pointed to numerical software they wrote or are
> involved in (http://www.math.purdue.edu/~lucier/615/software, and
> http://www.femlisp.org).  Questions:
> 
> 1) Have any of these been used to get "real" (publishable :-)
>    scientific resuls? (or something used in industry?)
 
I just started using lisp.  Maybe next year :)


> 2) Would it be meaningful, at this stage, to put together a collection
>    of all such lisp numerical code in some repository?

I think this would be great.  What I really want is something like
python's Numeric.  I know about matlisp, but it didn't seem to have
the flexibility with slicing arrays that I need.  When I have some
free time, I plan to work on this.


--Robbie
From: Paolo Amoroso
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <dKhLPnDFs8WqsbjD5xfkCflZKDCc@4ax.com>
On 12 Feb 2003 09:39:04 -0800, ········@yahoo.com (Robbie Sedgewick) wrote:

> I am also a graduate student in physics and interested in this
> question as well.

Be sure to check:

  http://lisp.cern.ch


Paolo
-- 
Paolo Amoroso <·······@mclink.it>
From: Robbie Sedgewick
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <d375fcee.0302131144.1fcca8be@posting.google.com>
Paolo Amoroso <·······@mclink.it> wrote in message news:<····························@4ax.com>...
> On 12 Feb 2003 09:39:04 -0800, ········@yahoo.com (Robbie Sedgewick) wrote:
> 
> > I am also a graduate student in physics and interested in this
> > question as well.
> 
> Be sure to check:
> 
>   http://lisp.cern.ch
> 

Thanks.  That looks like it could grow into a good reference for
scientific computing with lisp...

robbie

> 
> Paolo
From: Marco Antoniotti
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <_yt2a.25$uq6.795@typhoon.nyu.edu>
Masud Haque wrote:

> On Tue, 11 Feb 2003, Larry Clapp wrote:
>
> OP> I am wondering: does anyone know of any recent numerical/scientific
> OP>  project done in common lisp?
>
> >Does MAXIMA count?
> >http://maxima.sourceforge.net/referencemanual/maxima_toc.html says:
>
>
>
> I'm the OP; thanks to everyone who replied.
>
> Special thanks to Matthias Heiler who pointed out John Hughes' "Why
> Functional Programming Matters"; I had come across this article before
> but not realized that it gives numerical-analysis examples.
>
> Thanks also to the people who pointed out maxima; I haven't used it
> yet.  (First attempt at installing failed: depecndency problem).  I
> would indeed like to check if it's a viable alternative to mathematica
> and maple.
>
> I had asked about "numerical/scientific projects done in common lisp".
> I meant to ask about real (large-scale?) numerical work done recently
> using lisp code (as opposed to applications like maxima written in
> lisp).  I suppose the question still stands.
>
> Bradley and Marc pointed to numerical software they wrote or are
> involved in (http://www.math.purdue.edu/~lucier/615/software, and
> http://www.femlisp.org).  Questions:
>
> 1) Have any of these been used to get "real" (publishable :-)
>    scientific resuls? (or something used in industry?)
>
> 2) Would it be meaningful, at this stage, to put together a collection
>    of all such lisp numerical code in some repository?
>
>
> Thanks again to everyone who replied!


You are forgetting Matlisp.  http://matlisp.sf.net.


Marco.
From: Raymond Toy
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <4nel6d2vov.fsf@edgedsp4.rtp.ericsson.se>
>>>>> "Marco" == Marco Antoniotti <·······@cs.nyu.edu> writes:


    Marco> You are forgetting Matlisp.  http://matlisp.sf.net.

And matlisp is also used in some large simulation package used at UC
Berkeley.

Unfortunately, I have drawn a total blank on the same of the
project. :-(

Ray
From: Jens Axel S�gaard
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <aAt2a.83363$Hl6.7702917@news010.worldonline.dk>
Masud Haque wrote:
> I had asked about "numerical/scientific projects done in common lisp".
> I meant to ask about real (large-scale?) numerical work done recently
> using lisp code (as opposed to applications like maxima written in
> lisp).  I suppose the question still stands.

> --------------------------------------------------------
> Ph.D. Student, Dept of Physics & Astronomy (Rutgers, NJ)
> --------------------------------------------------------

From his postings in comp.lang.scheme, I know that  Siegfried Gonzi
has used Scheme for numerical calcalutions for a physics paper.
I don't know the details, but his address is: ···············@kfunigraz.ac.at

Looking for the address I fell over this:

>         Bradley J. Lucier. "Numerical partial differential equations
> in Scheme".  Scheme and Functional Programming 2000. September 2000.
>         http://www.ccs.neu.edu/home/matthias/Scheme2000/lucier.ps

So people have been using languages in the Lisp-family for your purpose
recently.

--
Jens Axel S�gaard
From: Nicolas Neuss
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <87isvlo2o2.fsf@ortler.iwr.uni-heidelberg.de>
Masud Haque <·····@not.real.address> writes:

> Bradley and Marc pointed to numerical software they wrote or are
> involved in (http://www.math.purdue.edu/~lucier/615/software, and
> http://www.femlisp.org).  Questions:
> 
> 1) Have any of these been used to get "real" (publishable :-)
>    scientific resuls? (or something used in industry?)

Sorry that I am late to answer.  I was at the AMAM conference in Nice
presenting also computations done by Femlisp (computing an effective slip
boundary coefficient for an oscillating boundary).  Doing demos during a
talk by pressing a button on a Lisp expression is fun!

Status of Femlisp: I hoped to be faster, but it looks as if I will get
ready with the first release only in April.  I want to use the program for
computations in my habilitation thesis which should be submitted before
May.  There will also be an overview article on it which I will publish
somewhere.

At the moment, it is already nice working with Femlisp, but it is still too
slow for several simple situations (low order finite elements).  I hope to
improve on that before release (otherwise I might get laughed at by some
colleagues:-).

Nicolas.
From: Friedrich Dominicus
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <87znp3l57w.fsf@fbigm.here>
·········@yahoo.com writes:

> 
> So my first questions are:
> 
> 1.  Does anyone know of any numerical/scientific project done recently
> in common lisp?  Or using some lisp variant, like scheme?
Have you read the announcment of Maxima? 
> 
> 2.  Is there a collection of lisp numerical libraries, similar to the
> GNU Scintific Library (GSL) for numerical work in C?
Again you can use all of Maxima on the Lisp side too.
> 
> 3.  I looked at the webpage for the "lush" project; I didn't try using
> it but it looked like their language is lisp-like in syntax only; does
> anyone have actual experience with this tool?
I just have downloaded it and regret that it was not done in ECL e.g.

> 
> 4.  Does the functional programming style afford any advantages over
> currently-mainstream languages, in scientific programming?
If you like you can say functional programming is nearer to
mathematics. I can't recall having seen side-effects in
mathematics....

Regards
Friedrich
From: Rolf Wester
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <b2ac3a$pq2$1@nets3.rz.RWTH-Aachen.DE>
·········@yahoo.com wrote:

>Hi, 
>
>I've started teaching myself lisp, mainly for fun & enlightenment.  My
>profession sometimes requires some numerical analysis and
>number-crunching.
>
>I am wondering: does anyone know of any recent numerical/scientific
>project done in common lisp?
>  
>
There is MatLisp, a CL binding for Lapack and Blas.

>
>2.  Is there a collection of lisp numerical libraries, similar to the
>GNU Scintific Library (GSL) for numerical work in C?
>  
>
If anybody knows of a CL binding (preferably UFFI) of GSL and/or FFTW I 
would be very
appreciative for any hint.

>3.  I looked at the webpage for the "lush" project; I didn't try using
>it but it looked like their language is lisp-like in syntax only; does
>anyone have actual experience with this tool?
>
>  
>
Not very much. I tried lush but as Friedrich Domenicus does I regret 
that it is not CL.

>A related (more general) question:  
>
>4.  Does the functional programming style afford any advantages over
>currently-mainstream languages, in scientific programming?  Surely
>there must be abstractions in numerical analysis that are natural to
>express using lisp's macro facility?  (I can't think of any, that's
>why I'm asking.)
>  
>
Higher order functions help in writing reusable code (for example 
numerical integration). This can
also be done  in C++ for example by using templates, but it's not as 
simple as it is in CL.

For me the main advantage of CL over C/C++ is not so much the numerical 
stuff itself. This is faster
when written in C/C++ (or Fortran). CL is good for fast prototyping, 
interactively "scripting" of
number chrunching  code accessed via the FFI and for those parts in a 
program that are not
very computer time consuming but programmer time consuming.

Rolf Wester
From: see.signature
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <slrnb4hhas.4r.anyone@Flex111.dNWL.WAU.NL>
>·········@yahoo.com wrote:
>
>>Hi, 
>>
>>I've started teaching myself lisp, mainly for fun & enlightenment.  My
>>profession sometimes requires some numerical analysis and
>>number-crunching.
>>
>>I am wondering: does anyone know of any recent numerical/scientific
>>project done in common lisp?
>>  
Have a look at http://www.femlisp.org, a (future) finite element
package in common lisp.

Marc

-- 
------------------------------------------------------------------------------
email: marc dot hoffmann at users dot whh dot wau dot nl
------------------------------------------------------------------------------
From: Matthias Heiler
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <b2agau$i75$1@trumpet.uni-mannheim.de>
Hello,

Rolf Wester wrote:
> ·········@yahoo.com wrote:
>>I am wondering: does anyone know of any recent numerical/scientific
>>project done in common lisp?
>>
> There is MatLisp, a CL binding for Lapack and Blas.

When I looked at MatLisp the last time (a couple of weeks ago, at 
sourceforge, from CVS) it showed rather unstable under CMU CL.  Just a 
warning.

>>4.  Does the functional programming style afford any advantages over
>>currently-mainstream languages, in scientific programming?  Surely
>>there must be abstractions in numerical analysis that are natural to
>>express using lisp's macro facility?  (I can't think of any, that's
>>why I'm asking.)

There is an article by John Hughes, not specifically targeted towards Lisp 
but towards (lazy) functional programming.  It's called "Why Functional 
Programming Matters" and makes a good read.
http://www.math.chalmers.se/~rjmh/Papers/whyfp.html

Matthias
From: Raymond Toy
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <4nr8aforsv.fsf@edgedsp4.rtp.ericsson.se>
>>>>> "Matthias" == Matthias Heiler <····@nspm.de> writes:

    Matthias> Hello,
    Matthias> Rolf Wester wrote:
    >> ·········@yahoo.com wrote:
    >>> I am wondering: does anyone know of any recent numerical/scientific
    >>> project done in common lisp?
    >>> 
    >> There is MatLisp, a CL binding for Lapack and Blas.

    Matthias> When I looked at MatLisp the last time (a couple of weeks ago, at 
    Matthias> sourceforge, from CVS) it showed rather unstable under CMU CL.  Just a 
    Matthias> warning.

In what way was it unstable?  Did you report this instability?  Please
do so, either here or to the matlisp mailing list.

Thanks,

Ray
From: Matthias Heiler
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <b2diu8$91e$1@trumpet.uni-mannheim.de>
Hi Raymond,

Raymond Toy wrote:

>>>>>> "Matthias" == Matthias Heiler <····@nspm.de> writes:
>     Matthias> When I looked at MatLisp the last time (a couple of weeks
>     ago, at
>     Matthias> sourceforge, from CVS) it showed rather unstable under CMU
>     CL.  Just a Matthias> warning.
> 
> In what way was it unstable?  Did you report this instability?  Please
> do so, either here or to the matlisp mailing list.

I don't recall exactly what I did.  Usually the first thing I do with a 
numerical library is create a random, symmetric 1000x1000 matrix and do a 
singular value decomposition.  I did this again yesterday, running a little 
stress test.  Essentially it works fine now, except that at some point CMU 
runs out of memory.  This is strange as I do have enough memory to hold a 
couple of matrices this big.

Boiling things down I arrived at this test case:
===
(defun test-leak (size)
  (format t "size: ~A~%" size)
  (let ((m (rand size)))
    (setf m (m- m (m+ m (m* m m))))
    (format t "-> ok~%" size)))

(loop ; finitely
 (test-leak 3000))
===

Executing (test-leak 3000) once works fine and takes roughly 15% of my RAM.  
Executing it repeatedly (in the loop) leads sooner or later to a breakdown 
of GC:
===
...
-> ok
size: 3000
-> ok
size: 3000
-> ok
size: 3000
*A1 gc_alloc_large failed, nbytes=49441576.
===

Now that I think about it, this might actually be a result of CMUx86's 
conservative GC getting confused by the random bits in my matrices...

> Thanks,

I'm thanking you!

  Matthias
From: Russell McManus
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <87fzqtpoua.fsf@yahoo.com>
Matthias Heiler <····@nspm.de> writes:

> Now that I think about it, this might actually be a result of
> CMUx86's conservative GC getting confused by the random bits in my
> matrices...

If that is the case then using a specialized array might make the
problem go away, because I think that CMUCL is smart enough not to
traverse the innards of these types of arrays looking for pointers
lisp objects.  

I could be wrong on this point, but it is an interesting test none the
less.

-russ
From: Raymond Toy
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <4nbs1hh7ew.fsf@edgedsp4.rtp.ericsson.se>
>>>>> "Matthias" == Matthias Heiler <····@nspm.de> writes:

    Matthias> Boiling things down I arrived at this test case:
    Matthias> ===
    Matthias> (defun test-leak (size)
    Matthias>   (format t "size: ~A~%" size)
    Matthias>   (let ((m (rand size)))
    Matthias>     (setf m (m- m (m+ m (m* m m))))
    Matthias>     (format t "-> ok~%" size)))

    Matthias> (loop ; finitely
    Matthias>  (test-leak 3000))
    Matthias> ===

    Matthias> Executing (test-leak 3000) once works fine and takes roughly 15% of my RAM.  
    Matthias> Executing it repeatedly (in the loop) leads sooner or later to a breakdown 
    Matthias> of GC:

A 3000x3000 array of double-floats takes about 72 MB of memory.  You
need 3 of them to hold the computations being done, so that's 216 MB
of heap memory.  CMUCL defaults to 512 MB of heap, so you can easily
run out of memory.

While I did not look at the actual code, there are probably other
things going on to generate additional garbage.

Try running cmucl -dynamic-size 1024 or so to get 1 GB of heap.

    Matthias> size: 3000
    Matthias> *A1 gc_alloc_large failed, nbytes=49441576.

This means you ran out of heap.  (I wish CMUCL was a bit more graceful
when running out of heap.)

    Matthias> Now that I think about it, this might actually be a result of CMUx86's 
    Matthias> conservative GC getting confused by the random bits in my matrices...

No, that's not the reason because the arrays are (simple-array
double-float (*)).  However, other garbage may be hanging around. :-)

Thanks for letting me know what happened!

Ray
From: Matthias Heiler
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <b2drsh$ftd$1@trumpet.uni-mannheim.de>
Hi,

Raymond Toy wrote:
> Try running cmucl -dynamic-size 1024 or so to get 1 GB of heap.

Worked.  Thanks! The switch is actually called -dynamic-space-size.

>     Matthias> Now that I think about it, this might actually be a result
>     of CMUx86's Matthias> conservative GC getting confused by the random
>     bits in my matrices...
> 
> No, that's not the reason because the arrays are (simple-array
> double-float (*)).  However, other garbage may be hanging around. :-)

You are right (the problem also occured when using all-zero matrices).  It 
dissapeares when explicitly calling full GC as in
(loop 
   (test-leak 3000)
   (gc :full t))

Matthias
From: Joe Marshall
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <znp1pa6k.fsf@ccs.neu.edu>
Matthias Heiler <····@nspm.de> writes:

> Now that I think about it, this might actually be a result of CMUx86's 
> conservative GC getting confused by the random bits in my matrices...

It probably has the floating point numbers tagged exactly.  If it
doesn't have a copying GC, though, I'd guess fragmentation.
From: Daniel Barlow
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <87n0l1ju4y.fsf@noetbook.telent.net>
Matthias Heiler <····@nspm.de> writes:

> Now that I think about it, this might actually be a result of CMUx86's 
> conservative GC getting confused by the random bits in my matrices...

CMUCL x86 scavenges the lisp heap precisely.  The only
conservativeness (conservativity) is when it's looking at the C stack


-dan

-- 

   http://www.cliki.net/ - Link farm for free CL-on-Unix resources 
From: Christopher C. Stacy
Subject: Re: Numerical analysis (scientific programming) using lisp
Date: 
Message-ID: <uk7g6tvwr.fsf@dtpq.com>
You might want to look into Macsyma (the commercial product).  
This is the super-duper symbolic algebra program that was originated
decades ago.  But it also includes numerical analysis packages such
as LAPACK, and it even can even translate and execute MATLAB source.
It also has a fancy 3D graphical imaging system.   
It is written in Common Lisp.