Closed bapike closed 8 years ago
Mike, you often build the debug version, although on the Mac mostly. Is there some reason you haven't seen the same problem?
Sorry, when I said "tests" I meant "examples from Macaulay2Doc". Here's the output of ls *error* |xargs tail -n 4
run in the .../Macaulay2Doc/example-output directory:
==> _ambient_lp__Galois__Field_rp.errors <==
i1 : F = GF(25,Variable=>a)
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _benchmark.errors <==
i1 : benchmark "sqrt 2p100000"
mulmod_2expp1_basecase.c:51: GNU MP assertion failed: !((xp) + (n) > (yp) && (yp) + (n) > (xp))
Aborted
==> _coefficient.errors <==
i1 : R = GF(25,Variable=>a)[x,y,z];
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _degree__Length.errors <==
i4 : degreeLength (GF 9)
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _finite_spfields.errors <==
i1 : F = GF(81,Variable=>a)
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _generators_lp__Module_rp.errors <==
i1 : R = GF(8,Variable=>a)
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> ___G__F.errors <==
i1 : A = GF(3,2,Variable=>b);
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _is__Field.errors <==
i3 : isField GF(2,3)
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _is__Polynomial__Ring.errors <==
i4 : isPolynomialRing(GF(2)[x,y, SkewCommutative => true])
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _is__Ring.errors <==
i5 : isRing(GF(2,3)[x,dx, WeylAlgebra => {x => dx}])
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _map_lp__Module_cm__Z__Z_cm__Function_rp.errors <==
i1 : R = GF(9,Variable=>a)[x,y,z];
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _numgens_lp__Ring_rp.errors <==
i12 : K = GF(9,Variable=>a)
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _random_lp__Type_rp.errors <==
i3 : tally for i to 100 list random GF 11
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _random_spand_spgeneric_spmatrices.errors <==
i1 : R = GF(3^2,Variable => a);
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> ___Ring__Element_sp_sl_sp__Ring__Element.errors <==
i2 : R = GF(9,Variable=>a);
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> ___Ring_sp_sl_sp__Ideal.errors <==
i7 : D = GF(9,Variable=>a)[x,y]/(y^2 - x*(x-1)*(x-a))
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> ___Singular_sp__Book_sp1.1.8.errors <==
i10 : A2 = GF(8,Variable=>a)
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> ___Singular_sp__Book_sp1.1.9.errors <==
i5 : C = GF(8)[x,y,z];
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
==> _solve.errors <==
i6 : kk = GF(25)
M2-binary: ctx_init_conway.c:45: _fq_nmod_ctx_init_conway: Assertion `*cp == -1' failed.
Aborted
The second error (_benchmark.errors) is known in #35.
Using git-bisect suggests that for the _fq_nmod_ctx_init_conway
issue, the first bad commit was 28a128a76798f1d7b7f1e037046c2c46f23ef32e, but that's where the assertion in question was added.
Thanks, I'm assigning that to myself.
Any FLINT release containing commit a407a40e01aaf1a5b050c813ae65c10eb1148cc1 contains my patch, so you could probably succeed by using the latest FLINT release, if it includes that. If I introduced a bug in DEBUG mode, they must have fixed it by now, since that was in July.
Another idea is to just remove the offending assertion.
Let me know if it works.
For GF(p^d), the Conway polynomial has degree d, so d+1 coefficients. The CPimport array has all d+1 coefficients, but M2's patch to flint-2.4.5 and the flint commit you mentioned only pull d coefficients and hard-code the fact that the polynomial should be monic. At the line containing the assert, the pointer is pointing to the monic coefficient (i.e., 1); the following entry is -1 and indicates the separator between Conway polynomials. The flint code doesn't have any asserts, so there haven't been any failures.
So, the only bug is that the assertion fails. I can send you a pull request that comments out the asserts.
But, I don't think anyone's been using the debug builds.
Generally, I use the debug builds in M2 quite a bit. But I hadn’t noticed this problem.
— mike
On Nov 19, 2015, at 11:54 AM, Brian Pike notifications@github.com wrote:
For GF(p^d), the Conway polynomial has degree d, so d+1 coefficients. The CPimport array has all d+1 coefficients, but M2's patch to flint-2.4.5 and the flint commit you mentioned only pull d coefficients and hard-code the fact that the polynomial should be monic. At the line containing the assert, the pointer is pointing to the monic coefficient (i.e., 1); the following entry is -1 and indicates the separator between Conway polynomials. The flint code doesn't have any asserts, so there haven't been any failures.
So, the only bug is that the assertion fails. I can send you a pull request that comments out the asserts.
But, I don't think anyone's been using the debug builds.
— Reply to this email directly or view it on GitHub https://github.com/Macaulay2/M2/issues/354#issuecomment-158116968.
I pulled a7cdee1fafb57cd3a62fcf94293a066d1971281a and tried to do a build on Debian 8 with these parameters:
It fails to build because DEBUG is defined via the compiler calls and
flint-2.4.5/fmpz_factor/factor_pp1.c
has:Changing this to
allows the build to finish. However, about 18 tests fail with the message:
Picking one of these, the message is reproducible by just running
in a debug build of Macaulay2. GDB says:
I think the failed assert is from the M2 patch to flint.