mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Lone Mersenne Hunters

Reply
 
Thread Tools
Old 2015-03-02, 00:41   #1
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×4,099 Posts
Default How to use prime95 for stage 1 & GMP-ECM for stage 2

Quote:
Originally Posted by lycorn View Post
Well, finding factors this large is hard. It takes a lot of curves to get one.
I´m currently putting M11423 through the same process. There are still 4000 curves to run @B1=11000000. If nothing comes up. I´ll move to B1=44000000. But that yes, will be really tough...
Are you using GMP-ECM for stage 2?? Can you shed any light on what size exponents benefit from GMP-ECM stage 2?
Prime95 is online now   Reply With Quote
Old 2015-03-02, 00:59   #2
lycorn
 
lycorn's Avatar
 
"GIMFS"
Sep 2002
Oeiras, Portugal

23·197 Posts
Default

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.
lycorn is offline   Reply With Quote
Old 2015-03-02, 04:34   #3
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

100000000001102 Posts
Default

I don't know about binaries -- I expect there are some available.

Yes, GMP-ECM, given enough memory, is vastly superior for small exponents. It runs a much deeper stage 2, which lets you run far fewer curves. I'm not sure about exponents near 20000, if you decide to investigate I'd be curious as to what you find out.

You'll need to look up the GmpEcmHook=1 option in undoc.txt.
Prime95 is online now   Reply With Quote
Old 2015-03-02, 22:25   #4
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

22·33·53 Posts
Default

Quote:
Originally Posted by lycorn View Post
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.
Here's the repository:
http://gilchrist.ca/jeff/factoring/index.html

The maintainer is an infrequent poster here.

The fastest use is Prime95 for stage1, save residues, use them as input for GMP-ECM stage 2. George is asking about memory requirements for exponents under 20k; I have a 16Gb system so I may be able to answer this if you cannot. Use the "-v" flag when experimenting with B2 bounds to see how much memory is needed and how many curves make a t45 with each setting of B2. The higher your B2, the higher the chance to find a factor per curve, thus the required curve count for each level decreases.

Last fiddled with by VBCurtis on 2015-03-02 at 22:27
VBCurtis is online now   Reply With Quote
Old 2015-03-03, 01:43   #5
lycorn
 
lycorn's Avatar
 
"GIMFS"
Sep 2002
Oeiras, Portugal

157610 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
Here's the repository:
http://gilchrist.ca/jeff/factoring/index.html

The maintainer is an infrequent poster here.

The fastest use is Prime95 for stage1, save residues, use them as input for GMP-ECM stage 2. George is asking about memory requirements for exponents under 20k; I have a 16Gb system so I may be able to answer this if you cannot. Use the "-v" flag when experimenting with B2 bounds to see how much memory is needed and how many curves make a t45 with each setting of B2. The higher your B2, the higher the chance to find a factor per curve, thus the required curve count for each level decreases.
Thanks a lot. I just started trying it. Some questions will most probably arise...
For now, just one: the advantage of running Stage 1 on Prime95 and Stage 2 on GMP-ECM holds only for small exponents, as I understood it. But, how small?
lycorn is offline   Reply With Quote
Old 2015-03-03, 04:22   #6
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

200616 Posts
Default

Quote:
Originally Posted by lycorn View Post
For now, just one: the advantage of running Stage 1 on Prime95 and Stage 2 on GMP-ECM holds only for small exponents, as I understood it. But, how small?
That is what we'd like to find out. It may depend on how much memory GMP-ECM is allowed to use.
Prime95 is online now   Reply With Quote
Old 2015-03-03, 04:37   #7
philmoore
 
philmoore's Avatar
 
"Phil"
Sep 2002
Tracktown, U.S.A.

25×5×7 Posts
Default

I had good results running stage 2 with GMP-ECM on M8191 using 3 MB of allocated memory, so I am pretty sure that you should still find it useful on M11243. The one problem I had was that the only way I could get GMP-ECM to log its results was to write the entire log file to memory, which gave me one huge file. I would have liked the capability to just log results if a factor was found. If anyone has a suggestion of how to do that, I would love to hear about it.
philmoore is offline   Reply With Quote
Old 2015-03-03, 06:04   #8
axn
 
axn's Avatar
 
Jun 2003

544610 Posts
Default

Quote:
Originally Posted by philmoore View Post
I had good results running stage 2 with GMP-ECM on M8191 using 3 MB of allocated memory
MB or GB?
axn is offline   Reply With Quote
Old 2015-03-03, 15:11   #9
lycorn
 
