mersenneforum.org Python script for search for factors of M1277 using random k-intervals
 Register FAQ Search Today's Posts Mark Forums Read

2020-09-23, 20:36   #23
VBCurtis

"Curtis"
Feb 2005
Riverside, CA

11×409 Posts

Quote:
 Originally Posted by storm5510 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.
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.

2020-09-23, 23:53   #24
storm5510
Random Account

Aug 2009
U.S.A.

2·7·112 Posts

Quote:
 Originally Posted by VBCurtis 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.
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
Batch language can sometimes be strange. However, this worked. Not specifying B2 opens the door for something really big.

 2020-10-18, 18:33 #25 storm5510 Random Account     Aug 2009 U.S.A. 169410 Posts I scrapped the Core2Duo and replaced it with a Xeon Quad. Much better. I looked at the detail for M1277 on mersenne.org. A few people are running ECM's on it. What bounds, it does not display. I also looked at the page titled PrimeNet ECM Progress, 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 100, then it would catch one of the factors on the first pass, and keep on going without finding anything else. When I added -one to the command line, it would stop at the first factor then drop out to the command prompt. The -one parameter is mentioned in a paragraph in the readme file. A few years ago PhilF ran a series of tests beginning with having Prime95 run Stage 1 to 8e8 with GmpEcmHook=1 in batches of 50. He then ran Stage 2 with GMP-ECM. If he did not have -one in his command line, he could have missed something. He ran this round the clock. Anything found with Prime95, 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 readme. People do not like reading documentation and will often stop when they see what they need to get by...
 2020-10-18, 20:29 #26 VBCurtis     "Curtis" Feb 2005 Riverside, CA 11·409 Posts 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?
 2020-10-19, 06:09 #27 LaurV Romulan Interpreter     Jun 2011 Thailand 22·2,239 Posts 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. Last fiddled with by LaurV on 2020-10-19 at 06:09
2020-10-19, 09:23   #28
xilman
Bamboozled!

"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

2×5,197 Posts

Quote:
 Originally Posted by LaurV 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.
For a workaround type "? factorint" in gp and then pay close attention to what you can do with the optional flag argument.

 2020-10-19, 11:32 #29 LaurV Romulan Interpreter     Jun 2011 Thailand 22FC16 Posts I know that. It was just an example, trying to explain VB's dilemma . 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). Last fiddled with by LaurV on 2020-10-19 at 11:39
2020-10-19, 14:54   #30
storm5510
Random Account

Aug 2009
U.S.A.

2·7·112 Posts

Quote:
 Originally Posted by 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?
If he was not 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 mtee. It does the same thing. Then a person would have to do a manual search of each capture file.

Quote:
 Originally Posted by xilman For a workaround type "? factorint" in gp and then pay close attention to what you can do with the optional flag argument.
I am not sure I follow. "ecm ? factorint" produces an error message.

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

Last fiddled with by storm5510 on 2020-10-19 at 15:02

 2020-10-19, 15:48 #31 chris2be8     Sep 2009 36338 Posts On Linux you can use something like: Code: ecm ... | tee -a ecm.log | grep -i factor 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
2020-10-19, 17:02   #32
VBCurtis

"Curtis"
Feb 2005
Riverside, CA

11×409 Posts

Quote:
 Originally Posted by storm5510 If he was not 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.
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.

2020-10-19, 22:04   #33
henryzz
Just call me Henry

"David"
Sep 2007
Cambridge (GMT/BST)

10110011110012 Posts

Quote:
 Originally Posted by VBCurtis 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.
Or better still, use tee

 Similar Threads Thread Thread Starter Forum Replies Last Post ixfd64 Software 1 2020-11-01 20:27 Ghost Information & Answers 4 2018-11-30 04:07 DanielBamberger Data 17 2018-01-28 04:21 Orgasmic Troll Miscellaneous Math 7 2006-06-11 15:38 mfgoode Math 20 2006-02-05 02:09

All times are UTC. The time now is 20:14.

Wed Dec 2 20:14:08 UTC 2020 up 83 days, 17:25, 2 users, load averages: 2.07, 2.07, 2.15