Initial analysis of Fricas 1.3.11 CAS integration tests

25 views
Skip to first unread message

Nasser M. Abbasi

unread,
Jul 3, 2024, 6:57:45 AMJul 3
to FriCAS - computer algebra system
FYI,
Just finished running the independent CAS integration tests using 1.3.11. This has  106812 integrals in total.

I've put plain text file of the initial notes here in case this below gets reformatted.

Here are the content of the above also. Basically Fricas 1.3.11 passed   82,445    and 1.3.10 had passed  82,473. But looking more, I found 18 new exceptions which did not happen before.

These all seem to be same, but I only had time to try two of them. Running the integrals in Fricas 1.3.11 they work. But in sagemath it gives

Heap exhausted during allocation: 4128768 bytes available, 8305312 requested. 

Not sure why now this happens, as I am using same sage  10.3 on same PC I used in testing Fricas 1.3.10.   And why they work inside 1.3.11 but not in sagemath now.

It could be Fricas 1.3.11 runs with more RAM now  than 1.3.10.

I will also post this to sagemath group and see what they say. 

--------------------------------------- NOTES----------------------------------------

Notes on Fricas 1.3.11 integration testing
=========================================== >which fricas /usr/local/bin/fricas >fricas --version FriCAS 1.3.11 based on sbcl 2.4.5 >which sage /home/me/TMP/sage-10.3/sage >sage --version SageMath version 10.3, Release Date: 2024-03-19 >uname -a Linux me-virtualbox 6.6.32-1-MANJARO #1 SMP PREEMPT_DYNAMIC Mon May 27 03:41:25 UTC 2024 x86_64 GNU/Linux lsb_release -a LSB Version: n/a Distributor ID: ManjaroLinux Description: Manjaro Linux Release: 24.0.2 Codename: Wynsdey grep MemTotal /proc/meminfo MemTotal: 50189304 kB Note 1: File 355 has 18 failed integrals due to "There are no library operations named exp_integral_e " Data 1.3.11 information about Fricase ------------------------------------- >sqlite3 cas_integration_tests.db #total number of integrals sqlite> select count(*) from main; 106812 #number all failed by Fricas 1.3.11 sqlite> select count(*) from main where fricas_pass=0 or fricas_pass=-1 or fricas_pass=-2; 24367 #number normal failed by Fricas 1.3.11 sqlite> select count(*) from main where fricas_pass=0; 17516 #number timedout failed by Fricas 1.3.11 sqlite> select count(*) from main where fricas_pass=-1; 4498 #number exceptions failed by Fricas 1.3.11 sqlite> select count(*) from main where fricas_pass=-2; 2353 #number passed by Fricas 1.3.11 sqlite> select count(*) from main where fricas_pass=1; 82445 Regression: This is list of problem numbers which generated Exception in 1.3.11 not in 1.3.10 (these are -2 code). ============================================================ 105424 105425 105431 105432 105508 105509 105725 105726 105803 105804 105976 105977 106138 106139 Here are the above integral commands to try sqlite> select command_in_fricas from main where rowid=105424; integrate((x^4-1)*(1+(1+x)^(1/2))^(1/2)/(x^4+1),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105425; integrate((x^4-1)*(1+(1+x)^(1/2))^(1/2)/(x^4+1),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105431; integrate((x^4-1)*(1+(1+x)^(1/2))^(1/2)/(1+x)^(1/2)/(x^4+1),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105432; integrate((x^4-1)*(1+(1+x)^(1/2))^(1/2)/(1+x)^(1/2)/(x^4+1),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105508; integrate((x^2-1)/(1+x)^(1/2)/(x^2+1)/(1+(1+x)^(1/2))^(1/2)/(1+(1+(1+x)^(1/2))^(1/2))^(1/2),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105509; integrate((x^2-1)/(1+x)^(1/2)/(x^2+1)/(1+(1+x)^(1/2))^(1/2)/(1+(1+(1+x)^(1/2))^(1/2))^(1/2),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105725; integrate((1+x)^(1/2)*(x^4-1)*(1+(1+x)^(1/2))^(1/2)/(x^4+1),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105726; integrate((1+x)^(1/2)*(x^4-1)*(1+(1+x)^(1/2))^(1/2)/(x^4+1),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105803; integrate((x^2-1)/(1+x)^(1/2)/(x^2+1)/(1+(1+(1+x)^(1/2))^(1/2))^(1/2),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105804; integrate((x^2-1)/(1+x)^(1/2)/(x^2+1)/(1+(1+(1+x)^(1/2))^(1/2))^(1/2),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105976; integrate((x^2-1)/(x^2+1)/(1+(1+x)^(1/2))^(1/2)/(1+(1+(1+x)^(1/2))^(1/2))^(1/2),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=105977; integrate((x^2-1)/(x^2+1)/(1+(1+x)^(1/2))^(1/2)/(1+(1+(1+x)^(1/2))^(1/2))^(1/2),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=106138; integrate((x^2-1)/(x^2+1)/(1+(1+(1+x)^(1/2))^(1/2))^(1/2),x, algorithm="fricas") sqlite> select command_in_fricas from main where rowid=106139; integrate((x^2-1)/(x^2+1)/(1+(1+(1+x)^(1/2))^(1/2))^(1/2),x, algorithm="fricas") sqlite> Now let me try few of the above and see what is going on -------------------------------------------------------------------- This one works OK in Fricas 1.3.11 but gives exception in sagemath 10.3 integrate((x^4-1)*(1+(1+x)^(1/2))^(1/2)/(x^4+1),x, algorithm="fricas") >sage │ SageMath version 10.3, Release Date: 2024-03-19 │ │ Using Python 3.11.1. Type "help()" for help. │ sage: var('x a b c d') (x, a, b, c, d) sage: integrate((x^4-1)*(1+(1+x)^(1/2))^(1/2)/(x^4+1),x, algorithm="fricas") --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) Cell In[2], line 1 ----> 1 integrate((x**Integer(4)-Integer(1))*(Integer(1)+(Integer(1)+x)**(Integer(1)/Integer(2)))**(Integer(1)/Integer(2))/(x**Integer(4)+Integer(1)),x, algorithm="fricas") File ~/TMP/sage-10.3/src/sage/misc/functional.py:788, in integral(x, *args, **kwds) 655 """ 656 Return an indefinite or definite integral of an object ``x``. 657 (...) 785 786 """ 787 if hasattr(x, 'integral'): --> 788 return x.integral(*args, **kwds) 789 else: 790 from sage.symbolic.ring import SR File ~/TMP/sage-10.3/src/sage/symbolic/expression.pyx:13268, in sage.symbolic.expression.Expression.integral() 13266 R = SR 13267 return R(integral(f, v, a, b, **kwds)) > 13268 return integral(self, *args, **kwds) 13269 13270 integrate = integral File ~/TMP/sage-10.3/src/sage/symbolic/integration/integral.py:1062, in integrate(expression, v, a, b, algorithm, hold) 1060 if not integrator: 1061 raise ValueError("Unknown algorithm: %s" % algorithm) -> 1062 return integrator(expression, v, a, b) 1063 if a is None: 1064 return indefinite_integral(expression, v, hold=hold) File ~/TMP/sage-10.3/src/sage/symbolic/integration/external.py:207, in fricas_integrator(expression, v, a, b, noPole) 204 else: 205 result = e_fricas.integrate(seg) --> 207 result = result.sage() 209 if result == "failed": 210 result = expression.integrate(v, a, b, hold=True) File ~/TMP/sage-10.3/src/sage/interfaces/interface.py:1123, in InterfaceElement.sage(self, *args, **kwds) 1104 def sage(self, *args, **kwds): 1105 """ 1106 Attempt to return a Sage version of this object. 1107 (...) 1121 [0 0] 1122 """ -> 1123 return self._sage_(*args, **kwds) File ~/TMP/sage-10.3/src/sage/interfaces/fricas.py:2067, in FriCASElement._sage_(self) 2062 return FriCASElement._sage_expression(P.get_InputForm(self._name)) 2064 if head == "Expression" or head == "Pi": 2065 # we treat Expression Integer and Expression Complex 2066 # Integer just the same -> 2067 return FriCASElement._sage_expression(P.get_InputForm(self._name)) 2069 raise NotImplementedError("the translation of the FriCAS object %s to sage is not yet implemented" % (unparsed_InputForm())) File ~/TMP/sage-10.3/src/sage/interfaces/fricas.py:817, in FriCAS.get_InputForm(self, var) 807 def get_InputForm(self, var): 808 """ 809 Return the ``InputForm`` as a string. 810 (...) 815 816 """ --> 817 return self.get_string('sageprint((%s)::InputForm)' % str(var)) File ~/TMP/sage-10.3/src/sage/interfaces/fricas.py:755, in FriCAS.get_string(self, var) 710 """ 711 Return the value of a FriCAS string as a string, without checking 712 that it is a string. (...) 750 751 """ 752 # strip removes leading and trailing whitespace, after that 753 # we can assume that the first and the last character are 754 # double quotes --> 755 return self.get(str(var)).replace("\n", "").strip()[1:-1] File ~/TMP/sage-10.3/src/sage/interfaces/fricas.py:707, in FriCAS.get(self, var) 704 else: 705 return "\n".join(line[FRICAS_MULTI_LINE_START:] for line in lines) --> 707 self._check_errors(var, output) File ~/TMP/sage-10.3/src/sage/interfaces/fricas.py:566, in FriCAS._check_errors(self, line, output) 564 for old, new in replacements: 565 output = output.replace(old, new) --> 566 raise RuntimeError("An error occurred when FriCAS evaluated '%s':\n%s" % (line, output)) 568 # or even an error 569 if FRICAS_ERROR_IN_LIBRARY_CODE in output: RuntimeError: An error occurred when FriCAS evaluated 'sageprint((sage2)::InputForm)': Compiling function sageprint with type InputForm -> String Heap exhausted during allocation: 4128768 bytes available, 8305312 requested. Immobile Object Counts Gen layout fdefn symbol code Boxed Cons Raw Code SmMix Mixed LgRaw LgCode LgMix Waste% Alloc Trig Dirty GCs Mem-age 0 0 0 0 0 0 1065 40 0 0 1974 694 0 1573 4.8 166688416 56166286 - 1 0.0000 1 0 0 0 0 0 26 56 0 0 25 6061 0 0 0.9 200203744 32212254 6118 0 0.6334 2 0 0 0 0 0 22 61 0 0 26 29327 0 0 0.2 962463824 382674606 29389 1 0.3641 3 0 4468 0 4682 53 1475 140 1 14 53 54172 0 12 0.2 1829379008 2000000 54313 0 0.7255 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0 0 2000000 0 0 0.0000 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0 0 2000000 0 0 0.0000 6 780 25772 24483 26727 277 163 69 5 38 18 0 0 21 3.2 18752384 2000000 11 0 0.0000 Tot 780 30240 24483 31409 330 2751 366 6 52 2096 90254 0 1606 0.5 3177487376 [98.6% of 3221225472 max] GC control variables: *GC-INHIBIT* = false *GC-PENDING* = false *STOP-FOR-GC-PENDING* = false Collection trigger variables: dynamic_space_size = 3221225472 bytes_allocated = 3177487376 auto_gc_trigger = 3195814265 bytes_consed_between_gcs = 161061273 >> System error: Heap exhausted (no more space for allocation). 4128768 bytes available, 8305312 requested. PROCEED WITH CAUTION. ------------------------------------------------------ This one also works OK in Fricas 1.3.11 but gives exception in sagemath 10.3 same as above integrate((x^2-1)/(x^2+1)/(1+(1+x)^(1/2))^(1/2)/(1+(1+(1+x)^(1/2))^(1/2))^(1/2),x, algorithm="fricas") >sage SageMath version 10.3, Release Date: 2024-03-19 │ Using Python 3.11.1. Type "help()" for help. │ sage: var('x a b c d') (x, a, b, c, d) sage: integrate((x^2-1)/(x^2+1)/(1+(1+x)^(1/2))^(1/2)/(1+(1+(1+x)^(1/2))^(1/2))^(1/2),x, algorithm="fricas") --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) Cell In[2], line 1 ----> 1 integrate((x**Integer(2)-Integer(1))/(x**Integer(2)+Integer(1))/(Integer(1)+(Integer(1)+x)**(Integer(1)/Integer(2)))**(Integer(1)/Integer(2))/(Integer(1)+(Integer(1)+(Integer(1)+x)**(Integer(1)/Integer(2)))**(Integer(1)/Integer(2)))**(Integer(1)/Integer(2)),x, algorithm="fricas") File ~/TMP/sage-10.3/src/sage/misc/functional.py:788, in integral(x, *args, **kwds) 655 """ 656 Return an indefinite or definite integral of an object ``x``. 657 (...) 785 786 """ 787 if hasattr(x, 'integral'): --> 788 return x.integral(*args, **kwds) 789 else: 790 from sage.symbolic.ring import SR File ~/TMP/sage-10.3/src/sage/symbolic/expression.pyx:13268, in sage.symbolic.expression.Expression.integral() 13266 R = SR 13267 return R(integral(f, v, a, b, **kwds)) > 13268 return integral(self, *args, **kwds) 13269 13270 integrate = integral File ~/TMP/sage-10.3/src/sage/symbolic/integration/integral.py:1062, in integrate(expression, v, a, b, algorithm, hold) 1060 if not integrator: 1061 raise ValueError("Unknown algorithm: %s" % algorithm) -> 1062 return integrator(expression, v, a, b) 1063 if a is None: 1064 return indefinite_integral(expression, v, hold=hold) File ~/TMP/sage-10.3/src/sage/symbolic/integration/external.py:207, in fricas_integrator(expression, v, a, b, noPole) 204 else: 205 result = e_fricas.integrate(seg) --> 207 result = result.sage() 209 if result == "failed": 210 result = expression.integrate(v, a, b, hold=True) File ~/TMP/sage-10.3/src/sage/interfaces/interface.py:1123, in InterfaceElement.sage(self, *args, **kwds) 1104 def sage(self, *args, **kwds): 1105 """ 1106 Attempt to return a Sage version of this object. 1107 (...) 1121 [0 0] 1122 """ -> 1123 return self._sage_(*args, **kwds) File ~/TMP/sage-10.3/src/sage/interfaces/fricas.py:2067, in FriCASElement._sage_(self) 2062 return FriCASElement._sage_expression(P.get_InputForm(self._name)) 2064 if head == "Expression" or head == "Pi": 2065 # we treat Expression Integer and Expression Complex 2066 # Integer just the same -> 2067 return FriCASElement._sage_expression(P.get_InputForm(self._name)) 2069 raise NotImplementedError("the translation of the FriCAS object %s to sage is not yet implemented" % (unparsed_InputForm())) File ~/TMP/sage-10.3/src/sage/interfaces/fricas.py:817, in FriCAS.get_InputForm(self, var) 807 def get_InputForm(self, var): 808 """ 809 Return the ``InputForm`` as a string. 810 (...) 815 816 """ --> 817 return self.get_string('sageprint((%s)::InputForm)' % str(var)) File ~/TMP/sage-10.3/src/sage/interfaces/fricas.py:755, in FriCAS.get_string(self, var) 710 """ 711 Return the value of a FriCAS string as a string, without checking 712 that it is a string. (...) 750 751 """ 752 # strip removes leading and trailing whitespace, after that 753 # we can assume that the first and the last character are 754 # double quotes --> 755 return self.get(str(var)).replace("\n", "").strip()[1:-1] File ~/TMP/sage-10.3/src/sage/interfaces/fricas.py:707, in FriCAS.get(self, var) 704 else: 705 return "\n".join(line[FRICAS_MULTI_LINE_START:] for line in lines) --> 707 self._check_errors(var, output) File ~/TMP/sage-10.3/src/sage/interfaces/fricas.py:566, in FriCAS._check_errors(self, line, output) 564 for old, new in replacements: 565 output = output.replace(old, new) --> 566 raise RuntimeError("An error occurred when FriCAS evaluated '%s':\n%s" % (line, output)) 568 # or even an error 569 if FRICAS_ERROR_IN_LIBRARY_CODE in output: RuntimeError: An error occurred when FriCAS evaluated 'sageprint((sage2)::InputForm)': Compiling function sageprint with type InputForm -> String Heap exhausted during allocation: 129597440 bytes available, 132910384 requested. Immobile Object Counts Gen layout fdefn symbol code Boxed Cons Raw Code SmMix Mixed LgRaw LgCode LgMix Waste% Alloc Trig Dirty GCs Mem-age 0 0 0 0 0 0 4 19 0 0 3 3693 0 8114 0.2 387137408 153529214 - 1 0.0000 1 0 0 0 0 0 8 37 0 0 9 1629 0 0 1.0 54596416 32212254 1667 0 0.0000 2 0 0 0 0 0 7 1 0 0 3 9637 0 0 0.1 315796080 348008334 9639 1 0.0000 3 0 4468 0 4682 53 1706 110 1 14 12 44293 0 12 0.1 1512494112 695462510 44404 1 0.4385 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0 0 2000000 0 0 0.0000 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0 0 2000000 0 0 0.0000 6 780 25772 24483 26727 277 163 69 5 38 18 0 0 21 3.2 18752384 2000000 11 0 0.0000 Tot 780 30240 24483 31409 330 1888 236 6 52 45 59252 0 8147 0.2 2288776400 [71.1% of 3221225472 max] GC control variables: *GC-INHIBIT* = false *GC-PENDING* = true *STOP-FOR-GC-PENDING* = false Collection trigger variables: dynamic_space_size = 3221225472 bytes_allocated = 2288776400 auto_gc_trigger = 2184017225 bytes_consed_between_gcs = 161061273 >> System error: Heap exhausted (no more space for allocation). 129597440 bytes available, 132910384 requested. PROCEED WITH CAUTION. I have not tried all the rest. They all look like same problem. To compare, this is database of 1.3.10 testing ================================================ #total number of integrals sqlite> select count(*) from main; 106812 #total failed number of integrals sqlite> select count(*) from main where fricas_pass=0 or fricas_pass=-1 or fricas_pass=-2; 24339 #total normal failed sqlite> select count(*) from main where fricas_pass=0; 17523 #number failed due to timeout sqlite> select count(*) from main where fricas_pass=-1; 4478 #number failed due to exception sqlite> select count(*) from main where fricas_pass=-2; 2338 #number passed sqlite> select count(*) from main where fricas_pass=1; 82473

Nasser M. Abbasi

unread,
Jul 3, 2024, 7:01:44 AMJul 3
to FriCAS - computer algebra system
Will try to post the notes below again, I see they got reformatted and hard to read. May be this will work better this time. 



Notes on Fricas 1.3.11 integration testing
July 3, 2024.
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.3, Release Date: 2024-03-19 │
│ Using Python 3.11.1. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
│ SageMath version 10.3, Release Date: 2024-03-19 │
│ Using Python 3.11.1. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘

Dima Pasechnik

unread,
Jul 3, 2024, 7:41:04 AMJul 3
to fricas...@googlegroups.com
On Wed, Jul 3, 2024 at 11:57 AM 'Nasser M. Abbasi' via FriCAS -
computer algebra system <fricas...@googlegroups.com> wrote:
>
> FYI,
> Just finished running the independent CAS integration tests using 1.3.11. This has 106812 integrals in total.
>
> I've put plain text file of the initial notes here in case this below gets reformatted.
>
> Here are the content of the above also. Basically Fricas 1.3.11 passed 82,445 and 1.3.10 had passed 82,473. But looking more, I found 18 new exceptions which did not happen before.
>
> These all seem to be same, but I only had time to try two of them. Running the integrals in Fricas 1.3.11 they work. But in sagemath it gives
>
> Heap exhausted during allocation: 4128768 bytes available, 8305312 requested.

