-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Make "large multiplication" larger in coerce_actions.pyx #36789
Make "large multiplication" larger in coerce_actions.pyx #36789
Conversation
I see a failure on one machine, as reported at #35973. If you want a fake way to reproduce it, weaken the test: change |
Why not just make the |
I don't know why it was written that way originally. See #17844, which doesn't provide any explanation for the role of the randomness. |
I think we should also just make that element explicit as there isn't really any reason to test on a random element. |
Hi Travis, I'm taking a break from Sage for a while. If you want to make the relevant changes, I could review them, but I am not able to do more right now. |
No problem. Unfortunately with GH I can't push to your branch (without doing something complicated like as a PR to your branch). It can just wait until you are back from your (Sage?) vacation. |
@tscrim Now you should have the necessary privileges |
d1bf25f
to
aa02c4a
Compare
@mkoeppe Thank you. @jhpalmieri I added my change. If someone else could just quickly double-check my change, then this is a positive review. |
Documentation preview for this PR (built with commit aa02c4a; changes) is ready! 🎉 |
Marking as blocker so that it fixes the sporadic doctest failure, just seen again in https://github.com/sagemath/sage/actions/runs/7360378714/job/20036434575?pr=36938#step:11:9298 |
sagemathgh-36789: Make "large multiplication" larger in coerce_actions.pyx A doctest in coerce_actions.pyx tests whether "large multiplications can be interrupted". Depending on the random input and on the speed of the machine, that multiplication can happen too fast, and then the interrupt doesn't happen in time. So let's make the multiplication take longer. <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> This should fix sagemath#35973. In some testing: this multiplication uses `P = E.random_element()` where `E` is some elliptic curve. If this happens to be `(0:1:0)`, then on at least one machine, the multiplication is completed too quickly. We could reject that particular point, or we can increase the multiplication by a factor of 10. This PR uses the second approach. <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [X] The title is concise, informative, and self-explanatory. - [X] The description explains in detail what this PR is about. - [X] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36789 Reported by: John H. Palmieri Reviewer(s):
sagemathgh-36789: Make "large multiplication" larger in coerce_actions.pyx A doctest in coerce_actions.pyx tests whether "large multiplications can be interrupted". Depending on the random input and on the speed of the machine, that multiplication can happen too fast, and then the interrupt doesn't happen in time. So let's make the multiplication take longer. <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> This should fix sagemath#35973. In some testing: this multiplication uses `P = E.random_element()` where `E` is some elliptic curve. If this happens to be `(0:1:0)`, then on at least one machine, the multiplication is completed too quickly. We could reject that particular point, or we can increase the multiplication by a factor of 10. This PR uses the second approach. <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [X] The title is concise, informative, and self-explanatory. - [X] The description explains in detail what this PR is about. - [X] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36789 Reported by: John H. Palmieri Reviewer(s):
A doctest in coerce_actions.pyx tests whether "large multiplications can be interrupted". Depending on the random input and on the speed of the machine, that multiplication can happen too fast, and then the interrupt doesn't happen in time. So let's make the multiplication take longer.
This should fix #35973.
In some testing: this multiplication uses
P = E.random_element()
whereE
is some elliptic curve. If this happens to be(0:1:0)
, then on at least one machine, the multiplication is completed too quickly. We could reject that particular point, or we can increase the multiplication by a factor of 10. This PR uses the second approach.📝 Checklist
⌛ Dependencies