mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Factoring (https://www.mersenneforum.org/forumdisplay.php?f=19)
-   -   Python script for search for factors of M1277 using random k-intervals (https://www.mersenneforum.org/showthread.php?t=25941)

VBCurtis 2020-09-23 20:36

[QUOTE=storm5510;557658]I needed to go back a look through the parameters again anyway. I was unaware RAM usage could be restricted. Thanks!

14 hours for each stage one curve on that machine with B1 = 6e9. I am loading it in groups of 10, a single curve in each work line. 5.8 days for the group. Then I will go to GMP-ECM. Once finished, repeat the process.[/QUOTE]

Once you finish the first batch of 10 on stage 1, one core can do stage 2 while the other does the next batch of stage 1. Stage 1 doesn't take nearly as much memory.

The "k" parameter in GMP-ECM controls how many chunks of work stage 2 is divided into. Restricting memory simply cuts the job into more chunks- a small loss in time, but the same job gets done. Using -maxmem tells GMP-ECM to choose a k that keeps memory below your designated cutoff.

storm5510 2020-09-23 23:53

[QUOTE=VBCurtis;557676]Once you finish the first batch of 10 on stage 1, one core can do stage 2 while the other does the next batch of stage 1. Stage 1 doesn't take nearly as much memory.

The "k" parameter in GMP-ECM controls how many chunks of work stage 2 is divided into. Restricting memory simply cuts the job into more chunks- a small loss in time, but the same job gets done. Using -maxmem tells GMP-ECM to choose a k that keeps memory below your designated cutoff.[/QUOTE]

I found my archive. The original line, like below, is in a short batch file. I did it this way so I would not have to try to remember all the parameters. I modified it to match the current work.

[CODE]echo "2^1277-1" | ecm -v -maxmem 3072 -resume results.txt -savea gmp_results.txt 6e9-6e9
[/CODE]Batch language can sometimes be strange. However, this worked. Not specifying B2 opens the door for something really big.

storm5510 2020-10-18 18:33

I scrapped the Core2Duo and replaced it with a Xeon Quad. Much better.

I looked at the detail for [B]M1277[/B] on [I]mersenne.org[/I]. A few people are running ECM's on it. What bounds, it does not display.

I also looked at the page titled [URL="https://www.mersenne.org/report_ecm/"]PrimeNet ECM Progress[/URL], and I see the last group of curves, 360,000 in all, were ran with B1 at 8e8 (800,000,000). Adding all the curve requirements across the page comes up to 552,500, if I did not miss anything.

I created a test batch file for GMP-ECM using M1861. It has four factors, two of which are relatively small. In every case, it found one or the other of the small factors regardless of the Sigma value. If I ran it in looping mode, like this: [C]-c 100[/C], then it would catch one of the factors on the first pass, and keep on going without finding anything else. When I added [C]-one[/C] to the command line, it would stop at the first factor then drop out to the command prompt. The [C]-one[/C] parameter is mentioned in a paragraph in the [I]readme[/I] file.

A few years ago [B]PhilF[/B] ran a series of tests beginning with having [I]Prime95[/I] run Stage 1 to 8e8 with [C]GmpEcmHook=1[/C] in batches of 50. He then ran Stage 2 with GMP-ECM. If he [U]did not have[/U] [C]-one [/C]in his command line, he could have missed something. He ran this round the clock. Anything found with [I]Prime95[/I], he would have known about because it would be in the submitted portion of the results. I feel it may be remotely possible something was was missed by those who used GMP-ECM and did not pay close attention to the contents of [I]readme[/I]. People do not like reading documentation and will often stop when they see what they need to get by...

VBCurtis 2020-10-18 20:29

I don't follow what you're saying. How would he have missed something?
-one is a flag that asks GMP-ECM to stop when any factor is found. What does setting that have to do with missing a factor?

LaurV 2020-10-19 06:09

Maybe he is a bit confused by the fact that some factorization programs will not display anything until the input is fully factored - they miss a "pre-factor" or "partial factor" function, for example the "factorint(n)" function in pari/gp will not return until the n is fully factored, therefore, if you start it and let it run for a while, then abort it with ctrl+c (because it didn't display nor logged any factor), then you "lose" the factors it found meantime. Fortunately, not the case for ECM.

xilman 2020-10-19 09:23

[QUOTE=LaurV;560273]Maybe he is a bit confused by the fact that some factorization programs will not display anything until the input is fully factored - they miss a "pre-factor" or "partial factor" function, for example the "factorint(n)" function in pari/gp will not return until the n is fully factored, therefore, if you start it and let it run for a while, then abort it with ctrl+c (because it didn't display nor logged any factor), then you "lose" the factors it found meantime. Fortunately, not the case for ECM.[/QUOTE]
For a workaround type "? factorint" in gp and then pay close attention to what you can do with the optional flag argument.

LaurV 2020-10-19 11:32

I know that. It was just an example, trying to explain VB's dilemma :razz:. In spite of that, there may be cases when factorint() "knows" internally a factor, but you lose it if you quit with ctrl+c, like for example, multiple ECM factors - one is found very fast but it is not written out, and the ECM continues with the cofactor. Therefore, if you "break", you may want to print n before exiting from break environment. You may have the surprise it is smaller than your initial n.

(However, indeed, some people don't know how to proper use pari functions, so your comment is welcome).

storm5510 2020-10-19 14:54

[QUOTE=VBCurtis]I don't follow what you're saying. How would he have missed something?
-one is a flag that asks GMP-ECM to stop when any factor is found. What does setting that have to do with missing a factor?[/QUOTE]

If he was [U]not[/U] using it on long runs. Not using it would allow a found factor to roll off the top of the screen as the program continued to run.

A minor workaround would be to use something to capture every line appearing on the screen and writing it into a text file. I believe Linux may have something like this built in. In the past, I have used a little program called [I]mtee[/I]. It does the same thing. Then a person would have to do a manual search of each capture file.

[QUOTE=xilman]For a workaround type "? factorint" in gp and then pay close attention to what you can do with the optional flag argument. [/QUOTE]

I am not sure I follow. "ecm ? factorint" produces an error message.

[U]Edit[/U]: I just sent a message to PhilF to see if he was using the [C]-one[/C] option in his processes.

chris2be8 2020-10-19 15:48

On Linux you can use something like:
[code]
ecm ... | tee -a ecm.log | grep -i factor
[/code]

That writes all output to ecm.log (or whatever you call the log file) and writes just lines containing factor to the screen. I would have as many running as I have cores (each with its own log) all writing to one terminal window if they find a factor.

Chris

VBCurtis 2020-10-19 17:02

[QUOTE=storm5510;560315]If he was [U]not[/U] using it on long runs. Not using it would allow a found factor to roll off the top of the screen as the program continued to run.
[/QUOTE]
Hardly any of us use ECM with solely screen output. In windows or linux, put > outputfile.txt at the end of your ECM invocation. It's rather challenging to keep records of ECM levels without logs, you know?

Or, manage ECM with ecm.py. That way, just one log for any ECM work.

henryzz 2020-10-19 22:04

[QUOTE=VBCurtis;560341]Hardly any of us use ECM with solely screen output. In windows or linux, put > outputfile.txt at the end of your ECM invocation. It's rather challenging to keep records of ECM levels without logs, you know?

Or, manage ECM with ecm.py. That way, just one log for any ECM work.[/QUOTE]

Or better still, use tee


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

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