By the way,
https://github.com/sagemath/sage/pull/37041
allows the use of system-wide sbcl to build FriCAS in Sage.
You have it in the latest Sage rc versions.



>
> Not sure why now this happens, as I am using same sage 10.3 on same PC I used in testing Fricas 1.3.10. And why they work inside 1.3.11 but not in sagemath now.

Do you use system-wide fricas installations?

Dima
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/18e4a762-26ca-401e-9564-5e3cfe0ab4fdn%40googlegroups.com.

Nasser M. Abbasi

unread,
Jul 3, 2024, 7:53:20 AMJul 3
to FriCAS - computer algebra system
"Do you use system-wide fricas installations?"

I am not sure what do you mean by this. I  build and installed Fricas using instructions give and
it gets installed to 

which fricas
/usr/local/bin/fricas

Downloaded the Fricas zip file and did

         ./configure && make && sudo make install

This is all on Linux Virtual Box, Same one I run Fricas 1.3.10 on. So the above command will overwrite 1.3.10 and
replace it with 1.3.11. 

I will try sagemath 10.4 when it is out. I do not know how to use github and things like this.

I download sagemath zip file and build it as I always do using

  ./configure  
   make 

Then point it to use the external build Fricas. This is because sagemath does not come with latest Fricas.

Regards
--Nasser

