On Nov 28, 1:43 am, mabshoff <[EMAIL PROTECTED]
dortmund.de> wrote:
> Hello,
>
> some more trouble:
>
> [EMAIL PROTECTED] sage-2.8.14$ ./sage
> ----------------------------------------------------------------------
> | SAGE Version 2.8.14, Release Date: 2007-11-24                      |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
>
> sage: graphs_query = GraphDatabase()
> sage: L = graphs_query.get_list(num_vertices=Integer(4))
> sage:  for g in L:
> ....:     G = g.automorphism_group()
> ....:     G = g.automorphism_group()
> ....:     G.order(), G.gens()
> ....:
> (24, ((2,3), (1,2), (1,4)))
> (4, ((2,3), (1,4)))
> (2, ((1,2),))
> (8, ((1,2), (1,4)(2,3)))
> (6, ((1,2), (1,4)))
> (6, ((2,3), (1,2)))
> (2, ((1,4)(2,3),))
> (2, ((1,2),))
> (8, ((2,3), (1,4), (1,3)(2,4)))
> (4, ((2,3), (1,4)))
> (24, ((2,3), (1,2), (1,4)))
> sage: C = graphs.CubeGraph(Integer(4))
> sage:  G = C.automorphism_group()
> sage: M = G.character_table()
> sage: type(M)
> <type 'sage.matrix.matrix_generic_dense.Matrix_generic_dense'>
> sage: M
> 20 x 20 dense matrix over Cyclotomic Field of order 1 and degree 1
> sage: M.de
> M.decomposition              M.dense_columns              M.density
> M.decomposition_of_subspace  M.dense_matrix               M.det
> M.denominator                M.dense_rows
> M.determinant
> sage: M.det()
> MulMod: bad args
> ---------------------------------------------------------------------------
> <type 'exceptions.RuntimeError'>          Traceback (most recent call
> last)
>
> /tmp/Work-mabshoff/sage-2.8.14/<ipython console> in <module>()
>
> /tmp/Work-mabshoff/sage-2.8.14/matrix2.pyx in
> sage.matrix.matrix2.Matrix.det()
>
> /tmp/Work-mabshoff/sage-2.8.14/matrix2.pyx in
> sage.matrix.matrix2.Matrix.determinant()
>
> /tmp/Work-mabshoff/sage-2.8.14/matrix2.pyx in
> sage.matrix.matrix2.Matrix.charpoly()
>
> /tmp/Work-mabshoff/sage-2.8.14/matrix2.pyx in
> sage.matrix.matrix2.Matrix._charpoly_hessenberg()
>
> /tmp/Work-mabshoff/sage-2.8.14/matrix2.pyx in
> sage.matrix.matrix2.Matrix.hessenberg_form()
>
> /tmp/Work-mabshoff/sage-2.8.14/matrix2.pyx in
> sage.matrix.matrix2.Matrix.hessenbergize()
>
> /tmp/Work-mabshoff/sage-2.8.14/element.pyx in
> sage.structure.element.RingElement.__div__()
>
> /tmp/Work-mabshoff/sage-2.8.14/coerce.pxi in
> sage.structure.element._div_c()
>
> <type 'exceptions.RuntimeError'>:
> sage:
>
> I do suspect some interaction between the fact that int_fast64_t has
> to be defined as a 4 byte type, i.e. long instead of long long,
> otherwise ntl_lzz complains at startup [I will post that message once
> I have recompiled the whole sage lib with "typedef long long
> int_fast64_t;" - but that will take a while]:
>
> [EMAIL PROTECTED] sage-2.8.3$ cat dummy.c
> #include "stdio.h"
>
> int main()
> {
>   printf("sizeof(long): %d\n",sizeof(long));
>   printf("sizeof(long long): %d\n",sizeof(long long));}
>
> [EMAIL PROTECTED] sage-2.8.3$ ./a.out
> sizeof(long): 4
> sizeof(long long): 8
> [EMAIL PROTECTED] sage-2.8.3$ cat local/include/stdint.h
> typedef int int_fast32_t;
> typedef long int_fast64_t; // this is *wrong* on 32 bits! It needs to
> be a long long
>
> This is supported by the following doctest failure:
>
> **********************************************************************
> File "integer_mod.pyx", line 850:
>     sage: a.crt(b)
> Exception raised:
>     Traceback (most recent call last):
>       File "/tmp/Work-mabshoff/sage-2.8.14/local/lib/python2.5/
> doctest.py", line 1212, in __run
>         compileflags, 1) in test.globs
>       File "<doctest __main__.example_22[5]>", line 1, in <module>
>         a.crt(b)###line 850:
>     sage: a.crt(b)
>       File "integer_mod.pyx", line 862, in
> sage.rings.integer_mod.IntegerMod_abstract.crt
>         return self.__crt(other)
>       File "integer_mod.pyx", line 2033, in
> sage.rings.integer_mod.IntegerMod_int64.__crt
>         def __crt(IntegerMod_int64 self, IntegerMod_int64 other):
>     TypeError: Argument 'other' has incorrect type (expected
> sage.rings.integer_mod.IntegerMod_int64, got
> sage.rings.integer_mod.IntegerMod_int)
> **********************************************************************
>
> Also the following doctest failures seems to indicate pretty clearly
> that something very basic is wrong:
>
> sage -t  devel/sage-main/sage/rings/integer_mod.pyx
> **********************************************************************
> File "integer_mod.pyx", line 29:
>     sage: a * b
> Expected:
>     851127
> Got:
>     -300468
> **********************************************************************
> File "integer_mod.pyx", line 632:
>     sage: [x^2 for x in v]
> Expected:
>     [406444, 406444, 406444, 406444, 406444, 406444, 406444, 406444]
> Got:
>     [343463, -188944, -377887, -160385, -286347, 337600, 366159,
> -355191]
> **********************************************************************
>