lycorn's Avatar
 
"GIMFS"
Sep 2002
Oeiras, Portugal

23×197 Posts
Default

So I have given GMP-ECM a try, and as expected some questions popped up. Don´t want to be a PITA, but can´t help bring some to the thread. May some knowledgeable (and patient) member shed any light on my confused mind...

I started by running Prime95 ECM, using B1=B2=11000000, on M11423. I inserted the GmpEcmHook=1 line in prime.txt.
All fine, Prime95 ran Stage 1 only, and wrote a residue to the results file.

I copied said residue to a file named work.txt, and ran GMP-ECM using the following command:

ecm -v -resume work.txt 11000000

The program started, by printing some lines of info, including the value I had given for B1 and a calculated value B2=30114149530.
It also listed the expected number of curves for finding factors of different sizes.
It also mentioned that it was resuming a residue saved with Prime95, which I took as a sign things were going as expected.
After a while, the message Step 1 took 2510343 ms popped up. My first question: is this Step 1 the Stage 1? If yes, what is the point in running it in Prime95 only to have it re-run by GMP-ECM? I was under the impression that GMP-ECM would only run the Stage 2 in this "resume" situation.
It then gave a memory usage estimation of 2749M, which is fine, as I have over 6G available. So I think at this point it started running Stage 2. Severall lines regarding initializations and computations of different sorts followed, then the message Step 2 took 652360 ms popped up. Below it, the program displayed a list of expected times to find a factor of n digits.
Last line was: Save file line has no equal sign after: UID: lycorn/ast.

And that was it. I think in general terms it went well, but in order to make some sense of it and using it regularly, I need to understand a couple of things:
First, I was really confused by the fact that the Stage 1 was apparently run by GMP-ECM - in fact it took way longer than Stage 2, and also much longer than Stage 1 run by Prime95. As it is resuming a computation that has finished Stage 1, I supposed it would only run Stage 2. How can we get it to do it ?

Second, where have the results gone, so they can be reported to Primenet? I suspect nowhere, which means the program doesn´t automatically create something similar to the "results" file of Prime95. Does it have to be created at runtime, using the -save switch?

Third, If my interpretation is correct:

- I ran just one curve, which took 2510343 + 652360 ms ~ 52.71 minutes
- The prescribed number of curves for finding a 45 digit factor (in line with a B1=11000000) is 4630 (this number was taken from the list given at the end of Stage 1). At the end of Stage 2, the listed expected time to find a 45 digit factor was 169.49 days, which matches perfectly the figures for number of curves and duration of each one.
On my computer, Prime95 runs a curve on M11423, @B1=11000000 in 16 minutes, and the prescribed number of curves is 9700, which gives 107,(7) days. This shows that using Prime95 only would be much faster.
There´s certainly something I´m missing here - I guess it has to do with running the Stage 1 on GMP-ECM and on Prime95, Stage 1 takes so long that it more than makes up for the gain in running less curves at a higher B2, on GMP-ECM.


Any clarification would be much appreciated.
Thanks in advance

Last fiddled with by lycorn on 2015-03-03 at 15:26
lycorn is offline   Reply With Quote
Old 2015-03-03, 16:22   #10
axn
 
axn's Avatar
 
Jun 2003

2·7·389 Posts
Default

I think you need to give both B1 and B2, like so:

Code:
 ecm -v -resume work.txt 1 11e6-30e9
i.e. B1=1, and B2=11e6 to 30e9
axn is offline   Reply With Quote
Old 2015-03-03, 16:40   #11
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

32×131 Posts
Default

Quote:
Originally Posted by lycorn View Post
Last line was: Save file line has no equal sign after: UID: lycorn/ast.
I believe you can't use userid/computerid when doing stage1 Prime95 and stage2 on GMP-ECM.
It should say something like this:
Code:
Resuming ECM residue saved with Prime95
Input number is x (x digits)
Using B1=1, B2=x polynomial Dickson(x), sigma=x
Step 1 took x ms
Step 2 took x ms
Step 1 should take only a few ms.

Last fiddled with by VictordeHolland on 2015-03-03 at 16:40
VictordeHolland is offline   Reply With Quote
Reply

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

All times are UTC. The time now is 23:03.


Mon Mar 27 23:03:04 UTC 2023 up 221 days, 20:31, 0 users, load averages: 0.66, 0.99, 1.02

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