Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
345 stars 230 forks source link

check(9, "GroebnerWalk") running out of memory on i386 #1563

Open d-torrance opened 4 years ago

d-torrance commented 4 years ago

Another test failure from a test build of the Debian package on an i386 chroot:

i1 : check(9, "GroebnerWalk")
-- running test 9 of package GroebnerWalk on line 766 in file M2/Macaulay2/packages/GroebnerWalk.m2
--    rerun with: check_9 "GroebnerWalk"
--making test results
 ulimit -c unlimited; ulimit -t 700; ulimit -m 850000; ulimit -s 8192; ulimit -n 512;  cd /tmp/M2-2338208-0/1-rundir/; GC_MAXIMUM_HEAP_SIZE=400M "/build/macaulay2-1.16+git55.94c4b7d+ds/M2/usr-dist/i686-Linux-Debian-unstable/bin/M2-binary" --int --no-randomize --no-readline --silent --stop --print-width 129 -e 'needsPackage("GroebnerWalk", Reload => true, FileName => "/build/macaulay2-1.16+git55.94c4b7d+ds/M2/Macaulay2/packages/GroebnerWalk.m2")' <"/tmp/M2-2338208-0/0.m2" >>"/tmp/M2-2338208-0/0.tmp" 2>&1
/tmp/M2-2338208-0/0.tmp:0:1: (output file) error: Macaulay2 exited with status code 1
/tmp/M2-2338208-0/0.m2:0:1: (input file)
M2: *** Error 1
stdio:1:1:(3): error: test #9 of package GroebnerWalk failed

i2 : get "/tmp/M2-2338208-0/0.tmp"

o2 = -- -*- M2-comint -*- hash: 1108677374

     i1 : --/build/macaulay2-1.16+git55.94c4b7d+ds/M2/Macaulay2/packages/GroebnerWalk.m2:766: location of test code
           -- groebnerWalk
          R1 = QQ[x,y,z, MonomialOrder=>Weights=>{1,1,10}]

     o1 = R1

     o1 : PolynomialRing

     i2 : I1 = ideal(y^2-x, z^3-x)

                  2       3
     o2 = ideal (y  - x, z  - x)

     o2 : Ideal of R1

     i3 : R2 = QQ[x,y,z, MonomialOrder=>Weights=>{10,1,1}]

     o3 = R2

     o3 : PolynomialRing

     i4 : G1 = groebnerWalk(I1, R2)

     o4 = GroebnerBasis[status: done; S-pairs encountered up to degree 0]

     o4 : GroebnerBasis

     i5 : G2 = groebnerWalk(I1, R2, Strategy=>Generic)

     o5 = GroebnerBasis[status: done; S-pairs encountered up to degree 0]

     o5 : GroebnerBasis

     i6 : G3 = gb sub(I1, R2)

     o6 = GroebnerBasis[status: done; S-pairs encountered up to degree 2]

     o6 : GroebnerBasis

     i7 : assert(gens G1 == gens G3)

     i8 : assert(gens G2 == gens G3)

     i9 : 
          R1 = ZZ/32003[x,y,z, MonomialOrder=>Weights=>{1,1,10}]

     o9 = R1

     o9 : PolynomialRing

     i10 : I1 = ideal(y^2-x, z^3-x)

                   2       3
     o10 = ideal (y  - x, z  - x)

     o10 : Ideal of R1

     i11 : R2 = ZZ/32003[x,y,z, MonomialOrder=>Weights=>{10,1,1}]

     o11 = R2

     o11 : PolynomialRing

     i12 : G1 = groebnerWalk(I1, R2)

     o12 = GroebnerBasis[status: done; S-pairs encountered up to degree 0]

     o12 : GroebnerBasis

     i13 : G2 = groebnerWalk(I1, R2, Strategy=>Generic)

     o13 = GroebnerBasis[status: done; S-pairs encountered up to degree 0]

     o13 : GroebnerBasis

     i14 : G3 = gb sub(I1, R2)

     o14 = GroebnerBasis[status: done; S-pairs encountered up to degree 2]

     o14 : GroebnerBasis

     i15 : assert(gens G1 == gens G3)

     i16 : assert(gens G2 == gens G3)

     i17 : 
           R1 = ZZ/32003[x,y,z, MonomialOrder=>Weights=>{1,100,1}]

     o17 = R1

     o17 : PolynomialRing

     i18 : I1 = ideal(y^2-x, z^3-x)

                   2       3
     o18 = ideal (y  - x, z  - x)

     o18 : Ideal of R1

     i19 : R2 = ZZ/32003[x,y,z, MonomialOrder=>Lex]

     o19 = R2

     o19 : PolynomialRing

     i20 : G1 = groebnerWalk(I1, R2)

     o20 = GroebnerBasis[status: done; S-pairs encountered up to degree 0]

     o20 : GroebnerBasis

     i21 : G2 = groebnerWalk(I1, R2, Strategy=>Generic)

     o21 = GroebnerBasis[status: done; S-pairs encountered up to degree 0]

     o21 : GroebnerBasis

     i22 : G3 = gb sub(I1, R2)

     o22 = GroebnerBasis[status: done; S-pairs encountered up to degree 2]

     o22 : GroebnerBasis

     i23 : assert(gens G1 == gens G3)

     i24 : assert(gens G2 == gens G3)

     i25 : 
           R1 = QQ[x,y,z,u,v, MonomialOrder=>Weights=>{1,1,1,0,0}]

     o25 = R1

     o25 : PolynomialRing

     i26 : I1 = ideal(u + u^2 - 2*v - 2*u^2*v + 2*u*v^2 - x,
                      -6*u + 2*v + v^2 - 5*v^3 + 2*u*v^2 - 4*u^2*v^2 - y,
                -2 + 2*u^2 + 6*v - 3*u^2*v^2 - z)

                          2        2    2                   2 2       2     3    2                    2 2     2
     o26 = ideal (- x - 2u v + 2u*v  + u  + u - 2v, - y - 4u v  + 2u*v  - 5v  + v  - 6u + 2v, - z - 3u v  + 2u  + 6v - 2)

     o26 : Ideal of R1

     i27 : R2 = QQ[x,y,z,u,v, MonomialOrder=>Weights=>{0,0,0,1,1}]

     o27 = R2

     o27 : PolynomialRing

     i28 : G1 = groebnerWalk(I1, R2)

     o28 = GroebnerBasis[status: done; S-pairs encountered up to degree 0]

     o28 : GroebnerBasis

     i29 : G2 = groebnerWalk(I1, R2, Strategy => Generic)

      *** out of memory trying to allocate 29524 bytes, exiting ***
DanGrayson commented 4 years ago

Maybe the example is just too large and can be simplified. One way to see is to run it with various limits on a 64 bit machine.