Opened 5 years ago

#17880 new defect

Bug in _rational_echelon_via_solve in finding linearly independent rows

Reported by: vbraun Owned by:
Priority: major Milestone: sage-6.6
Component: linear algebra Keywords: random_fail
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

This test can randomly fail, see discussion at http://comments.gmane.org/gmane.comp.mathematics.sage.devel/59421

sage -t --long src/sage/modules/fg_pid/fgp_module.py
**********************************************************************
File "src/sage/modules/fg_pid/fgp_module.py", line 1687, in sage.modules.fg_pid.fgp_module.test_morphism_0
Failed example:
    set_random_seed(s); v = [fgp.test_morphism_0(i) for i in range(1,20)]
Exception raised:
    Traceback (most recent call last):
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 492, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 854, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.modules.fg_pid.fgp_module.test_morphism_0[5]>", line 1, in <module>
        set_random_seed(s); v = [fgp.test_morphism_0(i) for i in range(Integer(1),Integer(20))]
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/modules/fg_pid/fgp_module.py", line 1690, in test_morphism_0
        phi = random_fgp_morphism_0(*args, **kwds)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/modules/fg_pid/fgp_module.py", line 1676, in random_fgp_morphism_0
        return A.hom([ZZ.random_element()*g for g in A.smith_form_gens()])
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/modules/fg_pid/fgp_module.py", line 1346, in hom
        return self._hom_from_smith(im_gens, check)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/modules/fg_pid/fgp_module.py", line 1422, in _hom_from_smith
        M, _ = self.optimized()
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/modules/fg_pid/fgp_module.py", line 1215, in optimized
        H, U = B.hermite_form(transformation=True)
      File "sage/matrix/matrix_integer_dense.pyx", line 1852, in sage.matrix.matrix_integer_dense.Matrix_integer_dense.echelon_form (build/cythonized/sage/matrix/matrix_integer_dense.c:16641)
        H_m, U, pivots = matrix_integer_dense_hnf.hnf_with_transformation(self, proof=proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 1057, in hnf_with_transformation
        H, pivots = hnf(C, include_zero_rows=True, proof=proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 1018, in hnf
        H, pivots = probable_hnf(A, include_zero_rows = include_zero_rows, proof=True)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 851, in probable_hnf
        H = hnf_square(C, proof=proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 587, in hnf_square
        x = add_column(W, H, b.stack(matrix(1,1,[k*A[m-2,m-1] + l*A[m-1,m-1]])), proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 426, in add_column
        return add_column_fallback(B, a, proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 305, in add_column_fallback
        H, _ = hnf(W, proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 1018, in hnf
        H, pivots = probable_hnf(A, include_zero_rows = include_zero_rows, proof=True)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 851, in probable_hnf
        H = hnf_square(C, proof=proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 587, in hnf_square
        x = add_column(W, H, b.stack(matrix(1,1,[k*A[m-2,m-1] + l*A[m-1,m-1]])), proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 426, in add_column
        return add_column_fallback(B, a, proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 305, in add_column_fallback
        H, _ = hnf(W, proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 1018, in hnf
        H, pivots = probable_hnf(A, include_zero_rows = include_zero_rows, proof=True)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 851, in probable_hnf
        H = hnf_square(C, proof=proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 587, in hnf_square
        x = add_column(W, H, b.stack(matrix(1,1,[k*A[m-2,m-1] + l*A[m-1,m-1]])), proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 426, in add_column
        return add_column_fallback(B, a, proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 305, in add_column_fallback
        H, _ = hnf(W, proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 1018, in hnf
        H, pivots = probable_hnf(A, include_zero_rows = include_zero_rows, proof=True)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 851, in probable_hnf
        H = hnf_square(C, proof=proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 547, in hnf_square
        (d1,d2) = double_det (B,c,d, proof=proof)
      File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense_hnf.py", line 259, in double_det
        v = B.solve_right(-c)
      File "sage/matrix/matrix2.pyx", line 366, in sage.matrix.matrix2.Matrix.solve_right (build/cythonized/sage/matrix/matrix2.c:6490)
        X = self._solve_right_general(C, check=check)
      File "sage/matrix/matrix2.pyx", line 467, in sage.matrix.matrix2.Matrix._solve_right_general (build/cythonized/sage/matrix/matrix2.c:7160)
        pivot_cols = self.pivots()
      File "sage/matrix/matrix0.pyx", line 4160, in sage.matrix.matrix0.Matrix.pivots (build/cythonized/sage/matrix/matrix0.c:26104)
        self.echelon_form()
      File "sage/matrix/matrix_rational_dense.pyx", line 1546, in sage.matrix.matrix_rational_dense.Matrix_rational_dense.echelon_form (build/cythonized/sage/matrix/matrix_rational_dense.c:15913)
        E = self._echelon_form_padic()
      File "sage/matrix/matrix_rational_dense.pyx", line 1572, in sage.matrix.matrix_rational_dense.Matrix_rational_dense._echelon_form_padic (build/cythonized/sage/matrix/matrix_rational_dense.c:16440)
        pivots, nonpivots, X, d = A._rational_echelon_via_solve()
      File "sage/matrix/matrix_integer_dense.pyx", line 4382, in sage.matrix.matrix_integer_dense.Matrix_integer_dense._rational_echelon_via_solve (build/cythonized/sage/matrix/matrix_integer_dense.c:34920)
        raise RuntimeError("Bug in _rational_echelon_via_solve in finding linearly independent rows.")
    RuntimeError: Bug in _rational_echelon_via_solve in finding linearly independent rows.
**********************************************************************
1 item had failures:
   1 of   8 in sage.modules.fg_pid.fgp_module.test_morphism_0
    [332 tests, 1 failure, 12.10 s]

Change History (0)

Note: See TracTickets for help on using tickets.