William, Yes, isprime(2) works properly. I get: 64/sage-2.10.2> ./sage -gp -q ? isprime(2) 1 ? ?
Thanks, - Sameer On Mar 9, 4:35 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > On Sun, Mar 9, 2008 at 2:40 PM, Sameer <[EMAIL PROTECTED]> wrote: > > > Michael, > > I am getting closer. I rebuilt the iml and linboxwrap packages and > > got rid of the undefined errors. Now, I get: > > 64/sage-2.10.2> ./sage -br > > > ---------------------------------------------------------- > > sage: Building and installing modified SAGE library files. > > > Installing c_lib > > scons: `install' is up to date. > > running install > > running build > > running build_py > > running build_ext > > running build_scripts > > running install_lib > > running install_scripts > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > sage to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > control to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > rules to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > dsage_server.py to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > changelog to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > spkg-debian-maybe to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > dsage_worker.py to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > compat to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > dsage_setup.py to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > check-use-debian.pl to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > sagemath.install to 755 > > changing mode of /usr/local/PET/src/build/64/sage-2.10.2/local/bin/ > > control.in to 755 > > running install_data > > running install_egg_info > > Removing /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/ > > > site-packages/sage-0.0.0-py2.5.egg-info > > Writing /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/ > > site-packages/sage-0.0.0-py2.5.egg-info > > ---------------------------------------------------------------------- > > | SAGE Version 2.10.2, Release Date: 2008-02-22 | > > | Type notebook() for the GUI, and license() for information. | > > ---------------------------------------------------------------------- > > > --------------------------------------------------------------------------- > > <type 'exceptions.RuntimeError'> Traceback (most recent call > > > last) > > > /usr/local/PET/src/build/64/sage-2.10.2/local/bin/<ipython console> in > > <module>() > > > /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/site- > > > packages/sage/all_cmdline.py in <module>() > > 12 try: > > 13 > > ---> 14 from sage.all import * > > 15 from sage.calculus.predefined import x > > 16 preparser(on=True) > > > /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/site- > > packages/sage/all.py in <module>() > > 59 get_sigs() > > 60 > > ---> 61 from sage.rings.all import * > > 62 from sage.matrix.all import * > > 63 > > > /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/site- > > packages/sage/rings/all.py in <module>() > > 90 > > 91 # Algebraic numbers > > ---> 92 from qqbar import (AlgebraicRealField, is_AlgebraicRealField, > > AA, > > 93 AlgebraicReal, is_AlgebraicReal, > > 94 AlgebraicField, is_AlgebraicField, QQbar, > > > /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/site- > > packages/sage/rings/qqbar.py in <module>() > > 4046 QQ_1_4 = QQ(1)/4 > > 4047 > > -> 4048 QQbar_I_nf = QuadraticField(-1, 'I') > > 4049 # XXX change ANRoot to ANRootOfUnity below > > 4050 QQbar_I_generator = AlgebraicGenerator(QQbar_I_nf, > > ANRoot(AAPoly.gen()**2 + 1, CIF(0, 1))) > > > /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/site- > > packages/sage/rings/number_field/number_field.py in QuadraticField(D, > > names, check) > > 456 R = polynomial_ring.PolynomialRing(QQ, 'x') > > 457 f = R([-D, 0, 1]) > > --> 458 return NumberField(f, names, check=False) > > 459 > > 460 def is_AbsoluteNumberField(x): > > > /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/site- > > packages/sage/rings/number_field/number_field.py in > > NumberField(polynomial, name, check, names, cache) > > 277 > > 278 if polynomial.degree() == 2: > > --> 279 K = NumberField_quadratic(polynomial, name, check) > > 280 else: > > 281 K = NumberField_absolute(polynomial, name, None, > > check) > > > /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/site- > > packages/sage/rings/number_field/number_field.py in __init__(self, > > polynomial, name, check) > > 5222 D = Dpoly.numer() * Dpoly.denom() > > 5223 # this could be done extreemly in pyrex > > -> 5224 for p in sage.rings.arith.primes(100): > > 5225 p2 = p*p > > 5226 while D % p2 == 0: > > > /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/site- > > packages/sage/rings/arith.py in primes(start, stop) > > 684 n = start - 1 > > 685 while True: > > --> 686 n = next_prime(n) > > 687 if n < stop: > > 688 yield n > > > /usr/local/PET/src/build/64/sage-2.10.2/local/lib/python2.5/site- > > packages/sage/rings/arith.py in next_prime(n, proof) > > 774 """ > > 775 n = integer_ring.ZZ(n) > > --> 776 return n.next_prime(proof=proof) > > 777 > > 778 def previous_prime(n): > > > /usr/local/PET/src/build/64/sage-2.10.2/local/bin/integer.pyx in > > sage.rings.integer.Integer.next_prime() > > > /usr/local/PET/src/build/64/sage-2.10.2/local/bin/integer.pyx in > > sage.rings.integer.Integer.is_prime() > > > <type 'exceptions.RuntimeError'>: > > > Is there a way to reduce this error to see if it is a library loading > > issue or needs re-building some specific package? How should I > > proceed? > > The stack trace is going "boom" exactly in PARI's C library code > for checking primality, evidently. Does the following work for you or > not: > > teragon:~ was$ sage -gp -q > ? isprime(2) > 1 > ? > > By the way, this looks crappy: > "# this could be done extreemly in pyrex" > > Also, why are we creating numbers fields just to start Sage? This > comes up in cwitty's algebraic numbers -- I wonder if it could be > done in a more lazy manner... --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---