-
Notifications
You must be signed in to change notification settings - Fork 126
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
Difficulties with radical computation #3711
Comments
I'm wondering whether there is some deeper issue with calls to Singular routines. Also the timeout of the tests in #3705 suggests this. Plus I'm sure that the latter went through on my machine before I updated to the latest master today. |
I cannot reproduce this result:
|
On Wed, May 15, 2024 at 06:35:22AM -0700, Wolfram Decker wrote:
I cannot reproduce this result:
julia> @time radical(I);
0.000009 seconds
julia> @time is_radical(I)
0.000012 seconds
true
The radical is cached on the ideal, hence immedaite on 2nd call
It takes 12sec for me to get it
…
--
Reply to this email directly or view it on GitHub:
#3711 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
I just tried this again on latest master and still the computation does not finish: R, (x,y,z,v,w) = QQ[:x, :y, :z, :v, :w]
g = QQMPolyRingElem[z^3-z*w^8-z - v^2, 3*z^2-w^8-1, v, z*w, x^8+1, -x^6+x^4-x^2-y^2]
I = ideal(R, g)
@time radical(I) I'm running on Ubuntu, |
Update: I investigated this a bit with @fieker and it seems that on my machine julia decides to delegate this to one of many further processes. Eventually the computation finishes with
It seems that almost no memory is used for this computation despite the long duration. This might be due to allocations in other processes not being counted? Further version info on my machine:
In Singular the same computation takes only fractions of a second. |
I can confirm these timings. (The OSCAR ones.) |
I cannot reproduce on macOS. Just as a breadcrumb, when it hangs on Linux, it seems to be hanging in
This would be
but I have no clue about Singular internals. |
Next breadcrumb: I cannot reproduce the error with Oscar 1.0.2. There it behaves normal. We could produce a Singular.jl only example and then do a bisect. |
We have discussed this over here in KL a bit. I did not understand the issue 100%, but @hannes14 said something that certain library routines try to fork extra processes and do computations in parallel. Doing this from inside Oscar actually spawns various new julia processes and, as it seems, the communication to these processes is not handled correctly. So it is a game of luck whether you get a result at all and, according to @fieker, if you do, then most of the time is spent on waiting for other processes to finish. |
@joschmitt what do you mean with "The OSCAR ones" ? On macOS with current OSCAR master 3927f4b, like for @thofma, all of this is fast (on an M1 MacBook Pro):
Running this on tutulla (a Linux server with AMD CPU in Kaiserslautern), it indeed seems to take minutes... But here is a funny thing: when I abort this by pressing Ctrl-C a couple times, and then (in the same session) enter all inputs again, it is fast, and stays fast! So I now got this:
|
@hannes14 @HechtiDerLachs so can we tell Singular to not try to spawn additional processes? |
@hannes14 agreed to look into this. But as far as I understand, there is no simple global flag for that and you really need to adjust the actual library code for that. |
I meant that it also takes ~200 seconds for me with OSCAR master (and I did not try Singular). |
What about the previous Singular/Singular.jl version, where it just works? Is it just luck, that the example works with Oscar 1.0.2 or did something change? Edit: Nevermind, it has the same problems I think. |
I am wondering whether the following call to Load this polynomial into Oscar via f = load("f.txt")
I = ideal(parent(f), f)
is_prime(I) The computation does not finish for me. My current versions are
The problem did not occur before my latest updates of Hecke and AA today, i.e. the same code was running without difficulties before. I'm on a custom branched which is rebased on today's master branch. |
The same computation using CoCoA took less than 1s... unless I have misunderstood. |
Singular also can compute it in less than 1 s, Also tried in a loop (so it does not depend on a "bad random" choice). |
On Wed, May 22, 2024 at 04:59:36AM -0700, JohnAAbbott wrote:
> ```julia
> R, (x,y,z,v,w) = QQ[:x, :y, :z, :v, :w]
> g = QQMPolyRingElem[z^3-z*w^8-z - v^2, 3*z^2-w^8-1, v, z*w, x^8+1, -x^6+x^4-x^2-y^2]
> I = ideal(R, g)
> @time radical(I)
> ```
The same computation using CoCoA took less than 1s... unless I have misunderstood.
It's trying to do stuff in parallel again
… --
Reply to this email directly or view it on GitHub:
#3711 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
@hannes14 I just tried this with the new Singular.jl. On my macBook, I now got a crash after trying a bunch of radical computations (though to be fair, this issue may have existed before, I just didn't try it ):
On Linux, I tried on tutulla, and... the original issue doesn't seem to be fixed? Or at least not fully, as it is slower by a factor 10 compared to my MacBook
Bot sets of timings come from "hot" sessions, i.e. I'd run the computation before in the session to everything was already compiled. |
@hannes14 reported that the issue is resolved on his machine 0.23.2. But as noted above (and just re-confirmed) on e.g. tutulla it still takes 40 seconds, with at time 50 processes running, while on my macOS laptop it finishes in 3-4 seconds. That suggests to me that there is still an issue on linux. Out of curiosity: @HechtiDerLachs is there any change for you? |
After updating Oscar for roughly 45 minutes the original example now finishes within roughly 12 seconds for me on Ubuntu. But that is still too much, given that within Singular the computation takes < 1s. It's progress, however. Thanks! |
On Tutualla (a Linux machine with 1.5 TB ram, and two AMD EPYC 9554 64-core CPUs), the minimized example
still takes 30 seconds, while on my MacBook it is just 8 seconds -- though note how in May it was only 3.5 seconds (so it got worse). So I really don't think this issue is fully resolved, esp. since @HechtiDerLachs reports that doing this in Singular directly takes less than a second. How can we proceed? |
A quick check with help from @hannes14 shows that the slow part is |
@HechtiDerLachs can you try the timing again with current master? Also, as a variant, try if you set the environment variable BTW could someone please post the supposedly "equivalent" Singular code used for comparisons, so that (a) I can also use it on other machines to test, and (b) we can verify they really are equivalent. |
supposedly "equivalent" Singular code |
Do
I = load("non_radical_ideal.txt")
with this file.For me
radical(I)
does not finish, even though, in my opinion, the ideal is rather tame.Interestingly, the following works:
So computing the radical as the intersection of associated primes works. This seems wrong, doesn't it? Also @simonbrandhorst has reported difficulties when computing radicals today. Has there been some regression?
@hannes14 ? @wdecker ?
The text was updated successfully, but these errors were encountered: