mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Lone Mersenne Hunters (https://www.mersenneforum.org/forumdisplay.php?f=12)
-   -   How to use prime95 for stage 1 & GMP-ECM for stage 2 (https://www.mersenneforum.org/showthread.php?t=20092)

Prime95 2015-03-04 01:33

[QUOTE=bloodIce;396936]GMP-ECM could be a program of choice for small exponents. However, is it possible to report the ECM-curves to GIMPS?[/QUOTE]

Ask James Heinrich if he added a way to do this with the manual results form. If this becomes commonplace, James and I ought to be able to come up with some way to turn in results via the manual results page.

I can do it manually if you send me an email. I need your primenet userid, #curves run, exponent and bounds. Obviously, I don't want to do this very often, so send me a large number of curves -- not a few at a time.


As a bonus to people that use GMP-ECM for stage 2, the server calculates CPU credit by assuming prime95 performed the huge stage 2 bound.

lycorn 2015-03-04 08:55

[QUOTE=Prime95;396965]

I can do it manually if you send me an email.

[/QUOTE]

I will probably do some more work with GMP-ECM,to get confortable with the program.
Will send you a reasonable number of curves, but tell me: will you accept the results "on trust" (much like we report no factor lines from mfaktc/o to the server), which means I would be writing a short message containing UID, exponent, B1, B2, number of curves, or you expect to receive some data actually produced by the program? In the latter case, which one?

VictordeHolland 2015-03-04 10:43

Maybe as an interim solution, trusted users could submit their GMP-ECM results in a mfaktc/CudaLucas style fashion?
Some suggestions:
[code]
Mxxxxx completed 1000 ECM curves, B1=11000000, B2=30114149530 [stage2 GMP-ECM 6.4.4 MPIR 2.6.0 win64]
Mxxxxx completed 1000 ECM curves, B1=11000000, B2=30114149530, D(12) [GMP-ECM_7.0_SVN2256_win64]
Mxxxxx completed 1000 ECM curves, B1=11000000, B2=30114149530 [step1 Prime95 28.5 step2 GMP-ECM 6.4.4]
[/code]This is of course sensitive to fraud, but so is Mfakto and CudaLucas. The next thing to do would be to add a parameter to GMP-ECM ("-gimps" for instance) that would print this line to screen/file.

Prime95 2015-03-04 14:31

[QUOTE=lycorn;396984]I will probably do some more work with GMP-ECM,to get confortable with the program.
Will send you a reasonable number of curves, but tell me: will you accept the results "on trust" (much like we report no factor lines from mfaktc/o to the server), which means I would be writing a short message containing UID, exponent, B1, B2, number of curves, or you expect to receive some data actually produced by the program? In the latter case, which one?[/QUOTE]

Yes, I accept results "on trust".

R.D. Silverman 2015-03-04 14:39

[QUOTE=lycorn;396775]No. I´m using Prime95 for both stages.
Is there any GMP-ECM version for windows? And if yes, can you point me to the binaries?
I´m assuming GMP-ECM brings some advantage over Prime95 for stage 2, otherwise you wouldn´t have posed the question.[/QUOTE]

If you would bother to READ how step1/step 2 actually work, you might understand
what is involved.

Detailed explanations about how convolution based implementations of Step 2
have been written. Peter Montgomery's thesis is a superb source. An earlier
source would be my joint Math. Comp. paper with Peter on an FFT extension
to P-1.

Issues such as resource (i.e. memory) requirements are discussed, as are complexity
comparisons with earlier (non-convolution) implementations.

lycorn 2015-03-06 23:27

1 Attachment(s)
[QUOTE=Prime95;396771]Are you using GMP-ECM for stage 2?? Can you shed any light on what size exponents benefit from GMP-ECM stage 2?[/QUOTE]

I have done a couple of tests to compare Prime95 alone to Prime95 + GMP-ECM for different exponent sizes.
Find attached an Excel spreadsheet with a summary of the results.
I used for each exponent the B1 value currently prescribed in the Primenet [I]Reports -> Detailed Reports -> ECM Progress[/I] page.
In the rightmost column there is, for each exponent, the expected time (in days) to find a factor using the combo Prime95 + GMP-ECM, and the percentage shown below is relative to using Prime95 alone.
For exponents larger than 40 K there is no point in using both programs, This is valid for the current level of the search (in terms of factor size), but in practical terms that is what really counts.

lorgix 2015-03-07 02:52

[QUOTE=lycorn;397198]I have done a couple of tests to compare Prime95 alone to Prime95 + GMP-ECM for different exponent sizes.
Find attached an Excel spreadsheet with a summary of the results.
I used for each exponent the B1 value currently prescribed in the Primenet [I]Reports -> Detailed Reports -> ECM Progress[/I] page.
In the rightmost column there is, for each exponent, the expected time (in days) to find a factor using the combo Prime95 + GMP-ECM, and the percentage shown below is relative to using Prime95 alone.
For exponents larger than 40 K there is no point in using both programs, This is valid for the current level of the search (in terms of factor size), but in practical terms that is what really counts.[/QUOTE]
You must optimize B2/B1 at each level. Like in the case of M40253, B2 should be something like a third of what you used. As it is now you are spending far too much time in stage2.
And to be fair you should increase B2 when using Prime95. Otherwise the comparison becomes unfair. You must test both with optimal parameters.

lycorn 2015-03-07 12:05

I don´t think this is a matter of "fairness". As Stage 2 performed with GMP-ECM is faster than with Prime95 and Stage 1 is faster with Prime95, I was trying to find, for the currents needs of the search, where to use Prime95 alone or a combination of the two in order to get tests done faster. I am in no way claiming that one program is "better" than the other. As for the values of B2 used, they are the defaults provided by the program, so I assume they are optimized. If I reduce the values, the number of curves would certainly be higher, and the smaller number of curves is, as far as I understood it, the main point in running GMP-ECM for Stage 2, nstead of Prime95.
There is one caveat, though: performing Stage 1 with P95 and Stage 2 with GMP-ECM is very cumbersome if you want to run, say, 100 or 200 curves on a single exponent. The switches -resume and -c are incompatible, which means the curves have to be run one by one, the relevant residue from P95 S1 manually fed to GMP-ECM, and the programs restarted. Unless I am missing some fundamental issue here, this overhead undermines to a large extent the advantage of running the combination of P95 and GMP-ECM.

axn 2015-03-07 14:41

[QUOTE=lycorn;397228]There is one caveat, though: performing Stage 1 with P95 and Stage 2 with GMP-ECM is very cumbersome if you want to run, say, 100 or 200 curves on a single exponent. The switches -resume and -c are incompatible, which means the curves have to be run one by one, the relevant residue from P95 S1 manually fed to GMP-ECM, and the programs restarted. Unless I am missing some fundamental issue here, this overhead undermines to a large extent the advantage of running the combination of P95 and GMP-ECM.[/QUOTE]

It is the easiest thing in the world to run a batch of curves like this.

[QUOTE=undoc.txt]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. You can activate this feature by entering
GmpEcmHook=1
in prime.txt. Then select ECM bound #2 between 1 and bound #1. Results.txt
will contain data that can be fed to GMP-ECM for stage 2.[/QUOTE]

Run however many curves you want in Prime95 with the above setting. It'll run only the stage1 and save the residues for all the curves.

Then:[QUOTE=gmpecmhelp] -resume file resume residues from file, reads from stdin if file is "-"[/QUOTE]
The resume option works on a file full of residues (plus the original number and sigma). It'll go thru them one by one.

lorgix 2015-03-07 14:56

[QUOTE=lycorn;397228]I don´t think this is a matter of "fairness". As Stage 2 performed with GMP-ECM is faster than with Prime95 and Stage 1 is faster with Prime95, I was trying to find, for the currents needs of the search, where to use Prime95 alone or a combination of the two in order to get tests done faster. I am in no way claiming that one program is "better" than the other. As for the values of B2 used, they are the defaults provided by the program, so I assume they are optimized. If I reduce the values, the number of curves would certainly be higher, and the smaller number of curves is, as far as I understood it, the main point in running GMP-ECM for Stage 2, nstead of Prime95.
There is one caveat, though: performing Stage 1 with P95 and Stage 2 with GMP-ECM is very cumbersome if you want to run, say, 100 or 200 curves on a single exponent. The switches -resume and -c are incompatible, which means the curves have to be run one by one, the relevant residue from P95 S1 manually fed to GMP-ECM, and the programs restarted. Unless I am missing some fundamental issue here, this overhead undermines to a large extent the advantage of running the combination of P95 and GMP-ECM.[/QUOTE]
I meant that you should run each with optimized parameters for the most interesting comparison. And no, they are not optimized.
Read post #16 in this thread for how to optimize it. The theoretical background is in RDSs paper.

So, to be fair, you should use each program the best way possible. That is what I meant. For the other part; see what axn wrote in #31.

lycorn 2015-03-07 16:26

Thanks very much you both for your answers.

[QUOTE=axn;397231]
Then:
The resume option works on a file full of residues (plus the original number and sigma). It'll go thru them one by one.[/QUOTE]

The fundamental thing I was missing was that GMP-ECM goes through the file packed with P95 residues without having to specify the number of curves...

@lorgix: As for the optimization, I´ll have a look at it, but yes, I got your point.


All times are UTC. The time now is 13:16.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.