#13947: zn_poly segfaults during tuning and tests on OS X and Cygwin when built
on
a busy system
-------------------------------------------+--------------------------------
Reporter: jpflori | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-5.8
Component: packages | Resolution:
Keywords: zn_poly spkg cygwin osx | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------+--------------------------------
Comment (by leif):
Replying to [comment:20 leif]:
> Replying to [comment:19 fbissey]:
> > Ok, leif, can you put your recipe to trigger the failure in the
summary?
>
> Oh, I don't recall right now (searching logs ...), but I think I just
faked the values in `tuning.c` (generated by `tune/tune[.c]`) by modifying
`test/test.c` (i.e., added something like `{ int i; for (i=2;i<=64;i++)
tuning_info[i].mul_fft_thresh=1; }` to the beginning of `test/test.c`(?)'s
`main()`).
Yep:
{{{
#!patch
--- zn_poly-0.9.p5/src/test/test.c.orig 2008-09-19 17:37:47.000000000
+0200
+++ zn_poly-0.9.p5/src/test/test.c 2013-01-13 20:33:11.919633442
+0100
@@ -209,6 +209,11 @@
int all_success = 1, any_targets = 0, quick = 0, success, i, j;
+#if 1 || defined(FAKE_THRESHOLDS)
+ for(i=2;i<=64;i++)
+ tuning_info[i].mul_fft_thresh=1; // always (I think)
+#endif
+
for (j = 1; j < argc; j++)
{
if (!strcmp (argv[j], "-quick"))
}}}
I've also found
{{{
#!patch
--- zn_poly-0.9.p5/src/test/nuss-test.c.orig 2008-09-19
17:37:47.000000000 +0200
+++ zn_poly-0.9.p5/src/test/nuss-test.c 2013-01-13 20:25:40.629633300
+0100
@@ -59,6 +59,16 @@
ref_zn_array_scalar_mul (res, res, n, x, mod);
int success = !zn_array_cmp (ref, res, n);
+#if 1 || defined(TEST_VERBOSE)
+ if(!success)
+ {
+ fprintf(stderr,
+ "testcase_nuss_mul(): comparison FAILED: lgL=%u (n=%lu) sqr=%d
mod.m=%lu mod.bits=%d\n",
+ lgL, n, sqr,
+ mod->m, mod->bits);
+ }
+#endif
+
pmfvec_clear (vec2);
pmfvec_clear (vec1);
@@ -67,7 +77,7 @@
if (!sqr)
free (buf2);
free (buf1);
-
+
return success;
}
@@ -84,6 +94,7 @@
zn_mod_t mod;
for (i = 0; i < num_test_bitsizes; i++)
+#if 0
for (lgL = 2; lgL <= (quick ? 11 : 13) && success; lgL++)
for (trial = 0; trial < (quick ? 1 : 5) && success; trial++)
{
@@ -92,6 +103,16 @@
success = success && testcase_nuss_mul (lgL, 1, mod);
zn_mod_clear (mod);
}
+#else /* don't stop upon first failure: */
+ for (lgL = 2; lgL <= (quick ? 11 : 13) /* && success */; lgL++)
+ for (trial = 0; trial < (quick ? 1 : 5) /* && success */; trial++)
+ {
+ zn_mod_init (mod, random_modulus (test_bitsizes[i], 1));
+ success &= testcase_nuss_mul (lgL, 0, mod);
+ success &= testcase_nuss_mul (lgL, 1, mod);
+ zn_mod_clear (mod);
+ }
+#endif
return success;
}
}}}
to not stop at the first test failure in `nuss-test.c`. (The patches here
are against the `.p5`, but that shouldn't matter if you just strip the
first folder name with `patch -p1`.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13947#comment:22>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.