Mentions légales du service

Skip to content

Four new scripts. Two for reproducible resume file. Two for finding small sigmas

Seth Troisi requested to merge verify_scripts into master

This adds four scripts I find useful when doing development. I would politely classify them as useful but unpolished. If you don't think they belong in ecm I'm happy to move them to my misc-scripts repository and track them personally. If you think they should be polished and tested more I can delay adding them till the GPU P-1 code has landed and I have used them more times.

First two scripts check_order.sage and find_small_sigma.sage I use to find sigmas that have small B1/B2 for a prime this is useful in writing tests.

Searching for a sigma that has small B1/B2 for a cofactor of F7 I ran

$sage find_small_sigma.sage 59649589127497217 --curves 10000 --sigma 3:1000
First results sigma 3:1000 => B1=2,521, B2=407,137
With sigma=3:1004 | New best B2: B1=46,051  B2=94,111
With sigma=3:1008 | New best conforming B2: B1=1,321  B2=9,212,543
With sigma=3:1030 | New best B2: B1=6,337  B2=48,079
...
With sigma=3:6999 | New best B2: B1=193  B2=1,051

The second two scripts verify_resume.py and compare_resume.py add a way to double check a resume file generated by GPU ECM/P-1

$ python verify_resume.py ~/Downloads/pm1/small_run/resume.pm1_stdkmd_batch_05_699.pm1.1e10.txt -- -v

Now run these commands:
echo '958266136385280590497017726181889453972398027456643809928910854227455990534775245257423822238415143065735389672403123934531189905183703385904847065099963976749432331023961466998183334985655052529183705797' | ecm -pm1 -x0 0x3 -savea resume.verify_resume.txt -v 10000000000 0
echo '1716663228186657244770515172868590880494237760862852594382977796179415974543029005714009921952424472165308293264353879691718325543593260268412086265345293039638244932035198397051475589247843799860493326774459' | ecm -pm1 -x0 0x3 -savea resume.verify_resume.txt -v 10000000000 0
echo '2462768335193786898277330490743426848629914760194344003654540237676863591280281146922261178021363651612853188362015176581565758372010214192716470130437665818871255908802834179833264909111929920293543703027898131' | ecm -pm1 -x0 0x3 -savea resume.verify_resume.txt -v 10000000000 0

Then compare with
python compare_resume.py '/home/five/Downloads/pm1/small_run/resume.pm1_stdkmd_batch_05_699.pm1.1e10.txt' 'resume.verify_resume.txt'

<RUN the three ECM commands>

$ python compare_resume.py '/home/five/Downloads/pm1/small_run/resume.pm1_stdkmd_batch_05_699.pm1.1e10.txt' 'resume.verify_resume.txt'
verified METHOD=P-1 B1=10000000000 X0=0x3 N=958...797<204>  matches  X=0x2d48990f3d397de0d0ce1f0a6e2942768d5fda6e07f6ce32857f45efb95b347097af99cfd1d13860a2e7c7d56adcc5fa1180fbfed079c936a8be6589e2f68f577d0f81c459144719319e25b734784376954088172a CHECKSUM=1641139515
Verified METHOD=P-1 B1=10000000000 X0=0x3 N=171...459<208>  matches  X=0x371dd37d752578dd566224c0aaba362e5a215c11b6001781198ef00811d1716688469fe329af2a9198d2fbaae5b57fe2eaa4d704ded9f5a0af92d61737306000b6cdb2512d779279dc325a5c72e63ee94e8eda3d11e6 CHECKSUM=1357371241
Verified METHOD=P-1 B1=10000000000 X0=0x3 N=246...131<211>  matches  X=0x13f6edf22285c18f32917cf46e2bd49ff495480eb1fe9867c3b5c2113c8d4ee9e3840df8181d0bf7987fc2453430bf8f3a8a465f718b3dc97ccfbc2eee48d9450b879b212415b8183b0a5f61efcf06cf50e193f28ce62b8 CHECKSUM=3524561419
Verified 3 of 3 lines from verifyfile

Merge request reports

Loading