mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   ECM Stage 2 RAM (https://www.mersenneforum.org/showthread.php?t=23789)

ATH 2018-12-07 08:25

[QUOTE=GP2;501860]If he's using GMP-ECM for stage 2, then I think it responds non-linearly to memory, no? For a given B2 value it wants a certain amount of memory, and if you reduce that memory by a factor of N (by using the -k option to use multiple blocks), it will take considerably longer than N times as much execution time.

So if you're giving 14 GB to a stage 2 that really wants terabytes, you're giving it at least a hundred times less memory than it wants, and it will take maybe many thousands of times longer to complete.[/QUOTE]

It was "only" ~ 308 GB not terabytes, but still a lot compared to 14 GB:

[CODE]GMP-ECM 7.0.5-dev [configured with GMP 6.1.2, --enable-asm-redc] [ECM]
Resuming ECM residue saved by ATH@5960X with GMP-ECM 7.0.5-dev on Fri Dec 07 09:21:50 2018
Input number is 2^4007-1 (1207 digits)
Using special division for factor of 2^4007-1
Using B1=160632413-160000000, B2=3200000000000-1200000000000000, polynomial Dickson(30), sigma=0:12427217811893723496
dF=10264320, k=1, d=118107990, d2=17, i0=27077
Can't compute success probabilities for B1 <> B2min
Step 1 took 0ms
[B]Estimated memory usage: 308.19GB[/B][/CODE]

I only took B1 to 1.6e8 but that should not matter since I chose stage2 32e11-12e14 as described in the post earlier.

storm5510 2018-12-07 12:18

Since the discussion has gone to [B]GMP-ECM[/B], I have a question:

[COLOR=Blue]GMP-ECM 7.0.5-dev [configured with GMP 6.1.2, --enable-asm-redc] [ECM][/COLOR]

[COLOR=Blue][COLOR=Black]I found a Windows binary of the same version as in the most recent post by [B]ATH[/B], assuming he is referring to Linux. [/COLOR][/COLOR][COLOR=Blue][COLOR=Black]After reading the doc file, and getting it running, I noticed that it does [U]not[/U] produce a results file. However, is is [U]extremely[/U] fast and can use [U]very large[/U] B1 and B2 values.[/COLOR][/COLOR]

[COLOR=Blue][COLOR=Black][U]Question[/U]: Is it just something to toy with, or does it serve a purpose more dedicated to this project? Obviously, one must be able to submit their results.
[/COLOR][/COLOR]

GP2 2018-12-07 14:58

[QUOTE=GP2;501906]As mentioned before, if you want to do stage 1 with mprime/Prime95 and stage 2 wth GMP-ECM, first you need to run mprime/Prime95 with the line [c]GmpEcmHook=1[/c] in your prime.txt file, and you need to set B1 and B2 to the same value (say 3000000) in your [c]ECM2=[/c] lines in your worktodo.txt file.

Then mprime/Prime95 will output a bunch of lines starting with [c]N=[/c] into your results.txt file, instead of its normal output. If you specified 1000 ECM curves, then there will be 1000 lines with [c]N=[/c].

Note, if B1 and B2 aren't the same value in the worktodo.txt line, then [c]GmpEcmHook=1[/c] will be ignored and mprime/Prime95 will just do both stage 1 and stage 2 all by itself, and will output only the typical single line of the form "[c]Mxxxx completed xxx ECM curves, B1=nnnnnnn, B2=nnnnnnnnn[/c]"[/QUOTE]

I need to clarify the last paragraph.

As I mentioned before, if GmpEcmHook is in effect, then your mprime/Prime95 results.txt file will be full of lines that start with [c]N=[/c]

However, the results.txt file will still contain the usual "[c]Mxxxx completed xxx ECM curves, B1=nnnnnnn, B2=nnnnnnnnn[/c]" lines, and if a factor is found in stage 1, then it will display the usual:

[CODE]
ECM found a factor in curve #nnn, stage #1
Sigma=xxxxxxxxxxxxxxxx, B1=3000000, B2=3000000.
UID: you/your_machine, 2^nnnn+1 has a factor: nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn (ECM curve nnn, B1=3000000, B2=3000000)
[/CODE]

The problem is, lines like this will be buried among hundreds or even thousands of lines beginning with [c]N=[/c], depending on how many ECM curves you specified in your worktodo.txt line.

[B]In other words, it's very easy to miss the fact that mprime discovered factors in stage 1![/B]

On Linux you can look for those factors with a command like [c]grep -E -v '^(N=|\[)' results.txt[/c] and in Windows PowerShell you can use [c]sls -notmatch '^(N=|\[)' results.txt[/c]

If the output is too long and scrolls off the screen, you can append [c] | less[/c] to the Linux command, and [c] | Out-Host –Paging[/c] to the PowerShell command, and use the space bar to scroll one screenful at a time.

VBCurtis 2018-12-07 16:53

[QUOTE=storm5510;501966]Since the discussion has gone to [B]GMP-ECM[/B], I have a question:

[COLOR=Blue]GMP-ECM 7.0.5-dev [configured with GMP 6.1.2, --enable-asm-redc] [ECM][/COLOR]

[COLOR=Blue][COLOR=Black]I found a Windows binary of the same version as in the most recent post by [B]ATH[/B], assuming he is referring to Linux. [/COLOR][/COLOR][COLOR=Blue][COLOR=Black]After reading the doc file, and getting it running, I noticed that it does [U]not[/U] produce a results file. However, is is [U]extremely[/U] fast and can use [U]very large[/U] B1 and B2 values.[/COLOR][/COLOR]

[COLOR=Blue][COLOR=Black][U]Question[/U]: Is it just something to toy with, or does it serve a purpose more dedicated to this project? Obviously, one must be able to submit their results.
[/COLOR][/COLOR][/QUOTE]

To make a results file, redirect the screen output to file by ending the command-line with something like ">ecmresults1.txt".

Your commentary that it's extremely fast relies upon choosing a small input. What input number did you test it on? As discussed elsewhere in this thread, GMP-ECM is very fast for small inputs (say, below 2^1500), and rathetr slow for large inputs (over 2^40000).

storm5510 2018-12-07 23:26

[QUOTE=VBCurtis;501985]To make a results file, redirect the screen output to file by ending the command-line with something like ">ecmresults1.txt".

Your commentary that it's extremely fast relies upon choosing a small input. What input number did you test it on? As discussed elsewhere in this thread, GMP-ECM is very fast for small inputs (say, below 2^1500), and rather slow for large inputs (over 2^40000).[/QUOTE]

I have the below in a batch file so I do not have to type it all every time:

[CODE]ecm -v %1 %2 < work.txt[/CODE] What input number? There have been several. I didn't exceed the current PrimeNet ceiling value, (19,999,999).

There are two binaries in the archive I downloaded, [I]ecm.exe[/I] and [I]ecmfactor.exe[/I]. The latter will not run. A Windows 10 issue, I imagine. I found these at a link [B]ATH[/B] had placed in another thread. He has four there, based on different CPU types.

Thank you for replying. :smile:


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

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