-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update M4RI to newest upstream release #9475
Comments
comment:1
I've uploaded an SPKG to http://sage.math.washington.edu/home/malb/spkgs/libm4ri-20100701.spkg This SPKG also takes care of #9381 (SAGE_FAT_BINARY not being respected) and the M4RI part of #9281 (spkg-check) |
comment:2
I've run the M4RI self test (not the Sage test suite) on the following machines:
|
comment:3
can be removed.
|
comment:5
Replying to @sagetrac-mariah:
Fixed.
Fixed.
We never use SSE3, but yeah all checks for SSEx instructions are suppressed in that case.
This is because I am upstream and wanted to wait for portability issues before putting the release on the website. I'm putting it online now, if that makes your life easier. |
comment:6
See and http://bitbucket.org/malb/m4ri/wiki/M4RI-20100701 for the new upstream release. |
comment:7
The changes to |
comment:8
|
comment:9
I'd suggest adding the (standard) section Special Update/Build Instructions to
I've built a p1 spkg with the above mentioned files removed: 392KB vs. 1.2MB If there are no dependencies on Sage packages (which is the case here), we don't need to add Perhaps touch Upstream notes:
Tests in progress, Leif |
comment:10
I've only installed the new package (dated July 13th) and applied the patch, i.e. did not build Sage from scratch, and haven't (yet) run the testsuite. |
comment:11
Shame on me I missed that one: ./spkg-install: line 47: [x: command not found if ["x$SAGE_FAT_BINARY" = "xyes"]; then
SSE2_SUPPORT="--disable-sse2"
else
SSE2_SUPPORT=""
fi should be if [ "x$SAGE_FAT_BINARY" = "xyes" ]; then
... Note that On both of the above systems, the testsuite passed without errors. (I reinstalled the package(s) with |
comment:12
Just let me know if I should provide (a) reviewer patch(es) to the spkg (after a commit to the changes not yet checked in); I cannot upload an updated spkg to sage.math though. Leif |
comment:13
Replying to @nexttime:
It's strange that there was an autom4te.cache, since I rm it in my release script. I'm okay with these changes. |
comment:14
Leif, I'd appreciate if you could update SPKG according to your suggestions, I'm okay with them all. If you upload the SPKG somewhere or send it my way I can upload it to sage.math. |
comment:15
Replying to @malb:
Ok, I'll create a cumulative spkg patch and a "stripped-down" p1 package in a few hours and then mail you both. (I assume your .ac.uk e-mail address in SPKG.txt is still appropriate as upstream contact.) Currently running stress-test builds of 4.5.rc1... ;-) Leif |
comment:16
Yes, that's still current, however martinralbrecht@ googleblablabla might be current for a longer time. Thanks! |
Attachment: trac_9475-libm4ri-20100701.p1-based_on_p0.patch.gz You have to commit Martin's changes ("p0") first to apply this. |
comment:17
Patch for p1 Sage package is up. Remember to commit Martin's changes (of July 13th) first before you apply this patch. (This patch does not remove the unnecessary files in (Link to) New libm4ri-20100701.p1.spkg is on the way. Tested with both 4.5.rc0 and rc1 (Ubuntu 9.04 x86_64). Sorry for the delay. -Leif |
This comment has been minimized.
This comment has been minimized.
comment:33
Replying to @qed777:
Done, but now we have yet another attachment since I couldn't replace Martin's. (I would have thought his patch's comment was sufficient to conclude that the patch has to be applied to the Sage library repository... ;-) ) |
comment:34
Note: I haven't merged this ticket into 4.5.3.alpha0, because I noticed some segfaults that appear to stem from the new package and/or patch, when I doctested various trial alpha0s on sage.math. At the moment, it seems best to put out a 4.5.3.alpha0 with passing doctests and base on this any necessary efforts to merge the new M4RI into alpha1. |
comment:35
Of course, all long tests now pass (well, there are no reproducible failures) on sage.math with 4.5.3.alpha0 + #9475, so it seems no new efforts are necessary. I'm checking bsd, redhawk, and t2 now. |
comment:37
There definitely is a bug in this new M4RI, I do get SIGSEGVs on my new laptop. I'll investigate. |
comment:38
This is where pbori.pyx crashes for me. I installed a new GCC today, so maybe that's to blame? |
comment:39
I think I got it: TheTrac macro PolyBoRi SPKG in 4.5.2 ships its own M4RI (and Boost) which conflicts with this new M4RI SPKG, thus since Leif removed this redundant copy of M4RI in the PolyBoRi, it works in 4.5.3.alpha0 but not before. |
comment:40
Replying to @malb:
LOL! (Sometimes little clean-ups make more sense than expected...) |
comment:41
It seems this ticket is incompatible with#9717. On my laptop I always get SIGSEGVs in pbori.pyx |
comment:42
I tracked down the issue. The cause is some assumptions inTrac macro PolyBoRi about M4RI which are not met anymore. This ticket can go in I say |
comment:43
Actually, this ticket can only go in if a fix forTrac macro PolyBoRi is also accepted, cf. #9717 |
comment:44
Minor thing: the documentation for rank still says: On average 'lqup' should be faster than 'm4ri' and hence it is |
comment:45
#9717 has an updated, fixedTrac macro PolyBoRi SPKG |
comment:46
The updated patch only replaces the mention of LQUP with PLS |
comment:47
Should someone review the latest changes? |
comment:48
The only change in the new version compared to the previous version of m4ri_new_version.v2.patch is that one mention of LQUP was replaced by PLS in a docstring. That's all, this is why I didn't reset the status. |
comment:49
Replying to @malb:
Not 100%: --- m4ri_new_version.v2.patch.orig 2010-08-07 09:00:21.000000000 +0200
+++ m4ri_new_version.v2.patch 2010-08-12 20:50:56.000000000 +0200
@@ -1,14 +1,14 @@
# HG changeset patch
# User Martin Albrecht <[email protected]>
# Date 1277764034 -3600
-# Node ID 3365789479e6d70cb1930b2e97c7874cbd3310db
-# Parent ba36200d8a2f844179785580245fd95aa6401a51
+# Node ID 3b116dd35a84e0b6bd8ea12a732b8fa1fbda796f
+# Parent 0bb69a98789215c64a81c4602f46a50c0aeca5f0
#9475 Adapts Sage library interface to new M4RI API (libm4ri-20100701)
-diff -r ba36200d8a2f -r 3365789479e6 module_list.py
---- a/module_list.py Fri Jun 25 10:05:59 2010 +0100
+diff -r 0bb69a987892 -r 3b116dd35a84 module_list.py
+--- a/module_list.py Tue Aug 10 13:46:10 2010 +0100
+++ b/module_list.py Mon Jun 28 23:27:14 2010 +0100
-@@ -783,7 +783,7 @@
+@@ -807,7 +807,7 @@
Extension('sage.matrix.matrix_mod2_dense',
sources = ['sage/matrix/matrix_mod2_dense.pyx'],
libraries = ['gmp','m4ri', 'gd', 'png12', 'z'],
@@ -17,7 +17,7 @@
Extension('sage.matrix.matrix_modn_dense',
sources = ['sage/matrix/matrix_modn_dense.pyx'],
-@@ -971,7 +971,7 @@
+@@ -995,7 +995,7 @@
Extension('sage.modules.vector_mod2_dense',
sources = ['sage/modules/vector_mod2_dense.pyx'],
libraries = ['gmp','m4ri', 'png12', 'gd'],
@@ -26,8 +26,8 @@
Extension('sage.modules.vector_rational_dense',
sources = ['sage/modules/vector_rational_dense.pyx'],
-diff -r ba36200d8a2f -r 3365789479e6 sage/libs/m4ri.pxd
---- a/sage/libs/m4ri.pxd Fri Jun 25 10:05:59 2010 +0100
+diff -r 0bb69a987892 -r 3b116dd35a84 sage/libs/m4ri.pxd
+--- a/sage/libs/m4ri.pxd Tue Aug 10 13:46:10 2010 +0100
+++ b/sage/libs/m4ri.pxd Mon Jun 28 23:27:14 2010 +0100
@@ -141,6 +141,9 @@
# reduced row echelon form from upper triangular form
@@ -60,8 +60,8 @@
# reduced row echelon form using PLUQ factorization
cdef long mzd_echelonize_pluq(mzd_t *A, int full)
-diff -r ba36200d8a2f -r 3365789479e6 sage/matrix/matrix_mod2_dense.pyx
---- a/sage/matrix/matrix_mod2_dense.pyx Fri Jun 25 10:05:59 2010 +0100
+diff -r 0bb69a987892 -r 3b116dd35a84 sage/matrix/matrix_mod2_dense.pyx
+--- a/sage/matrix/matrix_mod2_dense.pyx Tue Aug 10 13:46:10 2010 +0100
+++ b/sage/matrix/matrix_mod2_dense.pyx Mon Jun 28 23:27:14 2010 +0100
@@ -1010,15 +1010,16 @@
# * Matrix windows -- only if you need strassen for that base
@@ -116,7 +116,28 @@
k = 0
_sig_on
-@@ -1681,7 +1691,7 @@
+@@ -1106,6 +1116,20 @@
+ self.cache('rank', r)
+ self.cache('pivots', self._pivots())
+
++ elif algorithm == 'top':
++
++ self.check_mutability()
++ self.clear_cache()
++
++ _sig_on
++ mzd_top_echelonize_m4ri(self._entries, 0)
++ r = 0
++ _sig_off
++
++ self.cache('in_echelon_form',True)
++ self.cache('rank', r)
++ self.cache('pivots', self._pivots())
++
+ elif algorithm == 'linbox':
+
+ #self._echelonize_linbox()
+@@ -1681,7 +1705,7 @@
sage: float(d)
0.63184899999999999
sage: A.density(approx=True)
@@ -125,7 +146,7 @@
sage: float(len(A.nonzero_positions())/1000^2)
0.63184899999999999
"""
-@@ -1691,7 +1701,7 @@
+@@ -1691,18 +1715,18 @@
else:
return matrix_dense.Matrix_dense.density(self)
@@ -134,7 +155,11 @@
"""
Return the rank of this matrix.
-@@ -1702,7 +1712,7 @@
+- On average 'lqup' should be faster than 'm4ri' and hence it is
++ On average 'pls' should be faster than 'm4ri' and hence it is
+ the default choice. However, for small - i.e. quite few
+ thousand rows & columns - and sparse matrices 'm4ri' might be
+ a better choice.
INPUT:
@@ -143,7 +168,7 @@
EXAMPLE::
-@@ -1722,10 +1732,10 @@
+@@ -1722,10 +1746,10 @@
cdef mzd_t *A = mzd_copy(NULL, self._entries)
cdef mzp_t *P, *Q
@@ -156,7 +181,7 @@
mzp_free(P)
mzp_free(Q)
elif algorithm == 'm4ri':
-@@ -2060,9 +2070,9 @@
+@@ -2060,9 +2084,9 @@
mzp_free(q)
return B,P,Q
@@ -168,7 +193,7 @@
INPUT:
A -- matrix
-@@ -2074,14 +2084,14 @@
+@@ -2074,14 +2098,14 @@
EXAMPLE::
@@ -185,7 +210,7 @@
sage: LU
[1 0 0 1]
[1 1 0 0]
-@@ -2095,7 +2105,7 @@
+@@ -2095,7 +2119,7 @@
[0, 1, 2, 3]
sage: A = random_matrix(GF(2),1000,1000)
@@ -194,7 +219,7 @@
True
"""
cdef Matrix_mod2_dense B = A.__copy__()
-@@ -2104,15 +2114,15 @@
+@@ -2104,15 +2128,15 @@
if algorithm == 'standard':
_sig_on |
comment:50
Argh, I'm an idiot! I'll update the patch, the 'top' stuff must be removed |
Sage library patch - needed to comply with new M4RI API (libm4ri-20100701). (Contains ticket number; apply only this one.) |
comment:51
Attachment: m4ri_new_version.v2.patch.gz Replying to @malb:
Nevertheless, passed all long tests with Sage 4.5.3.alpha0 and PolyBoRi 0.6.4.p4 from #9717 on Fedora 13 x86 (Pentium 4 Prescott, gcc 4.4.4). The newly uploaded patch contains only the desired changes. |
Merged: sage-4.5.3.alpha0 |
Changed merged from sage-4.5.3.alpha0 to sage-4.5.3.alpha1 |
The new version improves elimination to some extent, comes with a cleaner API and has an option to suppress SSE instructions.
Note to the release managers
Apply only m4ri_new_version.v2.patch to the Sage library when merging the new M4RI spkg.
Upstream: Not yet reported upstream; Will do shortly.
CC: @sagetrac-mariah
Component: packages: standard
Keywords: M4RI, spkg-check
Author: Martin Albrecht, Leif Leonhardy
Reviewer: Leif Leonhardy, David Kirkby, Mariah Lenox
Merged: sage-4.5.3.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/9475
The text was updated successfully, but these errors were encountered: