-
Notifications
You must be signed in to change notification settings - Fork 13
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
Allow tracking several Statistics during the computation #4
Comments
This and #8 are top priority |
I don't have much knowledge of the f4 algorithm but do you have a recommendation for a quick way to measure progress? I just want to get a feel for when the problem becomes infeasible. |
Do you mean some kind of progress bar ? |
Yeah it doesn't need to be that advanced but just somewhere I can print an iterator or something of the like to understand the progress |
That's a cool idea! Ive never heard anyone doing that with Groebner bases before; I'll investigate what can be done 😄 |
@aabouman The simplest solution would be to compute the basis incrementally, starting from the basis of
Something like julia> function iterativegroebner(system)
gb = [system[1]]
for i in 2:length(system)
push!(gb, system[i])
@info "$i/$(length(system)) step"
@time gb = Groebner.groebner(gb)
end
gb
end Which produces # system noon with 8 polynomials
julia> system = Groebner.change_ordering(Groebner.noonn(8), :degrevlex)
julia> iterativegroebner(system);
[ Info: 2/8 step
0.000816 seconds (2.15 k allocations: 940.922 KiB)
[ Info: 3/8 step
0.002860 seconds (14.05 k allocations: 2.932 MiB)
[ Info: 4/8 step
0.016764 seconds (64.50 k allocations: 8.450 MiB)
[ Info: 5/8 step
0.085297 seconds (262.17 k allocations: 30.699 MiB)
[ Info: 6/8 step
0.543022 seconds (1.18 M allocations: 151.607 MiB, 5.17% gc time)
# e.g., stop somewhere here, when the time goes up
[ Info: 7/8 step
3.378745 seconds (4.55 M allocations: 644.938 MiB, 10.05% gc time)
[ Info: 8/8 step
13.478732 seconds (13.13 M allocations: 1.904 GiB, 5.44% gc time) This will be slower in general, but allows you to stop earlier, when the time on the current step becomes too large julia> @time groebner(system);
9.691641 seconds (11.32 M allocations: 1.458 GiB, 6.46% gc time)
julia> iterativegroebner(system) == groebner(system)
true Other than that, F4 is not very suitable for tracking the progress, since the computation times can (and usually will) blow up unexpectedly. I will think about it though |
That's funny I had hacked together something similar where I just added additional polynomials bit by bit. Thanks so much for your help! |
No description provided.
The text was updated successfully, but these errors were encountered: