![]() |
|
|
#1 |
|
Aug 2002
Rovereto (Italy)
3×53 Posts |
Hi all!
I've read last undoc.txt and I've seen that "Alexander Kruppa wrote some code that allows the output of ECM stage 1 to be passed to Paul Zimmermann's more efficient GMP-ECM stage 2. This program is usually faster in stage 1." Is this code already embedded in Prime95 ones or do you have to download it somewere? "This program" means "Prime95", doesn't it? Regards |
|
|
|
|
|
#2 |
|
"Nancy"
Aug 2002
Alexandria
2,467 Posts |
The code to print the number to be factored, residue and sigma at the end of stage 1 is included in Prime95/mprime. If you add
GmpEcmHook=1 to your prime.ini file and run ECM curves with B2 set between anywhere 1 and B1 (so that Prime95 does not do a stage 2), a line like N=0x[...]; QX=0x[...]; SIGMA=0x[...] is written to results.txt for each curve computed by Prime95. This info can be fed into gmp-ecm which will compute stage 2 for that curve then. However, the normal gmp-ecm 4c is a little awkward for that purpose: if you specify a starting point on the curve (i.e., QX), it wants the "A" parameter to specify the curve, not SIGMA. And it can't read the N and QX values in hex. (You can get the value of A if you run a dummy curve (B1=0) in gmp-ecm with the -v option and sigma specified) I've patched gmp-ecm 4c to make all that more convenient and I've asked Paul Zimmermann just now whether he would rather include the changes in a new release of gmp-ecm or let me offer the patched version. Once that is decided, I hope that the new code will be available very shortly. Alex |
|
|
|
|
|
#3 |
|
Aug 2002
Rovereto (Italy)
3·53 Posts |
Alles Klar, Alex!
Vielen Dank. Herzliche Gr?ße aus Italien. Guido |
|
|
|
|
|
#4 |
|
"Patrik Johansson"
Aug 2002
Uppsala, Sweden
52×17 Posts |
I spent yesterday trying to do stage 1 prime95 and stage 2 in ecm-gmp 5.0, but ecm still keeps doing stage 1.
I've looked into the source files of ecm, and there is some code in resume.c [code:1] if (have_n && have_sigma) { *method = EC_METHOD; *b1 = 1.0; strcpy (program, "Prime95"); return 1; } [/code:1]which sets B1done (how far B1 was taken in stage 1) to 1. Then in ecm.c there is[code:1] if (B1 > B1done) youpi = ecm_stage1 (f, P.x, P.A, modulus, B1, B1done); [/code:1] where the stage 1 is called. (B1done is *b1 above.) This is the reason stage 1 gets done again. In resume.c, is *b1=1.0 intended to be a flag saying that stage1 should be skipped? E.g. "if (B1 > B1done && B1done != 1.0)" instead? Or are things more complicated? In save files from ecm, there is a number called X, while in files from prime95, it is called QX. Do they contain any information of B1? Maybe I shouldn't change details when I don't understand the main ideas. |
|
|
|
|
|
#5 | |
|
Aug 2002
Termonfeckin, IE
24×173 Posts |
There was a post yesterday by Alex Kruppa on the mersenne mailing list . I am quoting it in it's entireity. It answers all your questions.
Quote:
|
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Future requests? | LaurV | GPU to 72 | 392 | 2022-10-28 23:25 |
| AVX? (Other new features?) | Dubslow | Software | 6 | 2011-10-16 14:03 |
| Upcoming features | Xyzzy | Forum Feedback | 1 | 2007-11-26 18:57 |
| Desired Features/Addins | Complex33 | Software | 5 | 2002-09-05 06:13 |