Dima Pasechnik

unread,
Jul 3, 2024, 8:07:44 AMJul 3
to fricas...@googlegroups.com
On Wed, Jul 3, 2024 at 12:53 PM 'Nasser M. Abbasi' via FriCAS -
computer algebra system <fricas...@googlegroups.com> wrote:
>
> "Do you use system-wide fricas installations?"
>
> I am not sure what do you mean by this.

Sage can build a copy of FriCAS for you. Otherwise, it would try to
use the external (system-wide, or otherwise found in PATH)


> I build and installed Fricas using instructions give and
> it gets installed to
>
> which fricas
> /usr/local/bin/fricas
>
> Downloaded the Fricas zip file and did
>
> ./configure && make && sudo make install
>
> This is all on Linux Virtual Box, Same one I run Fricas 1.3.10 on. So the above command will overwrite 1.3.10 and
> replace it with 1.3.11.
>
> I will try sagemath 10.4 when it is out. I do not know how to use github and things like this.

github is a website, too. I presume you know how use there :-)
The link I provided does not imply you need to "use" github in any other way.

>
> I download sagemath zip file and build it as I always do using
>
> ./configure
> make
>
> Then point it to use the external build Fricas. This is because sagemath does not come with latest Fricas.

I don't know what you mean by " point it to use the external build Fricas".
Normally speaking you should be building Sage starting from

./configure --enable-fricas
(and then, make)

After ./configure finishes running you can see in its output (or in config.log)
whether it will use a system-wide FriCAS, or build its own copy.

Dima
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/db3c7bc1-bc8d-461f-b056-4b9e36ae48e9n%40googlegroups.com.

Nasser M. Abbasi

unread,
Jul 3, 2024, 8:22:36 AMJul 3
to FriCAS - computer algebra system
But if I do 

./configure --enable-fricas

Is it going to build Fricas 1.3.11 ??

Sagemath does not always come with latest external software I need to call. So 
I build these myself outside of sage, then point sage to use these. For example,
I just downloaded giac 1.9.0.993 which I plan to use from sage,. This was released a week ago. If I use
sage with with the giac is comes with it will be much older version. Right?

Same with Maxima. We talked about this before. 

So I build these outside of sage and then make sage use them. I change symlinks
and now sage uses them instead. I've been doing this for years.

sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.3, Release Date: 2024-03-19                    │
│ Using Python 3.11.1. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: print(giac.version())
"giac 1.9.0-99, (c) B. Parisse and R. De Graeve, Institut Fourier, Universite Grenoble Alpes. Optimization, signalprocessing, graph theory (c) Luka Marohnić"
sage: print(fricas.eval(")lisp |$build_version|"))

