Menu

#151 encounter `Heap cannot be extended` problem with Reduce PSL on macOS 12.6 when use `taylor()`

None
pending
Mac ARM (1)
5
2023-02-22
2023-02-21
Qubicand
No

OS Info: macOS 12.6
Reduce Info: Reduce (Free PSL version, revision 6339)
Problem Description: when I start Reduce PSL via redpsl and input taylor(e^(x^2+y^2),x,0,2,y,0,2);, I receive error message like

$ redpsl
Loading image file: /Users/he/.Trash/psl/red/reduce.img
Reduce (Free PSL version, revision 6339), 16-Jun-2022 ...

1: taylor(e^(x^2+y^2),x,0,2,y,0,2);

*****
Sorry, but at present the Heap cannot be extended. Please start Reduce again with a larger heap (-td parameter) and rerun.


***** module tayintro of package taylor cannot be loaded

However, if I switch into Reduce CSL (also command line version), this problem won't happen

$ redcsl -w
Reduce (CSL, rev 6339), 16-Jun-2022 ...

1: taylor(e^(x^2+y^2),x,0,2,y,0,2);

     2    2    2  2      3  3
1 + y  + x  + y *x  + O(x ,y )

However, the basic operation such as polynomial calculation seems won't be affected

$ redpsl
Loading image file: /Applications/Reduce/psl/red/reduce.img
Reduce (Free PSL version, revision 6339), 16-Jun-2022 ...

1: (x+y+z)^2;

 2                    2            2
x  + 2*x*y + 2*x*z + y  + 2*y*z + z

Discussion

  • Qubicand

    Qubicand - 2023-02-22

    In addition, today I test the process on other peoplo's MacBook (with both are Intel-version) , their system version include both Mojova, 12.+ and 13.+, which both can execute taylor() without above "heap problem" . Therefore I suspect the problem is reduced by ARM Apple Silicon, but this accumption need a further test in more computers.

     
  • Rainer Schöpf

    Rainer Schöpf - 2023-02-22

    Hello,

    I'm a bit confused. Are you saying that the failure occurs on a Mac with ARM processor, but not on Intel Macs?
    I need a bit more information:
    1. Are you running on an Intel or ARM Mac? Please run the shell command uname -a and report the output.
    3. Can you also please run the following command in Reduce: lisp meminfo(); and report the output.

    Rainer

     
    • Qubicand

      Qubicand - 2023-02-22

      Yes, it seems the failure (probably only) occurs on Mac with ARM processor. My computer is ARM processor, which will meet "larger heap" problem; and I also asked my friend to test the same command in his ARM processor, and obtain the same failure with the same error messages. However, if I test the command on Intel-based processor MacBook, in this case no any problem happen.

      The following shows the result of commands uname -a and lisp meminfo(); in my computer

      • uname -a
      $ uname -a
      Darwin SuperclusterAir.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64
      
      • run lisp meminfo(); in redpsl
      $ redpsl
      Loading image file: /Users/he/Desktop/psl/red/reduce.img
      Reduce (Free PSL version, revision 6339), 16-Jun-2022 ...
      
      1: lisp meminfo();
      ***** Binding stack overflow, restarting...
      

      then the program seems no response anymore

      • run lisp meminfo(); in redcsl
      $ redcsl -w
      Reduce (CSL, rev 6339), 16-Jun-2022 ...
      
      1: lisp meminfo();
      address range: 64 bit
      

      it seems no problem raising when I use redcsl

       

      Last edit: Qubicand 2023-02-22
  • Rainer Schöpf

    Rainer Schöpf - 2023-02-22
    • labels: --> Mac ARM
    • status: open --> pending
    • assigned_to: Rainer Schöpf
    • Group: -->
     
  • Rainer Schöpf

    Rainer Schöpf - 2023-02-22

    Hello,

    there is no native PSL version for Macs with an ARM processor. Are you running the x86_64 version with Rosetta?

    For the ARM Macs Apple tightened the security model. The effect is that you cannot load compiled code after starting PSL Reduce - which what you see here.

    To make it work requires a thorough revision of the PSL code base - a lot of work for me and difficult because I do not own a Mac.

    Summary: PSL Reduce doesn't work on ARM Macs.

    Rainer

     
    • Qubicand

      Qubicand - 2023-02-22

      Thank you for your advice! Just now I tried to run redpsl in terminal (exactly, I use iTerm as my terminal) when turn Open using Rosseta option (follow the steps from Run everything in Rosetta 2 on Silicon Mac), but the problem still exist. In detail, I've tried the following processes with switching on Open using Rosseta option for iTerm.app

      # with "Open using Rosseta" turn on
      
      $ uname -a
      Darwin SuperclusterAir.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 x86_64
      
      $ arch
      i386
      
      $ edpsl
      Loading image file: /Users/he/Desktop/psl/red/reduce.img
      Reduce (Free PSL version, revision 6339), 16-Jun-2022 ...
      
      1: taylor(e^(x^2+y^2),x,0,2,y,0,2);
      
      *****
      Sorry, but at present the Heap cannot be extended. Please start Reduce again with a larger heap (-td parameter) and rerun.
      
      
      ***** module tayintro of package taylor cannot be loaded
      

      In my opinion (but this claim probably no necessarily correct), the return from command arch shows the terminal is running under an analog x86 architecture, but it still can't help to reproduce redpsl's behavior at an actual Intel-based Mac. For comparing, I also show the result for the same process when I turn off option Open using Rosseta

      # with "Open using Rosseta" turn off
      
      $ uname -a
      Darwin SuperclusterAir.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64
      
      $ arch
      arm64
      
      $ redpsl
      Loading image file: /Users/he/Desktop/psl/red/reduce.img
      Reduce (Free PSL version, revision 6339), 16-Jun-2022 ...
      
      1: taylor(e^(x^2+y^2),x,0,2,y,0,2);
      
      *****
      Sorry, but at present the Heap cannot be extended. Please start Reduce again with a larger heap (-td parameter) and rerun.
      
      
      ***** module tayintro of package taylor cannot be loaded
      

      All in all, it seems run terminal with Rosetta can't help to run Reduce PSL version on ARM-based Mac.

      Anyway, vary thanks for your patient reply! Although right now the problem is still not solved, it's vary helpful for me to figure out how this is arose.

       

Log in to post a comment.

MongoDB Logo MongoDB