Re: Eigenvalues of a difficult matrix (storage for CONS is exhausted)
Subject: Re: Eigenvalues of a difficult matrix (storage for CONS is exhausted)
From: Vadim V. Zhytnikov
Date: Sat, 11 May 2002 00:05:29 +0400
Francesco Poli wrote:
> Hello again!
> I finally managed to compile gcl-2.4.1 and maxima-5.6!
> I didn't understand why ftp and cvs at math.utexas.edu seem to be
> `frozen' since gcl version 2.4.0, while gcl-2.4.1 can be found at
> ftp://ftp.gnu.org/gnu/gcl/
>
> Anyway I tested maxima with some simple problems and it seems to work
> fine.
> Then I started the difficult eigenvalue job and waited, waited,
> waited...
> Since monday afternoon one CPU has been used by maxima... and memory
> allocated for maxima has grown more and more...
> After all that I received the following error:
>
> Unrecoverable error: can't allocate. Goodbye.
>
> And then my shell prompt, again...
> But in the meanwhile maxima-saved was still in execution using 99% of
> one CPU, but with very little memory usage (as I saw with top).
>
> What's the meaning of all this?
>
Maximal amount of memory GCL can allocate is determined at compile
time. By default it is 32*1024 pages (page size may be different on
different systems)
which amounts to 128Mb of RAM with 4K page. If you really want more RAM
for your computations you should rebuild GCL with
./configure --enable-maxpage=64*1024
or even more.
I also recommend to preallocate memory when Maxima or GCL starts.
This dramatically improves speed especially for large computations.
Create the file init.lsp and put it in your working directory.
Sample init.lsp
------------------------------
(progn
(si::allocate-relocatable-pages 2000 t)
(si::allocate 'cons 2000 t)
(si::allocate 'fixnum 200 t)
#-gmp (si::allocate 'cfun 200 t)
#+gmp (si::allocate 'cfun 1000 t)
(si::allocate 'symbol 100 t)
#+gmp (si::set-gmp-allocate-relocatable t)
;;(setq si::*notify-gbc* t)
)
------------------------------
Actual numbers of preallocated pages in your case
should be bigger. Try to play with it.
Removing ;; in front of last line makes GCL to print
message about each garbage collection. This information
may show which type of GCL's memory is exhausted first.
So you can prellocate more memory of this very type.
>
> TNX in advance!
> --
> Francesco Poli <frx@firenze.linux.it>
> ===================================================
> "May the Source be with you!" -- Eric S. Raymond
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
--
Vadim V. Zhytnikov
<vvzhy@mail.ru>
<vvzhy@td.lpi.ac.ru>
<vvzhy@yandex.ru>