[arch-commits] Commit in sagemath/trunk (PKGBUILD sagemath-linbox-1.6.patch)
Antonio Rojas
arojas at archlinux.org
Wed May 15 21:29:51 UTC 2019
Date: Wednesday, May 15, 2019 @ 21:29:51
Author: arojas
Revision: 467482
linbox 1.6 rebuild
Added:
sagemath/trunk/sagemath-linbox-1.6.patch
Modified:
sagemath/trunk/PKGBUILD
---------------------------+
PKGBUILD | 12 +-
sagemath-linbox-1.6.patch | 191 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 199 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-05-15 20:22:59 UTC (rev 467481)
+++ PKGBUILD 2019-05-15 21:29:51 UTC (rev 467482)
@@ -8,7 +8,7 @@
pkgbase=sagemath
pkgname=(sagemath sagemath-jupyter)
pkgver=8.7
-pkgrel=2
+pkgrel=3
pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
arch=(x86_64)
url="http://www.sagemath.org"
@@ -17,7 +17,7 @@
python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-pplpy python2-future
gap flintqs lcalc lrcalc arb eclib zn_poly gd python2-cvxopt pynac linbox m4rie rubiks pari-galdata pari-seadata-small planarity rankwidth tachyon
sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials
- libgiac libhomfly libbraiding three.js)
+ iml libgiac libhomfly libbraiding three.js)
optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
@@ -47,7 +47,8 @@
sagemath-singular-4.1.2.patch
sagemath-ecl-sigfpe.patch
sagemath-gap-4.10.1.patch
- sagemath-threejs-100.patch)
+ sagemath-threejs-100.patch
+ sagemath-linbox-1.6.patch)
sha256sums=('263c3b3fc956b8bebc532f3b51e68c1b0d559d3b7e7c9fadffdfc0f4dbae18ab'
'e0e36f2a39b634a76e1c3ad9a31f9ab60e734dd53b43203557b76613277d53b9'
'b1068a8d5750051c2b5cfcb89d3d5870cf4233ab445e71c398543fb8b1e6281a'
@@ -61,7 +62,8 @@
'961bfb5694b67d425d21240d71490cb71714b5207c23448c89be0966512ff8f9'
'a42f3b152b1aedb8abf16bc70971419919d1fe30328574e7fef8305f9d07d938'
'9ec56a3788e32c54f35abeaeedf7cadf6670fa10d39007050b23b93d3c35278e'
- '3ee624bb47f757516a860799d817168fe9cf74e603416e18e70c93c692259242')
+ '3ee624bb47f757516a860799d817168fe9cf74e603416e18e70c93c692259242'
+ '7e126c73d12c39be9012a66f979897fa630d540d30906dadff6c1384af4ec166')
prepare(){
cd sage-$pkgver
@@ -83,6 +85,8 @@
patch -p1 -i ../sagemath-sphinx-1.8.patch
# port to GAP 4.10.1 API changes
patch -p1 -i ../sagemath-gap-4.10.1.patch
+# fix build with linbox 1.6
+ patch -p1 -i ../sagemath-linbox-1.6.patch
# Upstream patches
# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
Added: sagemath-linbox-1.6.patch
===================================================================
--- sagemath-linbox-1.6.patch (rev 0)
+++ sagemath-linbox-1.6.patch 2019-05-15 21:29:51 UTC (rev 467482)
@@ -0,0 +1,191 @@
+diff --git a/src/sage/libs/linbox/fflas.pxd b/src/sage/libs/linbox/fflas.pxd
+index f3a7ce37ea..7d8d64d3b5 100644
+--- a/src/sage/libs/linbox/fflas.pxd
++++ b/src/sage/libs/linbox/fflas.pxd
+@@ -64,8 +64,8 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFPACK":
+ Modular_double.Element* A, size_t A_stride, int nullity)
+
+ Modular_double.Element Det (Modular_double F,
+- size_t nrows, size_t ncols,
+- Modular_double.Element* A, size_t A_stride)
++ Modular_double.Element det, size_t ncols,
++ Modular_double.Element* A, size_t A_stride, size_t* P, size_t* Q)
+
+ int Rank (Modular_double,
+ size_t nrows, size_t ncols,
+@@ -98,8 +98,8 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFPACK":
+ Modular_float.Element* A, size_t A_stride, int nullity)
+
+ Modular_float.Element Det (Modular_float F,
+- size_t nrows, size_t ncols,
+- Modular_float.Element* A, size_t A_stride)
++ Modular_float.Element det, size_t ncols,
++ Modular_float.Element* A, size_t A_stride, size_t* P, size_t* Q)
+
+ int Rank (Modular_float,
+ size_t nrows, size_t ncols,
+diff --git a/src/sage/libs/linbox/linbox.pxd b/src/sage/libs/linbox/linbox.pxd
+index 35a3fa0125..a4bda24c0e 100644
+--- a/src/sage/libs/linbox/linbox.pxd
++++ b/src/sage/libs/linbox/linbox.pxd
+@@ -125,7 +125,7 @@ cdef extern from "linbox/solutions/methods.h" namespace "LinBox":
+ pass
+ cdef struct WiedemannTraits:
+ pass
+- cdef struct BlasEliminationTraits:
++ cdef struct DenseEliminationTraits:
+ pass
+ cdef struct SparseEliminationTraits:
+ pass
+@@ -135,7 +135,7 @@ cdef extern from "linbox/solutions/methods.h" namespace "LinBox":
+ ctypedef BlackboxSpecifier Blackbox
+ ctypedef EliminationSpecifier Elimination
+ ctypedef WiedemannTraits Wiedemann
+- ctypedef BlasEliminationTraits BlasElimination
++ ctypedef DenseEliminationTraits DenseElimination
+ ctypedef SparseEliminationTraits SparseElimination
+
+ cdef extern from "linbox/solutions/charpoly.h" namespace "LinBox":
+@@ -157,19 +157,20 @@ cdef extern from "linbox/algorithms/gauss.h":
+ unsigned long Ni,
+ unsigned long Nj)
+
+-cdef extern from "linbox/algorithms/echelon-form.h":
++cdef extern from "linbox/solutions/echelon.h":
+ ## template<class Field>
+ ## class EchelonFormDomain
+ cdef cppclass EchelonForm_Modular_double "LinBox::EchelonFormDomain<Givaro::Modular<double>>":
+ ctypedef double Element
+ EchelonForm_Modular_double(Modular_double)
+- int rowReducedEchelon(DenseMatrix_Modular_double&, const DenseMatrix_Modular_double&)
+
+ cdef cppclass EchelonForm_Modular_float "LinBox::EchelonFormDomain<Givaro::Modular<float>>":
+ ctypedef float Element
+ EchelonForm_Modular_float(Modular_float)
+- int rowReducedEchelon(DenseMatrix_Modular_float, const DenseMatrix_Modular_float)
+
++ int reducedRowEchelon(DenseMatrix_Modular_double, const DenseMatrix_Modular_double)
++ int reducedRowEchelon(DenseMatrix_Modular_float, const DenseMatrix_Modular_float)
++
+ cdef extern from "linbox/solutions/rank.h" namespace "LinBox":
+ unsigned long & rank (unsigned long&, DenseMatrix_integer)
+ unsigned long & rank (unsigned long&, SparseMatrix_integer)
+@@ -185,7 +186,7 @@ cdef extern from "linbox/solutions/solve.h" namespace "LinBox":
+ Integer &,
+ SparseMatrix_integer &,
+ DenseVector_integer &,
+- Method.BlasElimination) except +
++ Method.DenseElimination) except +
+
+ DenseVector_integer& solve (DenseVector_integer &,
+ Integer &,
+diff --git a/src/sage/matrix/matrix_integer_sparse.pyx b/src/sage/matrix/matrix_integer_sparse.pyx
+index 7fa386eab7..5937720a03 100644
+--- a/src/sage/matrix/matrix_integer_sparse.pyx
++++ b/src/sage/matrix/matrix_integer_sparse.pyx
+@@ -1081,7 +1081,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
+ elif method == METHOD_WIEDEMANN:
+ linbox.solve(res[0], D, A[0], b[0], linbox.Method.Wiedemann())
+ elif method == METHOD_BLAS_ELIMINATION:
+- linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
++ linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
+ elif method == METHOD_SPARSE_ELIMINATION:
+ linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
+ elif method == METHOD_BLACKBOX:
+@@ -1192,7 +1192,7 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
+ if algo == METHOD_DEFAULT:
+ linbox.solve(res[0], D, A[0], b[0])
+ elif algo == METHOD_BLAS_ELIMINATION:
+- linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
++ linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
+ elif algo == METHOD_SPARSE_ELIMINATION:
+ linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
+ elif algo == METHOD_BLACKBOX:
+diff --git a/src/sage/matrix/matrix_modn_dense_double.pyx b/src/sage/matrix/matrix_modn_dense_double.pyx
+index c4b1a46444..4f140ad239 100644
+--- a/src/sage/matrix/matrix_modn_dense_double.pyx
++++ b/src/sage/matrix/matrix_modn_dense_double.pyx
+@@ -25,7 +25,7 @@ from sage.libs.linbox.givaro cimport \
+
+ from sage.libs.linbox.linbox cimport \
+ DenseMatrix_Modular_double as BlasMatrix, \
+- EchelonForm_Modular_double as EchelonFormDomain
++ reducedRowEchelon
+
+ from sage.libs.linbox.fflas cimport \
+ fgemm, fgemv, Det, Rank, ReducedRowEchelonForm, applyP, \
+diff --git a/src/sage/matrix/matrix_modn_dense_float.pyx b/src/sage/matrix/matrix_modn_dense_float.pyx
+index 89d1a94ab2..198896259b 100644
+--- a/src/sage/matrix/matrix_modn_dense_float.pyx
++++ b/src/sage/matrix/matrix_modn_dense_float.pyx
+@@ -24,7 +24,7 @@ from sage.libs.linbox.givaro cimport \
+
+ from sage.libs.linbox.linbox cimport \
+ DenseMatrix_Modular_float as BlasMatrix, \
+- EchelonForm_Modular_float as EchelonFormDomain
++ reducedRowEchelon
+
+ from sage.libs.linbox.fflas cimport \
+ fgemm, fgemv, Det, Rank, ReducedRowEchelonForm, applyP, \
+diff --git a/src/sage/matrix/matrix_modn_dense_template.pxi b/src/sage/matrix/matrix_modn_dense_template.pxi
+index 6a5e164ede..7eb70dae86 100644
+--- a/src/sage/matrix/matrix_modn_dense_template.pxi
++++ b/src/sage/matrix/matrix_modn_dense_template.pxi
+@@ -207,7 +207,6 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_
+ return 0,[]
+
+ cdef ModField *F = new ModField(<long>modulus)
+- cdef EchelonFormDomain *EF = new EchelonFormDomain(F[0])
+ cdef BlasMatrix *A = new BlasMatrix(F[0], <uint64_t>nrows, <uint64_t>ncols)
+ cdef BlasMatrix *E = new BlasMatrix(F[0], <uint64_t>nrows, <uint64_t>ncols)
+
+@@ -218,7 +217,7 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_
+ for j in range(ncols):
+ A.setEntry(i, j, <ModField.Element>entries[i*ncols+j])
+
+- cdef int r = EF.rowReducedEchelon(E[0], A[0])
++ cdef int r = reducedRowEchelon(E[0], A[0])
+ for i in range(nrows):
+ for j in range(ncols):
+ entries[i*ncols+j] = <celement>E.getEntry(i,j)
+@@ -232,7 +231,7 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_
+ ii = j+1
+ break
+
+- del F, A, E, EF
++ del F, A, E
+ return r, pivots
+
+ cdef inline celement *linbox_copy(celement modulus, celement *entries, Py_ssize_t nrows, Py_ssize_t ncols) except? NULL:
+@@ -265,7 +264,8 @@ cdef inline celement linbox_det(celement modulus, celement* entries, Py_ssize_t
+ cdef ModField *F = new ModField(<long>modulus)
+ cdef celement *cpy = linbox_copy(modulus, entries, nrows, ncols)
+ if nrows*ncols > 1000: sig_on()
+- d = <celement>Det(F[0], nrows, ncols, <ModField.Element*>cpy, ncols)
++ cdef ModField.Element det
++ d = <celement>Det(F[0], det, ncols, <ModField.Element*>cpy, ncols, <size_t*>NULL, <size_t*>NULL)
+ if nrows*ncols > 1000: sig_off()
+ sig_free(cpy)
+ del F
+diff --git a/src/sage/matrix/matrix_modn_sparse.pyx b/src/sage/matrix/matrix_modn_sparse.pyx
+index 241167ace4..8e65cbb532 100644
+--- a/src/sage/matrix/matrix_modn_sparse.pyx
++++ b/src/sage/matrix/matrix_modn_sparse.pyx
+@@ -1026,7 +1026,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
+ elif method == METHOD_WIEDEMANN:
+ linbox.solve(res[0], D, A[0], b[0], linbox.Method.Wiedemann())
+ elif method == METHOD_BLAS_ELIMINATION:
+- linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
++ linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
+ elif method == METHOD_SPARSE_ELIMINATION:
+ linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
+ elif method == METHOD_BLACKBOX:
+@@ -1137,7 +1137,7 @@ cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse):
+ if algo == METHOD_DEFAULT:
+ linbox.solve(res[0], D, A[0], b[0])
+ elif algo == METHOD_BLAS_ELIMINATION:
+- linbox.solve(res[0], D, A[0], b[0], linbox.Method.BlasElimination())
++ linbox.solve(res[0], D, A[0], b[0], linbox.Method.DenseElimination())
+ elif algo == METHOD_SPARSE_ELIMINATION:
+ linbox.solve(res[0], D, A[0], b[0], linbox.Method.SparseElimination())
+ elif algo == METHOD_BLACKBOX:
More information about the arch-commits
mailing list