Mentions légales du service

Skip to content

Faster -save with large gpu curve count

Seth Troisi requested to merge faster_gpu_saving into master

With some output trimmed

$ time echo "(2^467-1)/121606801" | ./ecm_old -savea save.old -sigma 3:1000 -gpucurves 8320 -cgbn 1e3 0
GMP-ECM 7.0.5-dev [configured with GMP 6.2.99, --enable-asm-redc, --enable-gpu, --enable-assert] [ECM]
Input number is (2^467-1)/121606801 (133 digits)
Using B1=1000, B2=0, sigma=3:1000-3:9319 (8320 curves)
Computing 8320 Step 1 took 31ms of CPU time / 293ms of GPU time
(hangs right here for 3 seconds)

real	0m3.633s
user	0m3.229s
sys	0m0.113s
$ time echo "(2^467-1)/121606801" | ./ecm_new -savea save.new -sigma 3:1000 -gpucurves 8320 -cgbn 1e3 0
GMP-ECM 7.0.5-dev [configured with GMP 6.2.99, --enable-asm-redc, --enable-gpu, --enable-assert] [ECM]
Input number is (2^467-1)/121606801 (133 digits)
Using B1=1000, B2=0, sigma=3:1000-3:9319 (8320 curves)
Computing 8320 Step 1 took 38ms of CPU time / 292ms of GPU time

real	0m0.657s
user	0m0.250s
sys	0m0.099s

$ head -n2 save.new 
METHOD=ECM; PARAM=3; SIGMA=1000; B1=1000; N=(2^467-1)/121606801; X=0x6fb6435a7ebac7c060fee98292d20802aa5d871f8b5a7b5dc1da1f2b5669618fcae1a52c7cbdf42e8fe972c06eca6577cd65f3e1f2ea93; CHECKSUM=2172936187; PROGRAM=GMP-ECM 7.0.5-dev; X0=0x0; Y0=0x0; WHO=five@five; TIME=Thu Mar 17 01:30:00 2022;
METHOD=ECM; PARAM=3; SIGMA=1001; B1=1000; N=(2^467-1)/121606801; X=0x85c719cf95bb640150fd28141e9d04b33a12fb73912097305fedebcaf1e4bdbcbbcdedb945fd9093b91da834284f6beb5c37d9c69db0d7; CHECKSUM=3361731579; PROGRAM=GMP-ECM 7.0.5-dev; X0=0x0; Y0=0x0; WHO=five@five; TIME=Thu Mar 17 01:30:00 2022;

$ tail -n2 save.old 
METHOD=ECM; PARAM=3; SIGMA=1001; B1=1000; N=(2^467-1)/121606801; X=0x85c719cf95bb640150fd28141e9d04b33a12fb73912097305fedebcaf1e4bdbcbbcdedb945fd9093b91da834284f6beb5c37d9c69db0d7; CHECKSUM=3361731579; PROGRAM=GMP-ECM 7.0.5-dev; X0=0x0; Y0=0x0; WHO=five@five; TIME=Thu Mar 17 01:29:57 2022;
METHOD=ECM; PARAM=3; SIGMA=1000; B1=1000; N=(2^467-1)/121606801; X=0x6fb6435a7ebac7c060fee98292d20802aa5d871f8b5a7b5dc1da1f2b5669618fcae1a52c7cbdf42e8fe972c06eca6577cd65f3e1f2ea93; CHECKSUM=2172936187; PROGRAM=GMP-ECM 7.0.5-dev; X0=0x0; Y0=0x0; WHO=five@five; TIME=Thu Mar 17 01:29:57 2022;

There is good test coverage (verifying GPU residuals match CPU, verifying resume with and without factor) so I'm 99.95% confident in this change.

Edited by Seth Troisi

Merge request reports