rtoy / maxima

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

linearinterpol, charfun2, SBCL: Binding stack exhausted #3602

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-08 10:21:34 Created by sikkenogetvrovl on 2020-10-21 07:46:11 Original: https://sourceforge.net/p/maxima/bugs/3663


When running the function below on a number of data-files (optical spectra). Maxima replies with

  Binding stack guard page temporarily disabled: proceed with caution
 Maxima encountered a Lisp error:
Binding stack exhausted.

Does this make sense to you ?

 -->    for GasNumb : 1 thru NumberOfDatafiles do (
       kill(SplinesFit, h),
       print(concat(GasNumb, " of ", NumberOfDatafiles, " : ",  DataFile[GasNumb])),
       LinInterpol : linearinterpol(Data[GasNumb]),
       SplineSFit(x) := ev(LinInterpol, nouns),
     h[x, y] := if y = 2 then  SplineSFit(ActualSpectrometer[x, 1]) else ActualSpectrometer[x, 1],
       RefittedData[GasNumb] : genmatrix(h, length(ActualSpectrometer), 2)
       )$
"1 of 79 : 20200129-194053-Sensor_2004-001-1176-absorbance.csv"" "
"2 of 79 : 20200129-201152-Sensor_2004-001-1176-absorbance.csv"" "
"3 of 79 : 20200129-201253-Sensor_2004-001-1176-absorbance.csv"" "
"4 of 79 : 20200129-201352-Sensor_2004-001-1176-absorbance.csv"" "
"5 of 79 : 20200129-201452-Sensor_2004-001-1176-absorbance.csv"" "
"6 of 79 : 20200129-201553-Sensor_2004-001-1176-absorbance.csv"" "
"7 of 79 : 20200129-205426-Sensor_2004-001-1178-absorbance.csv"" "
"8 of 79 : 20200129-205527-Sensor_2004-001-1178-absorbance.csv"" "
"9 of 79 : 20200129-205627-Sensor_2004-001-1178-absorbance.csv"" "
"10 of 79 : 20200129-205726-Sensor_2004-001-1178-absorbance.csv"" "
"11 of 79 : 20200129-205827-Sensor_2004-001-1178-absorbance.csv"" "
"12 of 79 : 20200129-220037-Sensor_2004-001-1177-absorbance.csv"" "

Binding stack guard page temporarily disabled: proceed with caution
Maxima encountered a Lisp error:
 Binding stack exhausted.
PROCEED WITH CAUTION.
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
rtoy commented 4 months ago

Imported from SourceForge on 2024-07-08 10:21:35 Created by peterpall on 2020-10-21 08:04:28 Original: https://sourceforge.net/p/maxima/bugs/3663/#1622


The error message is an out-of-memory. My guess si that it originates from your code using a hash map, not a list or an array for keeping the data.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-08 10:21:39 Created by robert_dodier on 2020-12-04 20:53:39 Original: https://sourceforge.net/p/maxima/bugs/3663/#80d3


There might be ways to arrange the operations so that Maxima uses less memory to process each file, however, a simple work around is to process each file in a separate Maxima session. For example, create a function which takes just a file name and then applies all the analysis to it. Then arrange to call that function in a loop similar to:

$ for f in *absorbance.csv; do maxima --batch-string="process_file(\"$f\");"; done

which executes Maxima once for each file.

That works for Unix-like systems. If you are working on Windows, there might be a different way to arrange the loop.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-08 10:21:42 Created by robert_dodier on 2021-01-09 22:26:35 Original: https://sourceforge.net/p/maxima/bugs/3663/#f3aa


It appears that bug #3670 is the same except that cspline is called there instead of linearinterpol.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-08 10:21:46 Created by robert_dodier on 2021-01-10 00:22:26 Original: https://sourceforge.net/p/maxima/bugs/3663/#324d


I've asked for help from SBCL. For reference: https://sourceforge.net/p/sbcl/mailman/message/37194294/

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-08 10:21:49 Created by sikkenogetvrovl on 2021-02-22 19:44:12 Original: https://sourceforge.net/p/maxima/bugs/3663/#7152