Amd the following happens if I make int_fast64_t a 8 byte data type,
i.e. a long long in 32 bit mode. Since a int_fast64_t has to be *at
least* 8 byte this is the correct setting.

----------------------------------------------------------------------
| SAGE Version 2.8.14, Release Date: 2007-11-24                      |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/tmp/Work-mabshoff/sage-2.8.14/local/lib/python2.5/site-
packages/sage/all_cmdline.py", line 14, in <module>
    from sage.all import *
  File "/tmp/Work-mabshoff/sage-2.8.14/local/lib/python2.5/site-
packages/sage/all.py", line 57, in <module>
    from sage.libs.all       import *
  File "/tmp/Work-mabshoff/sage-2.8.14/local/lib/python2.5/site-
packages/sage/libs/all.py", line 3, in <module>
    import sage.libs.ntl.all  as ntl
  File "/tmp/Work-mabshoff/sage-2.8.14/local/lib/python2.5/site-
packages/sage/libs/ntl/all.py", line 52, in <module>
    from sage.libs.ntl.ntl_lzz_p import ntl_zz_p as zz_p
  File "integer_mod.pxd", line 14, in sage.libs.ntl.ntl_lzz_p
ValueError: sage.rings.integer_mod.NativeIntStruct does not appear to
be the correct type object

[This issue is raised inside Cython autogenerated code. Might it be
that Cython gets this wrong in general?]

---------------------------------------------------------------------------
<type 'exceptions.ValueError'>            Traceback (most recent call
last)

/tmp/Work-mabshoff/sage-2.8.14/local/bin/<ipython console> in
<module>()

/tmp/Work-mabshoff/sage-2.8.14/local/lib/python2.5/site-packages/sage/
all_cmdline.py in <module>()
     22     if 'type object' in str(msg):
     23         msg = str(msg) + '\n\n** In SAGE, the easiest fix for
this problem is to type "sage -ba"\n   to rebuild all the Cython code
(this takes several minutes).\n   Alternatively, touch the last .pyx
file in the traceback above. **\n'
---> 24     raise ValueError, msg
     25
     26


> So, any ideas? I am hoping that at least somebody reads this and is
> not immediately frightened away by the the word "Solaris" in the
> subject :)
>
> Cheers,
>
> Michael
--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to