Value = "FriCAS 1.3.11"

For the problem at hand, it seems sagemath is configured to use less RAM that what Fricas was compiled to use.
This is why these integrals work with Fricas directly but not when using sagemath to call Fricas.

Will try again with sagemath 10.4 is officially out. 

--Nasser

Dima Pasechnik

unread,
Jul 3, 2024, 8:37:24 AMJul 3
to fricas...@googlegroups.com
On Wed, Jul 3, 2024 at 1:22 PM 'Nasser M. Abbasi' via FriCAS -
computer algebra system <fricas...@googlegroups.com> wrote:
>
> But if I do
>
> ./configure --enable-fricas
>
> Is it going to build Fricas 1.3.11 ??

No, it will test whether you have FriCAS in your PATH, and use it
instead if found.
It could be 1.3.11, no problem. The minimal acceptable version is
currently set to 1.3.8,
perhaps we should bump it to more recent one.

>
> Sagemath does not always come with latest external software I need to call. So
> I build these myself outside of sage, then point sage to use these. For example,
> I just downloaded giac 1.9.0.993 which I plan to use from sage,. This was released a week ago. If I use
> sage with with the giac is comes with it will be much older version. Right?

No, not really.
Sage will test for an external version of giac (and libgiac, with headers).
If found, it will use it, and not build its own.
For all this to work, you'd need to install giac in, say, /usr/local

