![]() |
|
|
#78 | |
|
Serpentine Vermin Jar
Jul 2014
2·13·131 Posts |
Quote:
Conclusion: it's harmful. But then you don't have to be a rocket surgeon to know that.
|
|
|
|
|
|
|
#79 | |
|
Sep 2010
Scandinavia
3×5×41 Posts |
Quote:
About the RAM: I just wanted to make sure you wouldn't be afraid to limit RAM usage a little in cases where that might be convenient. (If you want to put all those GBs of RAM to good use while contributing to GIMPS you may want to look at P-1.) |
|
|
|
|
|
|
#80 | |
|
Serpentine Vermin Jar
Jul 2014
2·13·131 Posts |
Quote:
(I don't think I'd ever deliberately limit the memory to gmp-ecm, but if I did it wouldn't be as drastic as going from 18 GB to 250 MB)
|
|
|
|
|
|
|
#81 | |
|
"Curtis"
Feb 2005
Riverside, CA
2·2,927 Posts |
Quote:
A similar "rare case" argument is made for stage 1- Prime95's faster code works only for mersenne numbers and (I think?) Fermat numbers. GMP-ECM is general-use, so including the Prime95 stage 1 for just those cases is not helpful for most users. Of course, that's different from answering "what stops someone from combining the two?"; specifically, the FFT stage 1 into GMP-ECM should be possible, though well beyond my pay grade. I'm a button-pusher, not a programmer. As for flags to try for improved efficiency: Instead of using B2scale, try -k 2. This will choose the next-larger B2 size such that stage 2 will be done in just two steps. This uses more memory, but is usually faster. |
|
|
|
|
|
|
#82 | |
|
"Curtis"
Feb 2005
Riverside, CA
2×2,927 Posts |
Quote:
Yet, you insist that stage 2 time should always be equal to stage 1 time for best results. Your answer to the ratio I am looking for is "always 1, no matter what, on any computer,", even though your paper suggests 0.4 was the correct ratio of stage 2 time to stage 1 time for the machine and software you used in that research. This is the contradiction I am trying to figure out. Can you please explain my error in interpreting your paper? My previous post tried to make the point that this ratio is subject to discovery by experiment, as you said you did in that paper to find the 0.4 that you used. I used the -v flag in GMP-ECM to find the number of curves for a desired t-level, and tried to minimize the time to complete the listed number of curves for said t-level. This is the suggested procedure in the GMP-ECM documentation to optimize parameters for a particular computer/use case. I understand this to be standard practice, so I thought I was explaining my method when I made mention of the -v flag. I am interested to learn why this is an incorrect procedure, since that is what led me to conclude a ratio of stage 2 time ~ half of stage 1 time is the most efficient way to complete a desired t-level. |
|
|
|
|
|
|
#83 | |
|
Serpentine Vermin Jar
Jul 2014
2×13×131 Posts |
Quote:
![]() I'll give that a try next time, thanks. |
|
|
|
|
|
|
#84 |
|
"Curtis"
Feb 2005
Riverside, CA
2·2,927 Posts |
A little data sample, for a C166 on a Haswell-E with DDR4:
B1 = 11e6, stage 1 took 46 sec for each run B2 = 35e9, GMP-ECM default: 18 sec (this is k = 3 steps in stage 2) t40 686 curves = 12.2 hr t45 4482 curves = 79.7 hr t50 33676 curves = 24.95 days B2 = 240e9, 47 sec and equal to stage 1 time: t40 503 curves = 13.0 hr t45 3243 curves = 83.8 hr t50 23946 curves = 25.78 days So, for a common B1 choice of 11e6, the default GMP-ECM choice where stage 2 takes 40% the time of stage 1 has a lower expected time to find factors smaller than one would expect, of the size one targets with B1 = 11M (45 digits), and larger factors one might get lucky to find. This is one instance, but the data I took for a wide variety of B1/B2 shows in every case selecting B2 such that stage 2 time = stage 1 time has a longer expected time to find any size factor than stage 2 time = 40-50% of stage 1 time. I also tested B2 = 96e9, 28 sec for the next-largest B2 that uses k = 2 steps in stage 2: t40 582 curves = 12.0 hr t45 3791 curves = 77.9 hr t50 28048 curves = 24.0 days These expected times are better than GMP-ECM default, showing the improved efficiency of choosing B2 such that stage 2 uses just 2 steps. This is why I suggest the -k 2 flag rather than B2scale in general. |
|
|
|
|
|
#85 | |
|
Sep 2010
Scandinavia
10011001112 Posts |
Quote:
About k: It is true that all else equal, a lower k is more efficient. But you will often need to use a different k to reach the optimal relationship between stage1time and stage2time. I mostly use B2scale, but I also pay attention to k and B2. Sometimes large steps occur, and I then test two (or more) different settings. |
|
|
|
|
|
|
#86 | |
|
"Bob Silverman"
Nov 2003
North of Boston
5×17×89 Posts |
Quote:
for the probability of finding a factor given your B1, B2 choices. What is your OBJECTIVE FUNCTION??? Where are the probability computations? You can not conclude anything about "lower expected time", unless you know what the probability of success is. I see a lot of data about computation time. Nowhere do I see any kind of an optimization. WHAT ARE YOU OPTIMIZING? It certainly is not the primary objective, which is to maximize the probability of success per UNIT TIME spent. |
|
|
|
|
|
|
#87 | |
|
Sep 2010
Scandinavia
3×5×41 Posts |
Quote:
|
|
|
|
|
|
|
#88 |
|
(loop (#_fork))
Feb 2006
Cambridge, England
2×7×461 Posts |
Yes you do, that's the 't40 503 curves' part; gmp-ecm has implementations of all the Dickman-function work necessary for computing that probability, and reports its reciprocal there.
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GMP-ECM & Prime95 Stage 1 Files | Gordon | GMP-ECM | 3 | 2016-01-08 12:44 |
| Stage 1 with mprime/prime95, stage 2 with GMP-ECM | D. B. Staple | Factoring | 2 | 2007-12-14 00:21 |
| Need help to run stage 1 and stage 2 separately | jasong | GMP-ECM | 9 | 2007-10-25 22:32 |
| P4 Prescott - 31 Stage Pipeline ? Bad news for Prime95? | Angular | Hardware | 18 | 2004-11-15 07:04 |
| Stage 1 and stage 2 tests missing | Matthias C. Noc | PrimeNet | 5 | 2004-08-25 15:42 |