![]() |
|
|
#12 | |
|
Sep 2006
Brussels, Belgium
35×7 Posts |
Quote:
|
|
|
|
|
|
|
#13 |
|
Einyen
Dec 2003
Denmark
2·1,579 Posts |
Doing stage1 in increments has no advantage except when doing huge B1 values with GMPECM, then it is nice to have intermediate savefiles in case of a crash. Prime95 is doing its own savefiles along the way.
|
|
|
|
|
|
#14 | |
|
Jun 2003
2·3·7·112 Posts |
Quote:
1) The way P95 does stage 1, incremental calculation uses a slower powering routine than starting from scratch. 2) Each B1 run will have a GCD calculation at the end -- this is not free. 3) Stage 2 is a relatively cheap way to find factors that simple minded stage 1 can't find. So you really want to run some stage 2 (say B1 * 20) after each B1. Now, if you're planning to run super deep B1 (say you plan to run a 100 hr stage 1), then you can probably break it up into 2-3 stretches. This way, if you find a factor in between, the savings would be non-negligible (and your incremental probability of finding a factor would also be non-negligible). However, if you're doing shorter runs (few hours), then it would probably be not worth it. |
|
|
|
|
|
|
#15 |
|
"GIMFS"
Sep 2002
Oeiras, Portugal
3·491 Posts |
IIRC, GMPECM P-1 Stage 1 is much less efficient than Prime95´s. That´s a non-negligible weakness in the strategy of doing large P-1 runs using GMPECM. It would be nice to be able to run Stage 1 with Prime95 and then Stage 2 with GMPECM, like some of us do for ECM on small numbers, but I think that is still not possible.
|
|
|
|
|
|
#16 | |
|
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
2×4,909 Posts |
Quote:
|
|
|
|
|
|
|
#17 | |
|
Jun 2003
2·3·7·112 Posts |
Quote:
Regular GIMPS work will not benefit, as the B1 is not large enough to split. You want to do these stage 1s in a single stretch. |
|
|
|
|
|
|
#18 | |
|
Einyen
Dec 2003
Denmark
1100010101102 Posts |
Quote:
|
|
|
|
|
|
|
#19 |
|
1976 Toyota Corona years forever!
"Wayne"
Nov 2006
Saskatchewan, Canada
2×5×7×67 Posts |
My experience shows that prime95 P1 stage 1 only checks for factors at the end of the run.
So my thinking is that if for exponent "X" B1=100000 would find a factor then running B1 to the standard 500000 would waste time. I was also assuming that 5 runs with B1=100000, ... 500000 would take the same elapsed time as 1 run to 500000. It was also confirmed that B2 always runs from the start as I personally witnessed. So If I ran stage 2 with each of the above stage 1 runs they would take progressively longer; much more than 1 B2 run at the end with the highest B2. |
|
|
|
|
|
#20 |
|
"GIMFS"
Sep 2002
Oeiras, Portugal
101110000012 Posts |
|
|
|
|
|
|
#21 |
|
Romulan Interpreter
Jun 2011
Thailand
72·197 Posts |
Well... now, to put it plain, and satisfy my SIWOTI syndrome, stage 1 is not exactly incremental, and stage 2 is not exactly from scratch.
Say you have B1=25 and B2=100, what you will do, you need to compute the E=LCM of all numbers under 25, and compute b^E. That is, take all primes p lower than (or equal to) 25, with all their max powers x in such a way that p^x is not larger than 25, and make their product. That is E= 2^4 * 3^2 * 5^2 * 7 * 11 * 13 * 17 * 19 * 23. Compute b^E, do GCD, that is your stage 1. Stage 2 will take care of the primes between 26 and 100, one by one, or 2 by 2, or n by n, depending of your available memory. To extend B1 to (say) 50, it is not enough to add the primes in between 26 and 50 to E. You need to do that, of course, like multiply E with 29, 31, 37, 41, 43, 47 (here is where the "incremental" part comes in, and yes, I know that you won't make products here, but do directly exponentiation of the formerly computed b^E, but that is beside the point). The new calculated E is not anymore the LCM of all numbers under 50, because that LCM contains a second power of 7 (49<50), a third power of 3 (27<50), a fifth power of 2 (32<50). So, if you do not include these in E, you may (in fact, you will) miss factors. So, extending B1 is "incremental, plus a little bit". Now , if you do stage 2, you only need to repeat this from the new B1 upward, no matter if you extend B2 or not, but this is not exactly "from scratch" (which, in my mind, would be to make it from the former B1, as it was initially, hehe). In fact, if you used a lot of memory first time, and gulped a lot of primes in a single block, you may only need to repeat stage 2 from the second former block (which can be larger than the new B1). Well... I don't want to go too deep here. Siwoti fixed... |
|
|
|
|
|
#22 |
|
1976 Toyota Corona years forever!
"Wayne"
Nov 2006
Saskatchewan, Canada
2×5×7×67 Posts |
Laurv: I accept you understand the math behind this much better than I do.
I did some tests. P1: 59M B1=1000000 B2=20000000 Slight increase in B1 only = minimal Stage 1 time and same Stage 2 time. Slight increase in B2 only = no Stage 1 and slightly more Stage 2 |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Old Savefiles Not Getting Deleted | Unregistered | Software | 5 | 2004-02-18 04:43 |