It's important that you have the giac library properly installed
there, otherwise it will be rejected,
and a copy of giac built by Sage. In this case, even if you symlink
Sage's giac executable to somewhere,
the giac library will still be the one build by Sage.

>
> Same with Maxima. We talked about this before.
It's similar with Maxima. Most of Sage's use of Maxima is done via
ECL, and its embedded
library (ASDF).

Again, a properly built with external ECL and installed Maxima will be
detected by Sage's ./configure,
so nothing won't need to be built.

Even if you symlink Sage's maxima executable, it will still use
whatever its ECL
finds.


>
> So I build these outside of sage and then make sage use them. I change symlinks
> and now sage uses them instead. I've been doing this for years.
>
> sage
> ┌────────────────────────────────────────────────────────────────────┐
> │ SageMath version 10.3, Release Date: 2024-03-19 │
> │ Using Python 3.11.1. Type "help()" for help. │
> └────────────────────────────────────────────────────────────────────┘
> sage: print(giac.version())
> "giac 1.9.0-99, (c) B. Parisse and R. De Graeve, Institut Fourier, Universite Grenoble Alpes. Optimization, signalprocessing, graph theory (c) Luka Marohnić"
> sage: print(fricas.eval(")lisp |$build_version|"))
>
> Value = "FriCAS 1.3.11"
>
> For the problem at hand, it seems sagemath is configured to use less RAM that what Fricas was compiled to use.
> This is why these integrals work with Fricas directly but not when using sagemath to call Fricas.

The amount of RAM used by Sage has very little bearing to the amount
of RAM used by FriCAS, as they
interact as independent processes.

Dima
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/e23e660c-d187-4997-b853-f09c28cf0fe2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages