#11604: PARI qfminim bug on 32-bit systems (Sage 4.7 and 4.6.2)
------------------------+---------------------------------------------------
   Reporter:  mmasdeu   |          Owner:  was                                  
                  
       Type:  defect    |         Status:  needs_review                         
                  
   Priority:  major     |      Milestone:  sage-4.7.1                           
                  
  Component:  packages  |       Keywords:  pari, qfminim, ZM_lll, large matrix, 
ArchLinux, PARI/GP
Work_issues:            |       Upstream:  Fixed upstream, but not in a stable 
release.           
   Reviewer:            |         Author:  Leif Leonhardy                       
                  
     Merged:            |   Dependencies:                                       
                  
------------------------+---------------------------------------------------
Changes (by newvalueoldvalue):

  * status:  needs_work => needs_review
  * author:  => Leif Leonhardy
 * cc: jdemeyer (added)
  * upstream:  N/A => Fixed upstream, but not in a stable release.
  * milestone:  sage-4.7.2 => sage-4.7.1


Old description:

> In Sage 4.7, when calling the function
>
> pari('qfminim(%s,2,0)'%(A._pari_()))
>
> with certain matrix, I get the following:
>
> {{{
> sage: A=Matrix(ZZ,4,4,[32982266684193100, 1368614777139719,
> 224591013270052693 , 276460184982223238,1368614777139719,
> 56791380087354, 9319512049770279, 11471848267545007,224591013270052693 ,
> 9319512049770279 ,1529340971891522140,
> 1882541434053596358,276460184982223238 ,  11471848267545007,
> 1882541434053596358, 2317313350044091414])
> sage: pari('qfminim(%s,2,0)'%(A._pari_()))
>   ***   at top-level: qfminim([32982266684
>   ***                 ^--------------------
>   *** qfminim: bug in ZM_lll, please report
> ---------------------------------------------------------------------------
> RuntimeError                              Traceback (most recent call
> last)
>
> /home/float/<ipython console> in <module>()
>
> /home/float/sage/local/lib/python2.6/site-packages/sage/libs/pari/gen.so
> in sage.libs.pari.gen.PariInstance.__call__
> (sage/libs/pari/gen.c:43438)()
>
> RuntimeError: evaluating PARI string
>
> }}}
>
> I have found other examples of (also large) matrices where pari fails
> similarly. I have tried this example with standalone pari (both stable
> and developement versions) and it returns with no problem, so I guess it
> is a problem with the interface Sage-PARI.

New description:

 In Sage 4.7, when calling the function

 pari('qfminim(%s,2,0)'%(A._pari_()))

 with certain matrix, I get the following:

 {{{
 sage: A=Matrix(ZZ,4,4,[32982266684193100, 1368614777139719,
 224591013270052693 , 276460184982223238,1368614777139719,
 56791380087354, 9319512049770279, 11471848267545007,224591013270052693 ,
 9319512049770279 ,1529340971891522140,
 1882541434053596358,276460184982223238 ,  11471848267545007,
 1882541434053596358, 2317313350044091414])
 sage: pari('qfminim(%s,2,0)'%(A._pari_()))
   ***   at top-level: qfminim([32982266684
   ***                 ^--------------------
   *** qfminim: bug in ZM_lll, please report
 ---------------------------------------------------------------------------
 RuntimeError                              Traceback (most recent call
 last)

 /home/float/<ipython console> in <module>()

 /home/float/sage/local/lib/python2.6/site-packages/sage/libs/pari/gen.so
 in sage.libs.pari.gen.PariInstance.__call__ (sage/libs/pari/gen.c:43438)()

 RuntimeError: evaluating PARI string

 }}}

 I have found other examples of (also large) matrices where pari fails
 similarly. I have tried this example with standalone pari (both stable and
 developement versions) and it returns with no problem, so I guess it is a
 problem with the interface Sage-PARI.

 ----

 This is an instance of [http://pari.math.u-bordeaux.fr/cgi-
 bin/bugreport.cgi?bug=1154 PARI bug 1154].

 ----

 '''New spkg: http://spkg-
 upload.googlecode.com/files/pari-2.4.3.alpha.p8.spkg'''

 '''md5sum: `4ad98aabafa69cf5b5aab6e05956b472  pari-2.4.3.alpha.p8.spkg`'''

 (This spkg is based on the p7 from #11605, which at the moment still needs
 review.)


 === pari-2.4.3.alpha.p8 (Leif Leonhardy, July 17th, 2011) ===
  * #11604: Apply patch for PARI bug 1154 (src/basemath/lll.c only,
    from svn-12825). This fixes "rare" errors in ZM_lll_norms() that
    apparently only occur on 32-bit systems, and don't show up in
    any doctest nor PARI's test suite.

--

Comment:

 I've made an spkg that fixes the (btw. upstream) bug.

 Please test & report back / review!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11604#comment:17>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to