Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#22279 closed defect (duplicate)

PariError: no more variables available

Reported by: zimmerma Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: number theory Keywords:
Cc: Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by zimmerma)

with Sage 7.3 and the following code:

def FindGroupOrder(p,s):
   K = GF(p)
   v = K(4*s)
   u = K(s^2-5)
   x = u^3
   b = 4*x*v
   a = (v-u)^3*(3*u+v)
   A = a/b-2
   x = x/v^3
   b = x^3 + A*x^2 + x
   E = EllipticCurve(K,[0,b*A,0,b^2,0])
   return factor(E.cardinality())

p = 5124287448739202795545639
sigma = 5
ming2 = infinity
while True:
   sigma += 1
   l = FindGroupOrder(p, sigma)
   if len(l) >= 2:
      g2 = l[-2][0]
      if g2 >= 2977044737 and g2 < ming2:
         print "sigma=", sigma, l
         ming2 = g2

I get:

sigma= 23 2^3 * 3^3 * 83 * 11664842257 * 24503198029
sigma= 187 2^4 * 3 * 5 * 23 * 4569906967 * 203136070453
sigma= 281 2^2 * 3^2 * 17 * 4553084269 * 1838977320077
sigma= 358 2^6 * 3^5 * 3696957041 * 89125674997
sigma= 486 2^7 * 3 * 127 * 3366759491 * 31209473717
sigma= 588 2^6 * 3^3 * 5 * 7 * 3010007183 * 28148429509
sigma= 2643 2^4 * 3 * 5 * 11 * 2988513007 * 649492897793
sigma= 5910 2^3 * 3 * 5 * 47 * 2979655039 * 304921741777
---------------------------------------------------------------------------
PariError                                 Traceback (most recent call last)
<ipython-input-5-6dbfc5e42421> in <module>()
      1 while True:
      2     sigma += Integer(1)
----> 3     l = FindGroupOrder(p, sigma)
      4     if len(l) >= Integer(2):
      5         g2 = l[-Integer(2)][Integer(0)]

<ipython-input-1-13c12fb96337> in FindGroupOrder(p, s)
     10        b = x**Integer(3) + A*x**Integer(2) + x
     11        E = EllipticCurve(K,[Integer(0),b*A,Integer(0),b**Integer(2),Integer(0)])
---> 12        return factor(E.cardinality())
     13 

/usr/local/SageMath/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_finite_field.py in cardinality(self, algorithm, extension_degree)
    888                 algorithm = 'pari'
    889             if algorithm == 'pari':
--> 890                 N = self.cardinality_pari()
    891             elif algorithm == 'bsgs':
    892                 N = self.cardinality_bsgs()

/usr/local/SageMath/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_finite_field.py in cardinality_pari(self)
   1082         p = k.characteristic()
   1083         if k.degree()==1:
-> 1084             return ZZ(p + 1 - int(self._pari_().ellap(p)))
   1085         else:
   1086             raise ValueError("cardinality_pari() only works over prime fields.")

/usr/local/SageMath/local/lib/python2.7/site-packages/sage/libs/pari/auto_gen.pxi in sage.libs.pari.gen.gen_auto.ellap (/usr/local/SageMath/src/build/cythonized/sage/libs/pari/gen.c:30583)()
   5386             p = objtogen(p)
   5387             _p = (<gen>p).g
-> 5388         sig_on()
   5389         cdef GEN _ret = ellap(_E, _p)
   5390         return pari_instance.new_gen(_ret)

/usr/local/SageMath/src/sage/libs/pari/handle_error.pyx in sage.libs.pari.handle_error._pari_err_handle (/usr/local/SageMath/src/build/cythonized/sage/libs/pari/handle_error.c:3102)()
    179             pari_error_string = s.decode('ascii') + ": " + pari_error_string
    180 
--> 181         raise PariError(errnum, pari_error_string, pari_instance.new_gen_noclear(E))
    182     finally:
    183         sig_unblock()

PariError: no more variables available

Change History (6)

comment:1 Changed 4 years ago by jdemeyer

My machine runs out of memory before I get an error.

Please fill in the ..., the traceback is very useful to find out where the problem lies.

comment:2 Changed 4 years ago by zimmerma

  • Description modified (diff)

comment:3 Changed 4 years ago by zimmerma

Please fill in the ..., the traceback is very useful to find out where the problem lies.

done.

comment:4 Changed 4 years ago by jdemeyer

PARI just announced they are preparing a PARI 2.9.2 (see #22675) release and this is in their changelog:

19- ellsea could leak variables (=> "no more variables" error)       [F30]

I guess this is exactly this issue.

comment:5 Changed 4 years ago by jdemeyer

  • Milestone changed from sage-7.6 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Reviewers set to Jeroen Demeyer
  • Status changed from new to closed

comment:6 Changed 4 years ago by zimmerma

Jeroen, why did you close that ticket? Did you check it was fixed with PARI 2.9.2? Paul

Note: See TracTickets for help on using tickets.