20150303, 17:16  #12 
"Phil"
Sep 2002
Tracktown, U.S.A.
2^{5}·5·7 Posts 

20150303, 17:18  #13  
Feb 2012
Paris, France
162_{10} Posts 
Quote:
You could do this: Code:
# use default B2 ecm v resume results.txt 11e611e6 # use B2=11e8 ecm v resume results.txt 11e611e6 11e8 because I prefer to have B1 value in the output: Code:
GMPECM 6.4.4 [configured with GMP 6.0.0, enableasmredc] [ECM] Resuming ECM residue saved with Prime95 Input number is 0x16F9A1369338819B52EBC62EFD7B6CA .... 33DB13E1B5331 (148 digits) [Thu Feb 26 14:29:35 2015] Using MODMULN [mulredc:0, sqrredc:0] Using B1=1500000015000000, B2=46847553490, polynomial Dickson(12), sigma=690944836466098 dF=32768, k=4, d=324870, d2=11, i0=36 Expected number of curves to find a factor of n digits: 35 40 45 50 55 60 65 70 75 80 102 543 3391 23969 191190 1675913 1.6e+007 1.7e+008 1.9e+009 2.2e+010 Step 1 took 16ms Using 19 small primes for NTT Estimated memory usage: 104M Initializing tables of differences for F took 62ms ... Last fiddled with by YuL on 20150303 at 17:19 Reason: Added quote from axn 

20150303, 19:09  #14 
"Curtis"
Feb 2005
Riverside, CA
2×2,819 Posts 
Lycorn
You are correct, in that some mistake in command/flag/etc caused GMPECM to rerun stage 1, wasting time. You can calculate the time for the prime95/GMP combo by taking the stage 1 time from Prime95 and the stage2 time from GMPECM as the time per curve. You discovered just how much faster Prime95 is at Stage 1! Once you get the commands figured out, try using B1 = 21M and B2 = GMPECM default. See what v output predicts for the time to complete t45. I've found this choice of B1 more efficient for smaller numbers, am curious for ones this large. Note this will cause stage 2 to use twice the memory, just fitting in your 6GB envelope. Also, note default t50 B1 of 43/44M will use the same memory as 21M that I suggest so, we can conclude that GMPECM is useful for this exponent size up to t50 for 8GB machines, and up to t55 for 16GB machines. Not bad! I think memory use scales roughly with exponent size, so t45 B1 = 11M tests should work on an 8GB machine for exponent sizes up to 23,000 or so, and 16GB machines up to nearly 50,000. 
20150303, 19:18  #15 
"Curtis"
Feb 2005
Riverside, CA
2×2,819 Posts 
Also, the k option can arrange stage 2 to use half the memory at a small loss in efficiency. Part of your v output lists a kvalue, which is the number of chunks stage 2 is split into (2 minimum, I've used k over 20 for really large B1 runs). B1 = 11M uses a default k of 3. If you issue the flag k 12 in your command, stage 2 will use half the memory, but take 12 runs through most of stage 2 processes.
The stage 2 "blocks" increase by factors of 4, so setting k 6 won't split the difference; the program will adjust B2 to be efficient given your request for 6 blocks. Your run used a B2 of 30G, and k = 3. If you used k = 4, B2 would be set to 40G. If you use k = 2, I don't know if B2 would reduce to 20G and keep the same block & memory size, or jump to the next block size of 40G for a B2 of 80G. There are lots of options available! For long runs, minimizing the expected time to complete the level of interest is wise. That said, for two settings that have similar expected times to complete, the settings with higher B1 or B2 will have a higher chance to get lucky with a bigger factor. Different chip architectures and even different machine setups (memory bandwidth, OS, whatever) can respond differently to various settings, so a little experimentation can save you 10% of runtime if you're lucky. 
20150303, 20:39  #16 
Sep 2010
Scandinavia
3·5·41 Posts 
With some simplifications and assumptions, here's how to optimize it:
Set the highest maxmem you are comfortable with. Time stage2 with a reasonable B2. Divide the time taken by ~0.7 (0.695?) to get the time you should spend in stage1. Find the B1 that brings you there. Time usually scales quite linearly with B1. This should be close to a optimal B2/B1 ratio for the given circumstances. If that B1B2combo brings the needed number of curves too high or too low for your preference, just change B2 and start over from the third sentence of this paragraph. 
20150303, 21:13  #17 
Feb 2010
Sweden
173 Posts 
GMPECM could be a program of choice for small exponents. However, is it possible to report the ECMcurves to GIMPS? I am not aware how to do it and to me it seems loss of time to do GMPECM, since another person needs to do it for GIMPS too. It is a private effort.

20150303, 22:38  #18 
"GIMFS"
Sep 2002
Oeiras, Portugal
1,571 Posts 
That got me wondering as well.
Thanks to all those who answered my previous post, I have just managed to run only the Stage 2, and the time for the combined run Prime95Stage 1+ GMPECMStage 2 is ~23 minutes. More or less the same as for Prime95 only, but with the advantage that only 4630 curves are necessary, instead of 9700. So yes, it would be nice to use GMPECM for these range of exponents and factor sizes. The thing is, how do I report the results to Primenet? The file obtained by using the save switch is huge, and contains a residue, incomprehensible to the server. And this was for just one curve. If one runs 500 or more curves on a given exponent, the size of the save files containing Stage 1 and 2 residues will be ridiculously large. Is it supposed to be that way? Connection to the server for reporting is something I deem essential. 
20150303, 23:20  #19 
"Victor de Hollander"
Aug 2011
the Netherlands
10010011011_{2} Posts 
In the past you could mail your GMPECM efforts to George and he would manually add curves to the database, so no work is duplicated. But keep in mind he is a busy man.\
edit: Could a mod maybe move the posts about Prime95 stage 1 and GMPECM stage 2 to a new thread? Last fiddled with by VictordeHolland on 20150303 at 23:27 
20150303, 23:25  #20  
Sep 2010
Scandinavia
3×5×41 Posts 
Quote:
And yes, the output from Prime95 gets large with large numbers. It prints the entire number in hexadecimal. 

20150303, 23:37  #21 
"GIMFS"
Sep 2002
Oeiras, Portugal
1,571 Posts 
As I understood it, your post seemed to refer to work done entirely (Stage 1 + 2) with GMPECM. I am doing Stage 1 with Prime95, so the choice of B1 is as prescribed in the Primenet pages. I will probably fiddle with B2, and then I´ll report back. Thanks for your posts.
As for logging and reporting results, it´s a pain we can´t do it the Prime95 way. That makes me doubt I will ever use GMPECM on a regular basis. Let´s see. 
20150303, 23:47  #22  
Sep 2010
Scandinavia
3×5×41 Posts 
Quote:
So if Prime95 takes 10 minutes to complete one stage1, you should have GMPECM use a B2 such that stage2 takes 7 minutes. Yes, it would be very nice if this speedup could be incorporated into Prime95. 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
GMPECM & Prime95 Stage 1 Files  Gordon  GMPECM  3  20160108 12:44 
Stage 1 with mprime/prime95, stage 2 with GMPECM  D. B. Staple  Factoring  2  20071214 00:21 
Need help to run stage 1 and stage 2 separately  jasong  GMPECM  9  20071025 22:32 
P4 Prescott  31 Stage Pipeline ? Bad news for Prime95?  Angular  Hardware  18  20041115 07:04 
Stage 1 and stage 2 tests missing  Matthias C. Noc  PrimeNet  5  20040825 15:42 