View Single Post
2021-10-18, 14:29   #5
EdH

"Ed Hall"
Dec 2009

25·32·17 Posts

It's been quite some time and I've made a bunch of changes to the script. Most of the change has seemed to make no difference other than taking longer to run. I'm still working on many items.

In testing older poly requests, this script usually finds something better than the original, but rarely ever matches Max0526's spins. As to more current polynomial requests, this script rarely spins anything better than what is posted, but hopefully it will at some point.

A lot of what I've changed is aesthetic. The output looks quite different now. But, I have also added the following:

- Lots of options to set in the beginning of the script.
- - Most of these are whether to run the following
- - - CADO-NFS ropt 100 the first time through
- - - Msieve size optimization **Not currently working but code exists**
- - - Msieve root optimization
- - - Add multiplied coefficients (c's) prior to optimizations for CADO and/or Msieve
- - - - Values to multiply by, if adding the above
- - - CADO-NFS size and root optimization a second time
- - - Note that for the Msieve portion, msieve must be available.
- - - Note that for the add multipliers operation, Pari-gp must be installed.
- Duplicate removal of polys in intermediate file.
- Reads all formats (R0, Y0, A0, etc.) of input polynomials that I have found. You can mix and match within the polynomial file.
- The only input is the poly file, which can contain multiple polynomials. Its name can be added to the command line or supplied at a prompt.
- - The composite (n:) must exist within the first poly.
- Works with quartics through octics. (Not fully tested.)
- Culls number of intermediate polys to a user set number. (This number is a base which is added to fequently.)
- Logs all Best Polynomials in unique list for further review.
- - Second, third best, etc. polys can be found within this list.
- - The list is named BestPoly#####.list, where ##### are the first five digits of the composite.
- Checks with cownoise.com for skew and Murphy_E comparisons
- - Note that an Internet connection and wget are necessary for cownoise data.
- Added stderr.list which catches all stderr output for review. (keepintfiles=no does not remove it at the end of a run, but it is overwritten in any subsequent runs.)

There is a very visible bug! I haven't been able to figure out exactly why, but even if you supply the best poly from the beginning, the CADO-NFS lower effort operations "lose" the higher Murphy_E scores. And, the first CADO-NFS ropt operation after Msieve, definitely displays this behaviour. (Actually, depending on the culling done, other top scoring polys are lost, also.) Fortunately, this is resolved in the subsequent runs and doesn't affect the returned Best Poly in the end (as far as I have seen).. (Actually, depending on the culling done, other top scoring polys are lost, also.)

There is still much more to do. The script is very redundant and portions make no difference. Some functions exist that are not yet implemented and the functions are in total disorder. But, if I wait until everything is working just right, I'll never post anything.

The script has grown too large to fit within a single post, so I'll attach versions to this and subsequent posts.

Please provide all feedback to this thread and remember to thank Max0526 for sharing his spin procedure. I hope to understand more of it and improve upon what is provided.

Below is a good example of a successful run for an earlier polynomial request. It shows an escalating Best Poly score and most of the operations. (The ropt 100 is omitted for the initial CADO-NFS runs.)

A brief description:
- polys is entered as the original polynomial source - this filename can alternately be added to the command line
- original poly(s) is(are) read (and converted, if necessary) to Y/c format and written to a file called rawset
- original c's are manipulated by mutipliers (if option is chosen) and new polys are added to rawset
- negated versions of the rawset polynomials are generated and added back to rawset
- initial CADO-NFS size optimization is performed at 0, 1, 10 and 100 and new polys (and their negated forms) are added to rawset
- CADO-NFS root opt at 0 is performed
- rawset is culled by duplicate removal and trimming to number of top scoring polys - count based on score - multiple polys with same score are kept
- all polys with the top selected scores are added (with their negative forms) to rawset
- the top score is returned and a best poly is copied to the log
- the three preceding steps are repeated at ropt 0.01 and 1
- the same steps are performed at ropt 2 and 10 with more size opts added in
- in the example, the first opportunity for ropt at 100 was skipped
- a file (.ms) is written for Msieve and multiplied values are added as directed in the settings
- Msieve root optimization is performed
- the Msieve returned polynomial choice is added to rawset with its negated version
- CADO-NFS size and root optimizations are performed again (as above), as chosen in the settings
- in the second run root opt is also run at 100

In the example, it is shown that a progression of scores is encountered up through root opt 1. After that no improvement is seen

Unfortunately, after the Msieve operation, there is a temporary loss of the best poly. But, the final best poly is equivalent to the previous. In this case the best poly was found early on, and it may just suffice to only run the initial phase at this point.

Original polynomial:
Code:
n: 201916700580745604776027022665471186255107062245932082076863383752096343903385041484073267281054478199044604641397575671739630499971150912819790916215008125554106571022882316742647109864486081319721103021177161
Y0: -32507823573507006198240834416613396620026
Y1: 764359993484535911177455197
c0: 7422876104398390129123665707218326214456678976313
c1: -647890060642992949061373452059821094979964
c2: -2396631357068296334601221348652323
c3: -33828674440462622647996
c4: -14210375486953290
c5: 50058540
skew: 335007570.06
# size 1.234e-20, alpha -7.743, combined = 1.120e-15 rroots = 3
# MurphyE = 1.18869319e-15
Example run (24 threads):
Code:
\$ bash polyspin.sh
polys file: polys
Running initial CADO-NFS size optimizations:
Current exp_E list from sopteffort 0, 1, 10, 100:       57.23 57.24 57.25 57.34 57.65 58.01 58.21
Running initial CADO-NFS root optimizations:
rootopt 0 took 1:52
Current list of Murphy_E scores:      9.773e-16 9.806e-16 1.006e-15 1.050e-15 1.075e-15
Best Murphy_E found so far:   1.075e-15
rootopt 0.01 took 54 seconds
Current list of Murphy_E scores:      1.006e-15 1.039e-15 1.050e-15 1.075e-15 1.085e-15
Best Murphy_E found so far:   1.085e-15
rootopt 1 took 1:17
Current list of Murphy_E scores:      1.039e-15 1.075e-15 1.085e-15 1.183e-15
Best Murphy_E found so far:   1.183e-15
Current exp_E list from sopteffort 0, 1, 10, 100:       57.22 57.23 57.24 57.25 57.26 57.30 57.53
rootopt 2 took 5:03
Current list of Murphy_E scores:      1.070e-15 1.075e-15 1.085e-15 1.113e-15 1.183e-15
Best Murphy_E found so far:   1.183e-15
Current exp_E list from sopteffort 0, 1, 10, 100:       57.23 57.24 57.25 57.26 57.27 57.30 57.34 57.53
rootopt 10 took 43:26
Current list of Murphy_E scores:      1.085e-15 1.088e-15 1.113e-15 1.120e-15 1.183e-15
Best Murphy_E found so far:   1.183e-15
Msieve root optimization took 52:51
Running CADO-NFS size optimizations:
Current exp_E list from sopteffort 0, 1, 10, 100:       57.23 57.24 57.25 57.27 57.30 57.53
Running final CADO-NFS root optimizations:
rootopt 0 took 11:43
Current list of Murphy_E scores:      1.046e-15 1.050e-15 1.063e-15 1.075e-15 1.085e-15
Best Murphy_E found so far:   1.085e-15
rootopt 0.01 took 2:43
Current list of Murphy_E scores:      1.050e-15 1.063e-15 1.075e-15 1.085e-15 1.113e-15
Best Murphy_E found so far:   1.113e-15
rootopt 1 took 3:35
Current list of Murphy_E scores:      1.075e-15 1.085e-15 1.183e-15
Best Murphy_E found so far:   1.183e-15
Current exp_E list from sopteffort 0, 1, 10, 100:       57.23 57.24 57.25 57.26 57.30 57.53
rootopt 2 took 11:36
Current list of Murphy_E scores:      1.050e-15 1.075e-15 1.082e-15 1.085e-15 1.183e-15
Best Murphy_E found so far:   1.183e-15
Current exp_E list from sopteffort 0, 1, 10, 100:       57.23 57.24 57.25 57.26 57.27 57.30 57.53
rootopt 10 took 1:05:18
Current list of Murphy_E scores:      1.085e-15 1.088e-15 1.113e-15 1.120e-15 1.183e-15
Best Murphy_E found so far:   1.183e-15
rootopt 100 took 3:53:36
Current list of Murphy_E scores:      1.085e-15 1.113e-15 1.183e-15
Best Murphy_E found so far:   1.183e-15
Best poly found:
n: 201916700580745604776027022665471186255107062245932082076863383752096343903385041484073267281054478199044604641397575671739630499971150912819790916215008125554106571022882316742647109864486081319721103021177161
Y0: -32507833225041661567808073522870118923979
Y1: 764359993484535911177455197
c0: 29987438134706356646028532815412089975470608383960
c1: -587261506700262395105621651359625947436598
c2: -2409951896201592634142513541908051
c3: 763719328345225161226244
c4: -17370808644925590
c5: 50058540
skew: 254090649.422
# lognorm 65.54, E 57.50, alpha -8.04 (proj -2.48), 3 real roots
# MurphyE(Bf=1.000e+07,Bg=5.000e+06,area=1.000e+16)=1.183e-15

Best poly cownoise values: 332566833.11894      1.18869319e-15
Full run time: 7:26:38
Attached Files
 polyspin.sh.txt (29.2 KB, 63 views)

Last fiddled with by EdH on 2021-10-20 at 23:51 Reason: bugfix in polyspin.sh - reattachment