Test output littered with flint exceptions
See https://github.com/Nemocas/Nemo.jl/actions/runs/13058194155/job/36434421271?pr=2011#step:6:1004.
Have not looked into it, but it appears they are coming from the conformance tests.
Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.Test Summary: | Pass Total Time
zzModRingElem.conformance_tests | 347783 347783 21.3s
Of course this needs to be looked into (I'll try to get to it), but in the meantime I wonder: should we (and can we) perhaps turn these into Julia exceptions? Then we'd notice this kind of problem immediately. And isn't it arguably the right thing to do? If not, what's the point of printing the message in the first place
It looks like https://github.com/Nemocas/Nemo.jl/pull/1994 is the cause of this.
To test this, just run flint/nmod-test.jl.
julia> R, = residue_ring(ZZ, 2^10)
(Integers modulo 1024, Map: ZZ -> R)
julia> Rx, (x, y) = R[:x, :y]
(Multivariate polynomial ring in 2 variables over R, zzModMPolyRingElem[x, y])
julia> a = 534*x^2*y^2
534*x^2*y^2
julia> b = 264*x^3*y^3 + 485*x^3 + 310*x^2*y + 351*x*y^2 + 780*x
264*x^3*y^3 + 485*x^3 + 310*x^2*y + 351*x*y^2 + 780*x
julia> try divides(a, b); catch fl; end
Flint exception (Impossible inverse):
nmod_mpoly_divides: leading coefficient is not invertible.
OK, this is just the usual error message thrown by flint. Another example would be
julia> try; @ccall Nemo.libflint.n_invmod(2::UInt, 4::UInt)::UInt; catch; end
Flint exception (Impossible inverse):
Cannot invert modulo 2*2
I thought we were better at catching. I suggest adding a callback via pointer that would allow us to set this to some julia function to throw an error - and catch it properly without cluttering the screen
I thought we were better at catching. I suggest adding a callback via pointer that would allow us to set this to some julia function to throw an error - and catch it properly without cluttering the screen
This will hopefully work once https://github.com/flintlib/flint/pull/2279 is available to Nemo.