rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

Heap exhausted during garbage collection #1699

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 23:19:35 Created by ajmirelesme on 2019-10-17 22:15:46 Original: https://sourceforge.net/p/maxima/bugs/3590


I have been using Maxima recently, and I have found it extremely helpful. I am using a new, decent computer, but I frequently encounter slow calculations and errors;:

I am working with very, very long matrices (I do not know how to objectively describe them). Computer gets slow whenever I try to see the numbers, but that is not the main issue. I was trying to calculate an integral which included a very long polynomial and its derivate, as well as a square root. And I got the following message [I hace read other posts with similar errors, but I was unable to understand the possible solutions, I read something about batch size and using CCL]:

Message from the stdout of Maxima: Welcome to LDB, a low-level debugger for the Lisp runtime environment. 
ldb>
Message from maxima's stderr stream: Heap exhausted during garbage collection: 0 bytes available, 16 requested. 
Gen  Boxed Unboxed   LgBox LgUnbox  Pin       Alloc     Waste        Trig      WP GCs Mem-age 
 0    3216       0       0       0    8   210501728    262048   126549760    3216   1  0.0000 
 1    6045       0       0       0   13   395988752    176368   269897488    6045   1  0.6286 
 2   11353       0       0       0   38   743673408    356800   447494112   11353   1  0.5735 
 3    8406       1       0       0   30   550594880    366272    20971520    8407   0  0.3588 
 4    1972      20       0       0   40   130109696    438016     2000000    1992   0  0.0000 
 5       0       0       0       0    0           0         0     2000000       0   0  0.0000 
 6     741     184      34      28    0    63259792   1424240     2000000     987   0  0.0000 
 7       0       0       0       0    0           0         0     2000000       0   0  0.0000 
           Total bytes allocated    =    2094128256 
           Dynamic-space-size bytes =    2097152000 
GC control variables: 
   *GC-INHIBIT* = true 
   *GC-PENDING* = true 
   *STOP-FOR-GC-PENDING* = false 
fatal error encountered in SBCL pid 3288(tid 0000000000A81B10): 
Heap exhausted, game over. 

What are your recomendations for the kind of work I am doing? I am graphing and doing calculations with infinitesimal numbers with irrational values.

If this has been fixed before. Please pardon my ignorance, as I am new to this. Thank you for your time.

I have decided not to attach my work, if that is okay.

—Adan

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 23:19:36 Created by ajmirelesme on 2019-10-17 22:24:18 Original: https://sourceforge.net/p/maxima/bugs/3590/#754d


Also, is it me or is it a Maxima thing to actually have to run everything again? It bothers me a little.

I know there is something as "thing to run everytime" I open Maxima. but my understanding is that that would run on every maxima document. Am I correct?

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 23:19:39 Created by peterpall on 2019-10-18 05:25:06 Original: https://sourceforge.net/p/maxima/bugs/3590/#e861


For the speed issue: If you are using wxMaxima displaying long matrices on MS Windows has been sped up in the current nightly build (which can be found at https://wolfgang.dautermann.at/maxima/nightlybuild/ ).

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 23:19:43 Created by robert_dodier on 2019-11-17 21:07:13 Original: https://sourceforge.net/p/maxima/bugs/3590/#60ff


Adan, there is really not much useful advice that anyone can give without knowing exactly what are the operations you are trying to do. Please consider attaching a file which contains an example of the work you are doing or paste an example into a comment.

The message about "heap exhausted" means only that the expressions became larger and larger and finally all of the heap memory allocated to the Lisp runtime was used up. The memory allocation is not too large; I think by default it might be 2 Mbytes or 4 Mbytes or something like that. Although that is not really very much memory these days, my experience is that if you increase the amount of memory allocated, Maxima will just run longer before finally crashing again.

Given all that, a solution to the problem is probably going to be found in trying to reduce the size of the expressions that you need to work with. Perhaps if you give a specific example, someone will be able to give some specific advice.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 23:19:46 Created by robert_dodier on 2019-11-29 18:58:53 Original: https://sourceforge.net/p/maxima/bugs/3590/#efe1


Adan, I'm closing this issue as "won't fix" as there is no information from which to derive helpful advice. In general it's necessary to provide specific information about the operations that led to the problem. If you would like to pursue this topic further, please open a new bug report providing some details about what are the operations you tried and what happened. Thank you for your interest in Maxima, and all the best.