You might remember that around the time when distributions switched to
sbcl 1.3.x, there were several reports of problems with not enough stack
space.
I now wanted to look closer into that problem. Since my suspicion was
that sbcl was to blame, I now translated fricas with sbcl 1.3.15 and 1.2.4.
The attached script computes a Groebner basis in about 2000 seconds and
gives 8536 polynomials when I execute it with FriCAS r2317
(git-sha1 841b9fa0329d15f92071f62fa334749b4d6f01ef) running on top of
sbcl 1.2.4.
However, with r2317 on top of sbcl 1.3.15 I get the following trace.
Ralf
======================================================================
Checking for foreign routines
AXIOM="/home/hemmecke/g/fricas-bisect/install/lib/fricas/target/x86_64-linux-gnu"
spad-lib="/home/hemmecke/g/fricas-bisect/install/lib/fricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result -2
FriCAS Computer Algebra System
Version: FriCAS 841b9fa0329d15f92071f62fa334749b4d6f01ef
Timestamp: Wed Sep 13 13:46:06 CEST 2017
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------
(1) -> )lisp (lisp-implementation-version)
Value = "1.3.15"
(1) -> )r control-stack-exhausted.input
Z ==> Integer
Type:
Void
C ==> Z
Type:
Void
N ==> NonNegativeInteger
Type:
Void
Pol ==> Polynomial Z
Type:
Void
LPol ==> List Pol
Type:
Void
n ==> 12
Type:
Void
lpol: LPol := [Y12*E12-1, Y6*E6-1, Y4*E4-1, Y3*E3-1, Y2*E2-1, Y1*E1-1,
Y2^2*Y3*Y12^3*E1^3*E4*E6^2-Y1*Y12^3*E3^3*E4+4*1,
Y2^2*Y12^4*E4^4*E6^2-Y1*Y12^3*E3^3*E4+1,
Y1^3*Y4^2*Y6*Y12^2*E2^7*E3-Y1*Y12^3*E3^3*E4-2*1,
Y2^3*Y3^3*Y12^6*E1*E4^2*E6^9-Y1*Y12^3*E3^3*E4+2*1]
(7)
[E12 Y12 - 1, E6 Y6 - 1, E4 Y4 - 1, E3 Y3 - 1, E2 Y2 - 1, E1 Y1 - 1,
3 2 3 2 3 3 4 2 4 2 3 3
E1 E4 E6 Y12 Y2 Y3 - E3 E4 Y1 Y12 + 4, E4 E6 Y12 Y2 - E3 E4 Y1 Y12
+ 1,
7 3 2 2 3 3
E2 E3 Y1 Y12 Y4 Y6 - E3 E4 Y1 Y12 - 2,
2 9 6 3 3 3 3
E1 E4 E6 Y12 Y2 Y3 - E3 E4 Y1 Y12 + 2]
Type:
List(Polynomial(Integer))
)set message time on
esyms: List Symbol := ['E1, 'E2, 'E3, 'E4, 'E6, 'E12]
(8) [E1, E2, E3, E4, E6, E12]
Type:
List(Symbol)
Time:
0 sec
ysyms: List Symbol := ['Y1, 'Y2, 'Y3, 'Y4, 'Y6, 'Y12]
(9) [Y1, Y2, Y3, Y4, Y6, Y12]
Type:
List(Symbol)
Time:
0 sec
syms: List Symbol := concat(ysyms, esyms)
(10) [Y1, Y2, Y3, Y4, Y6, Y12, E1, E2, E3, E4, E6, E12]
Type:
List(Symbol)
Time:
0 sec
dim: N := # syms
(11) 12
Type:
NonNegativeInteger
Time: 0.01 (OT) =
0.01 sec
dim1: N := # ysyms
(12) 6
Type:
NonNegativeInteger
Time:
0 sec
E := SplitHomogeneousDirectProduct(dim, dim1, N)
(13) SplitHomogeneousDirectProduct(12,6,NonNegativeInteger)
Type:
Type
Time:
0 sec
--R := PolynomialRing(C, E)
R := GeneralDistributedMultivariatePolynomial(syms, C, E)
(14)
GeneralDistributedMultivariatePolynomial([Y1,Y2,Y3,Y4,Y6,Y12,E1,E2,E3,E4,E6,E
12],Integer,SplitHomogeneousDirectProduct(12,6,NonNegativeInteger))
Type:
Type
Time:
0 sec
OV := OrderedVariableList(syms)
(15) OrderedVariableList([Y1,Y2,Y3,Y4,Y6,Y12,E1,E2,E3,E4,E6,E12])
Type:
Type
Time:
0 sec
pol2r(p: Polynomial C): R == (_
r: R := 0;
while not zero? p repeat (_
c: C := leadingCoefficient p;_
v: Vector N := vector degree(leadingMonomial p, syms);_
e: E := directProduct(v)$E;_
p := reductum p;_
r := r + monomial(c, e)$R_
);_
r)
Function declaration pol2r : Polynomial(Integer) ->
GeneralDistributedMultivariatePolynomial([Y1,Y2,Y3,Y4,Y6,Y12,E1,
E2,E3,E4,E6,E12],Integer,SplitHomogeneousDirectProduct(12,6,
NonNegativeInteger)) has been added to workspace.
Type:
Void
Time:
0 sec
rs: List R := [pol2r p for p in lpol]
Compiling function pol2r with type Polynomial(Integer) ->
GeneralDistributedMultivariatePolynomial([Y1,Y2,Y3,Y4,Y6,Y12,E1,
E2,E3,E4,E6,E12],Integer,SplitHomogeneousDirectProduct(12,6,
NonNegativeInteger))
(17)
[Y12 E12 - 1, Y6 E6 - 1, Y4 E4 - 1, Y3 E3 - 1, Y2 E2 - 1, Y1 E1 - 1,
2 3 3 2 3 3 2 4 4 2 3 3
Y2 Y3 Y12 E1 E4 E6 - Y1 Y12 E3 E4 + 4, Y2 Y12 E4 E6 - Y1 Y12 E3 E4
+ 1,
3 2 2 7 3 3
Y1 Y4 Y6 Y12 E2 E3 - Y1 Y12 E3 E4 - 2,
3 3 6 2 9 3 3
Y2 Y3 Y12 E1 E4 E6 - Y1 Y12 E3 E4 + 2]
Type:
List(GeneralDistributedMultivariatePolynomial([Y1,Y2,Y3,Y4,Y6,Y12,E1,E2,E3,E4,E6,E12],Integer,SplitHomogeneousDirectProduct(12,6,NonNegativeInteger)))
Time: 0.01 (IN) + 0.01 (EV) + 0.16 (OT) =
0.18 sec
gb: List R := groebner(rs)$GroebnerPackage(C, E, OV, R);
INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution
>> System error:
Control stack exhausted (no more space for function call frames).
This is probably due to heavily nested or infinitely recursive function
calls, or a tail call that SBCL cannot or has not optimized away.
PROCEED WITH CAUTION.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Z ==> Integer
C ==> Z
N ==> NonNegativeInteger
Pol ==> Polynomial Z
LPol ==> List Pol
n ==> 12
lpol: LPol := [Y12*E12-1, Y6*E6-1, Y4*E4-1, Y3*E3-1, Y2*E2-1, Y1*E1-1,
Y2^2*Y3*Y12^3*E1^3*E4*E6^2-Y1*Y12^3*E3^3*E4+4*1,
Y2^2*Y12^4*E4^4*E6^2-Y1*Y12^3*E3^3*E4+1,
Y1^3*Y4^2*Y6*Y12^2*E2^7*E3-Y1*Y12^3*E3^3*E4-2*1,
Y2^3*Y3^3*Y12^6*E1*E4^2*E6^9-Y1*Y12^3*E3^3*E4+2*1]
)set message time on
esyms: List Symbol := ['E1, 'E2, 'E3, 'E4, 'E6, 'E12]
ysyms: List Symbol := ['Y1, 'Y2, 'Y3, 'Y4, 'Y6, 'Y12]
syms: List Symbol := concat(ysyms, esyms)
dim: N := # syms
dim1: N := # ysyms
E := SplitHomogeneousDirectProduct(dim, dim1, N)
--R := PolynomialRing(C, E)
R := GeneralDistributedMultivariatePolynomial(syms, C, E)
OV := OrderedVariableList(syms)
pol2r(p: Polynomial C): R == (_
r: R := 0;
while not zero? p repeat (_
c: C := leadingCoefficient p;_
v: Vector N := vector degree(leadingMonomial p, syms);_
e: E := directProduct(v)$E;_
p := reductum p;_
r := r + monomial(c, e)$R_
);_
r)
rs: List R := [pol2r p for p in lpol]
gb: List R := groebner(rs)$GroebnerPackage(C, E, OV, R);
print("end of computation")
# gb
--gb