-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Multimodular echelon form over cyclotomic fields fails #10281
Comments
comment:1
This is not just an issue with cyclotomic linear algebra. I'm doing some computations of modular symbols spaces of weight 4 with trivial character, and just hit "no previous prime". We need real 64-bit mod-p linear algebra to fix this issue. We need more primes! |
comment:2
This turned out to be easier to resolve than it might have otherwise been, since Burcin Erocal and Martin Albrecht had improved matrices modn so they can now handle a modulus up to 2^23. However, they hadn't adapted the chinese remainder theorem infrastructure to take this into account. I've written code that makes it so for dense linear algebra we have all the primes up to 2^23 at our disposal, instead of just the primes up to 46341. There are more, bigger, and better primes up to 2^23:
The upshot is that in various contexts we can deal with answers with up to 3.5 million digits, instead of only 20,025 digits, which was pretty feeble. Moreover, since the linear algebra is just as fast or faster, and we start with the biggest prime we can, certain linear algebra computations should be much faster with this new code. I did not fix anything for sparse matrices, except avoiding introducing a major bug (caught by doctests). See #12679 for sparse matrices, as this should be another ticket. Also, obviously, this fix is only a partial fix, and we'll someday have to deal with running out of primes on huge problems. But it'll take around 150 times as long to ever reach such problems, for what it is worth. Note that it would probably be trivial to change the old matrix_modn_dense code to use 64-bit ints, hence support a modulus up to 2^31. However the new Erocal-Albrecht code can't go beyond 2^23. So that code -- which they deprecated -- should probably be resurrected. That's a project for later. |
comment:4
Note - the patch is bigger than expected since I fixed some of the formatting of docstrings in a file, just because. |
comment:5
Apply trac_10281-sage-5.0-beta9.patch (for the patchbot) I want the latest version to be tested on a variety of machines. In principle, the patch looks good. It would be create if someone had a 32-bit system to test this, though. |
comment:6
Looks good to me. The only comment I have is that the changes adding
are unnecessary, declaring it as an unsigned long in Cython is sufficient. |
Attachment: trac_10281-sage-5.0-beta9.patch.gz This patch is for beta9. I've made the one change that robertwb suggests to this patch (the formal cython change) |
comment:7
Replying to @sagetrac-mraum:
I've started a 32-bit Ubuntu 10.4 virtual machine on boxen, and I'm running tests on it. I'll report back. |
comment:8
I tested on 32-bit and it works, but only after making a 1-line change to the Linbox spkg (which isn't needed on 64-bit, evidently). I've posted the new linbox spkg here:
So to apply this ticket:
William |
comment:10
I have tested the spkg, and it is completely ok. The commit message could be a bit more informative, but since it refers to the ticket, it's ok also. William, do you want to make the change suggested by Robert? Personally, I would keep the extern statements for clearness (they obviously don't do any harm). If you don't intend to, then I would set this to positive review, so that everything can be run on the build farm. |
This comment has been minimized.
This comment has been minimized.
comment:11
Replying to @sagetrac-mraum:
I did make the changes and updated the second patch. I didn't bother with the beta2 patch, since that one will never get applied by the release manager.
Please do. Thanks! I have to point out that I was running some big modular symbols computations over cyclotomic fields and found some "not enough primes" issues even with this patch. That's because we only get to use split primes. So it will be very important to revive the old matrix_modn_dense code, but using a 64-bit int instead of 32-bit, so we get modulo up to |
comment:12
Great! Let me know when you have made progress on #4968. I hope to have time to review it. |
Author: William Stein |
Reviewer: Martin Raum |
This comment has been minimized.
This comment has been minimized.
Merged: sage-5.0.beta14 |
The following example comes from Eisenstein series. It leads to previous_prime being called with invalid arguments.
Apply:
Install:
Component: linear algebra
Keywords: cyclotomic, echelon
Author: William Stein
Reviewer: Martin Raum
Merged: sage-5.0.beta14
Issue created by migration from https://trac.sagemath.org/ticket/10281
The text was updated successfully, but these errors were encountered: