mersenneforum.org (https://www.mersenneforum.org/index.php)
-   NFS@Home (https://www.mersenneforum.org/forumdisplay.php?f=98)

 fivemack 2016-07-04 08:40

Auto-XYYXF tool

1 Attachment(s)
Here is the tool I was talking about for producing SNFS polynomials for XYYXF numbers. Feel free to complain about my maths and my Python.

I'm never quite sure how to automate trial-sieving - you probably do want to launch multiple jobs in parallel, I think that having this tool analyse the stderr from the trial-sieving job if it exists with an obvious name is probably going to be the right answer.

 Dubslow 2016-07-04 09:56

Why not just use Yafu? It already has comprehensive SNFS polsel code, including XYYXF, as well as trial sieving (though not in parallel).

(I'll take a look at the Python from a style standpoint within a day or two.)

 fivemack 2016-07-04 15:54

Some results on S{250..255}

These are A-side 14e, A-side 15e, R-side 14e, R-side 15e timings for a number of candidate numbers, with 31-bit large primes. These are pretty clearly 15e numbers, though may need a little more ECM before queue submission.

[code]
C240_134_77.initial_snfs
total yield: 5565, q=130010009 (0.75608 sec/rel)
total yield: 11590, q=130010009 (0.68150 sec/rel)
total yield: 4971, q=130010009 (0.77353 sec/rel)
total yield: 9924, q=130010009 (0.72277 sec/rel)
C246_130_87.initial_snfs
total yield: 3456, q=130010009 (1.09830 sec/rel)
total yield: 7358, q=130010009 (0.96890 sec/rel)
total yield: 3407, q=130010009 (1.11494 sec/rel)
total yield: 6765, q=130010009 (1.06387 sec/rel)
C246_143_58.initial_snfs
total yield: 4415, q=130010009 (0.84616 sec/rel)
total yield: 9214, q=130010009 (0.76643 sec/rel)
total yield: 4643, q=130010009 (0.82960 sec/rel)
total yield: 9449, q=130010009 (0.77321 sec/rel)
C247_125_102.initial_snfs
total yield: 8796, q=130010009 (0.46016 sec/rel)
total yield: 19094, q=130010009 (0.40438 sec/rel)
total yield: 9207, q=130010009 (0.42136 sec/rel)
total yield: 18853, q=130010009 (0.38462 sec/rel)
C249_125_106.initial_snfs
total yield: 7130, q=130010009 (0.52332 sec/rel)
total yield: 15217, q=130010009 (0.46348 sec/rel)
total yield: 7920, q=130010009 (0.48562 sec/rel)
total yield: 16245, q=130010009 (0.44511 sec/rel)
C249_133_82.initial_snfs
total yield: 4217, q=130010009 (0.88017 sec/rel)
total yield: 8996, q=130010009 (0.77564 sec/rel)
total yield: 4412, q=130010009 (0.86608 sec/rel)
total yield: 8877, q=130010009 (0.81619 sec/rel)
C250_142_98.initial_snfs
total yield: 5498, q=130010009 (0.69142 sec/rel)
total yield: 11459, q=130010009 (0.62760 sec/rel)
total yield: 5657, q=130010009 (0.68142 sec/rel)
total yield: 11358, q=130010009 (0.64701 sec/rel)
C250_146_80.initial_snfs
total yield: 6470, q=130010009 (0.64258 sec/rel)
total yield: 13714, q=130010009 (0.59361 sec/rel)
total yield: 6196, q=130010009 (0.62433 sec/rel)
total yield: 12502, q=130010009 (0.61041 sec/rel)
[/code]

130.87 yields with 3 large primes (A3.0 => lss=0, 3 large primes on A side); 15e, 31LP
[code]
A3.0 y=7823 t=1.229s/r
A3.1 y=7503 t=1.302s/r
R3.0 y=8140 t=1.229s/r
R3.1 y=6874 t=1.295s/r
[/code]
so that's a significant disadvantage over 2 large primes

 Dubslow 2016-07-06 04:01

1 Attachment(s)
There are lots of things I could say about the code, both generically and Python specific... mostly, it's terse and uncommented, some variable names being rather opaque, though I think I was able to figure things out. Among other things, I would suggest that even for the most terse single character variables, you use them consistently -- sometimes you used p for factors, while later you used g instead of p for no particular reason I could see. Also, more spacing is always better (and see [URL="https://www.python.org/dev/peps/pep-0008/"]PEP 8[/URL] for the official Python spacing conventions, among other things). Finally, use Python 3. Python 2 is deprecated and has no advantages and several disadvantages compared to Python 3.

There are a variety of other things too, like unnecessary parens in conditionals and other things. See the attached for a full diff. (I more or less rewrote it line for line)

(And if you complain that this is a throwaway script, well... I used to do the same until I tried to read the throwaways when they became useful again after months or years of disuse... boy was that a pain. :smile:)

Edit: One of my more liked coans from among many: [url]http://thecodelesscode.com/case/116[/url]

 All times are UTC. The time now is 11:49.