Unfortunately, there is some time gab until the next version I have stored - with this one the above bug is present (= it dosen't work):

wxMaxima version: 19.04.1-DevelopmentSnapshot using wxWidgets version: wxWidgets 3.1.0 Maxima version: branch_5_44_base_42_ga518fbd55 Maxima build date: 2020-08-03 00:05:51 Host type: x86_64-w64-mingw32 System type: Win32 6.2.9200 X86-64 Lisp implementation type: SBCL Lisp implementation version: 2.0.0 wxMaxima's idea of the directory layout is: User configuration dir: C:\Users\xxxx/maxima/ Help dir: C:\maxima-current\wxMaxima

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-08 10:21:53 Created by l_butler on 2021-02-24 12:32:08 Original: https://sourceforge.net/p/maxima/bugs/3663/#7152/d476


Rene, it looks to me like the issue is related to the change in the version of SBCL. Can you execute the following in each version that you have:

:lisp (/ (sb-ext:dynamic-space-size) (expt 2 30))

Please report back.

This will tell us how much memory is being allocated in each version.

Leo

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-08 10:21:56 Created by sikkenogetvrovl on 2021-02-26 13:32:33 Original: https://sourceforge.net/p/maxima/bugs/3663/#7152/d476/0dd7


I am running win10 64bit

(%i1) build_info(); (%o1) build_info(version="branch_5_44_base_276_gb168ff881",timestamp="2021-02-23 23:54:35",host="x86_64-w64-mingw32",lisp_name="SBCL",lisp_version="2.0.0", maxima_userdir="C:/Users/U265227/maxima",maxima_tempdir="C:/Users/xxxx/AppData/Local/Temp",maxima_objdir= "C:/Users/xxxxx/maxima/binary/branch_5_44_base_276_gb168ff881/sbcl/2_0_0",maxima_frontend="wxMaxima",maxima_frontend_version="21.01.0-DevelopmentSnapshot_MSW")

(%i1) :lisp (/ (sb-ext:dynamic-space-size) (expt 2 30)) 125/64


(%i5) wxbuild_info()$ wxMaxima version: 19.04.1-DevelopmentSnapshot using wxWidgets version: wxWidgets 3.1.0 Maxima version: branch_5_42_base_530_g996294ac0 Maxima build date: 2019-04-03 23:46:39 Host type: x86_64-w64-mingw32 System type: Win32 10.0.18363 X86-64 Lisp implementation type: SBCL Lisp implementation version: 1.4.14 wxMaxima's idea of the directory layout is: User configuration dir: C:/Users/xxxx/maxima/ Help dir: C:\maxima-current\wxMaxima/help

(%i5) :lisp (/ (sb-ext:dynamic-space-size) (expt 2 30)) 125/64


Does it make sense ?

Den ons. 24. feb. 2021 kl. 13.32 skrev Leo Butler < l_butler@users.sourceforge.net>:

Rene, it looks to me like the issue is related to the change in the version of SBCL. Can you execute the following in each version that you have:

:lisp (/ (sb-ext:dynamic-space-size) (expt 2 30))

Please report back.

This will tell us how much memory is being allocated in each version.

Leo

Status: open Group: None Labels: binding-stack-exhausted share packages interpol Created: Wed Oct 21, 2020 07:46 AM UTC by Rene Hansen Last Updated: Mon Feb 22, 2021 07:44 PM UTC Owner: nobody

When running the function below on a number of data-files (optical spectra). Maxima replies with

Binding stack guard page temporarily disabled: proceed with caution Maxima encountered a Lisp error:Binding stack exhausted.

Does this make sense to you ?

--> for GasNumb : 1 thru NumberOfDatafiles do ( kill(SplinesFit, h), print(concat(GasNumb, " of ", NumberOfDatafiles, " : ", DataFile[GasNumb])), LinInterpol : linearinterpol(Data[GasNumb]), SplineSFit(x) := ev(LinInterpol, nouns), h[x, y] := if y = 2 then SplineSFit(ActualSpectrometer[x, 1]) else ActualSpectrometer[x, 1], RefittedData[GasNumb] : genmatrix(h, length(ActualSpectrometer), 2) )$"1 of 79 : 20200129-194053-Sensor_2004-001-1176-absorbance.csv"" ""2 of 79 : 20200129-201152-Sensor_2004-001-1176-absorbance.csv"" ""3 of 79 : 20200129-201253-Sensor_2004-001-1176-absorbance.csv"" ""4 of 79 : 20200129-201352-Sensor_2004-001-1176-absorbance.csv"" ""5 of 79 : 20200129-201452-Sensor_2004-001-1176-absorbance.csv"" ""6 of 79 : 20200129-201553-Sensor_2004-001-1176-absorbance.csv"" ""7 of 79 : 20200129-205426-Sensor_2004-001-1178-absorbance.csv"" ""8 of 79 : 20200129-205527-Sensor_2004-001-1178-absorbance.csv"" ""9 of 79 : 20200129-205627-Sensor_2004-001-1178-absorbance.csv"" ""10 of 79 : 20200129-205726-Sensor_2004-001-1178-absorbance.csv"" ""11 of 79 : 20200129-205827-Sensor_2004-001-1178-absorbance.csv"" ""12 of 79 : 20200129-220037-Sensor_2004-001-1177-absorbance.csv"" " Binding stack guard page temporarily disabled: proceed with cautionMaxima encountered a Lisp error: Binding stack exhausted.PROCEED WITH CAUTION.Automatically continuing.To enable the Lisp debugger set debugger-hook to nil.


Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/maxima/bugs/3663/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

Attachments: