[Ecls-list] how to build Ecl with preset higher memory bounds
Oliver Kullmann
O.Kullmann at swansea.ac.uk
Wed Jan 26 19:22:24 UTC 2011
thanks! Using --preload-lisp and the code below it works now
(with Ecl downloaded from CVS --- with older versions it was
hard to leave Maxima).
Oliver
On Sun, Jan 23, 2011 at 10:17:07PM +0100, Juan Jose Garcia-Ripoll wrote:
> On Sat, Jan 22, 2011 at 9:33 PM, Raymond Toy <toy.raymond at gmail.com> wrote:
>
> > Since that page says the limits can be set from the command line, you
> > can modify the maxima script to add those parameters to the command
> > line. Or even give those on the command line to maxima. (I forgot how
> > it's done, but maxima has the ability to supply command line arguments
> > to be passed to the underlying lisp.
> >
>
> I bet you meant --preload-lisp, for which I show an example below. I
> misunderstood Oliver. I though he is a Maxima developer interested in
> increasing the memory limits in Maxima, but now it seems it is related to
> independent jobs that happen to use Maxima built with ECL.
>
> In this case I think Oliver does not realize that the executable that they
> are using is not ECL but Maxima: a standalone executable which is built by
> the Maxima scripts. In other words, Maxima is not run by launching ECL with
> a given image. Instead it is an independent program, a binary, built using
> ECL's facilities.
>
> Hardcoding limits in ECL or modifying the sources (options which
> incidentally are in src/c/main.d) is not the answer. Will you build a
> separate executable for every limits you need? What about a situation in
> which those limits prove wrong? It is better to use an option which is
> configurable at run-time, as ECL's runtime allows you.
>
> One option is to execute lisp code before running your Maxima scripts. This
> can be done using --preload-lisp, as shown below.
>
> The other option would be to tweak the maxima build process to allow those
> limits to be enlarged in the executable (in the end it would add a couple of
> lisp statements to do the changes instead of --preload-lisp).
>
> A final option would be to teach ECL to use environment variables for
> gathering the memory limits from the command line.
>
> Out of these, I think the first one is the best option.
>
> Juanjo
>
> $ cat maxima.lisp
> (format t ";;; Frame stack limit ~D"
> (ext:set-limit 'ext:frame-stack (expt 2 14)))
> (format t "~%;;; Binding stack limit ~D"
> (ext:set-limit 'ext:binding-stack (expt 2 17)))
> (format t "~%;;; C stack limit ~D"
> (ext:set-limit 'ext:c-stack (expt 2 22)))
> (format t "~%;;; Heap size limit ~D"
> (ext:set-limit 'ext:heap-size (expt 2 30)))
> (format t "~%;;; Lisp stack limit ~D~%;;;"
> (ext:set-limit 'ext:lisp-stack (expt 2 18)))
> $ maxima -p maxima.lisp
> ;;; Loading #P"/Users/jjgarcia/lib/ecl-11.1.1/sb-bsd-sockets.fas"
> ;;; Loading #P"/Users/jjgarcia/lib/ecl-11.1.1/sockets.fas"
> ;;; Loading #P"/Users/jjgarcia/lib/ecl-11.1.1/defsystem.fas"
> ;;; Loading #P"/Users/jjgarcia/lib/ecl-11.1.1/cmp.fas"
> ;;; Frame stack limit 16640
> ;;; Binding stack limit 131072
> ;;; C stack limit 4227072
> ;;; Heap size limit 1073741824
> ;;; Lisp stack limit 33849600
> ;;;
> Maxima 5.23post http://maxima.sourceforge.net
> using Lisp ECL 11.1.1
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1)
>
> --
> Instituto de Física Fundamental, CSIC
> c/ Serrano, 113b, Madrid 28006 (Spain)
> http://juanjose.garciaripoll.googlepages.com
--
Dr. Oliver Kullmann
Computer Science Department
Swansea University
Faraday Building, Singleton Park
Swansea SA2 8PP, UK
http://cs.swan.ac.uk/~csoliver/
More information about the ecl-devel
mailing list