mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2007-05-01, 21:53   #1
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

DB116 Posts
Default Need help to run stage 1 and stage 2 separately

Could someone advise me on how to run Stage 1 and Stage 2 separately, possibly on more than one machine? A couple things to go along with that:

I need to apply the treefile command with k=4 when I run Stage 2. Also, if I run Stage 1 on a Windows PC, is it possible to use the resulting file on a Linux box to run Stage 2? Lastly, I hate an idle processor. Do I have to finish all Stage 1s in a file with Stage 2s, or can I jump back and forth, doing some Stage 2s, leaving some Stage 1s and then adding to the Stage 1s that are left, even after doing some Stage 2s on that same file?
jasong is offline   Reply With Quote
Old 2007-08-12, 03:58   #2
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

2·5·11·71 Posts
Default

Quote:
Also, if I run Stage 1 on a Windows PC, is it possible to use the resulting file on a Linux box to run Stage 2?
Yes.

Quote:
Do I have to finish all Stage 1s in a file with Stage 2s, or can I jump back and forth, doing some Stage 2s, leaving some Stage 1s and then adding to the Stage 1s that are left, even after doing some Stage 2s on that same file?
As soon as the stage one lines are written to results.txt, you can remove them to work on them elsewhere. You can split the file up into chunks. You can put different chunks on different computers. Each line is independent.

We think this is what you are asking but we are not sure.

What we sometimes do is run stage one using Prime95 on a laptop. We pull lines from results.txt to move to various Linux boxes to run stage two. To be safe we sometimes restart Prime95 to make sure it knows stuff is gone, but we think it doesn't care. We have a feeling results.txt is a one-way street.

Xyzzy is offline   Reply With Quote
Old 2007-10-16, 18:52   #3
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

5×701 Posts
Default

Okay, new problem. Though, hopefully, other people can make use of this in the future. In my case, it specifically involves running ecm on Linux, but I intend to learn how to do scripting commands, so I'm hoping I can make stuff for Windows people at some point in the future.

Edit: After actually writing this post, I realized how much work it would be, so no need for flames or polite rebuke. I have plenty of time on my hands, so I'll attempt to accomplish this with the next 2-3 months.

Here are the problems, in list format. I'm not feeling my best, so I'd rather not try to explain them in paragraph form.

(1) I have 4 cores. I want exactly one core to look for completed Step 1 files and run them if found. If no Step 1 file is found, then the core runs a Step 1, after which the script starts over. The other three cores JUST run Step 1.

(2) (a) At the moment, the scripts I'm using, made by someone else, only seem to allow running one number and one set of curve parameters. Plus, I can't control how many curves are done, it's simply a matter of stopping the scripts and resetting the parameters when I want to change things. (Although the person who created the scripts is very much appreciated. :) )

(b) It would be nice to have a function(script? not good with the lingo) that could take a number and assign the computer a certain number of curves for that number, at a certain level. I'm thinking it could work a bit like sr2sieve and sr2work.txt operate.

(3) Lastly, with the scripts I'm using, I've had to learn some bash commands to figure out how much progress has been made and to look for factors. You can come up with any way you want to track this, but I'm hoping it can be simplified.

What I'm thinking for as a solution to number 3 would be to have an assignment file with a specific name. People would be discouraged from changing the file, except to correct errors or remove assignments(although this could cause error correction headaches for the programmer). Basically each assignment would get a number, starting with either zero or 1, then incrementing by 1 for each new assignment. Then there would be a space and the number to be worked on in expanded format, the next line would give number of curves needed and either just the B1, which would mean use B2=B1*100, or would have a special letter to indicate use of the "special" method(can't remember it's name)
jasong is offline   Reply With Quote
Old 2007-10-24, 08:09   #4
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

5·701 Posts
Default

Okay, people probably got bored after reading that long post when it was first written.

Before I post a recap, does anybody think I'd be better off in another forum? I'm thinking I might get a better response in the Programming or Linux forum.

Anyway, what I'm generally needing is a program(s) or script(s) that will

(1) run Stage 1 ecm on three cores. This would basically involve sending command-line arguments to an invisible(virtual?) bash session.

(2) Run Stage 2 on any completed Stage 1s, if there are no Stage 1s available run a Stage 1

(3) It would be nice if I could run curves on more than one number at a time, with different B1 values. The ecm program would decide the B2 value based on the B1 value, this is something that the ecm program does automatically. The script writer doesn't need to learn the special math involved.

(4) A way to track everything. The alias command seems to expire after a while, not sure why, but something as simple as a file I could print out that would give instructions on commands to track various things(found factors, how many curves on the various numbers, whether or that the Stage 1s are building up to an unusual level, which they are at the moment)

I need a saviour, and the miracles I'm asking for don't even have to break the laws of physics. ;)
jasong is offline   Reply With Quote
Old 2007-10-24, 10:45   #5
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

2×5×11×71 Posts
Default

Quote:
The alias command seems to expire after a while...
It goes in your ~/.bashrc file, so it is parsed with each session.

As for all your other stuff, we cannot figure out why you want to make things so complicated.
Xyzzy is offline   Reply With Quote
Old 2007-10-24, 19:22   #6
wblipp
 
wblipp's Avatar
 
"William"
May 2003
New Haven

22·32·5·13 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
we cannot figure out why you want to make things so complicated.
My guess is that he wants to keep all four cores busy on ECM but ensure that at most one memory-intensive stage 2 is ever running, all without hand shuffling the work.
wblipp is offline   Reply With Quote
Old 2007-10-24, 20:07   #7
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

5×701 Posts
Default

Quote:
Originally Posted by wblipp View Post
My guess is that he wants to keep all four cores busy on ECM but ensure that at most one memory-intensive stage 2 is ever running, all without hand shuffling the work.
Exactly.
jasong is offline   Reply With Quote
Old 2007-10-25, 01:31   #8
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

2×5×11×71 Posts
Default

In our (limited) experience, stage two takes longer than stage one, and if you are only running one stage two against three stage ones, you'll fall further and further behind.

Fortunately, the numbers we are working on fit within 512MB easily, so our dual core box can get by on just 1GB of memory.
Xyzzy is offline   Reply With Quote
Old 2007-10-25, 20:50   #9
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

5×701 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
In our (limited) experience, stage two takes longer than stage one, and if you are only running one stage two against three stage ones, you'll fall further and further behind.

Fortunately, the numbers we are working on fit within 512MB easily, so our dual core box can get by on just 1GB of memory.
I could be totally or partially wrong about this, but I'm guessing your experience is with p-1 rather than ecm. If you have 4 equal cores, 3 are only running Stage 1, and the last core is either running Stage 2 on available Stage 1s or running a Stage 1, then it can easily keep up.

In my case, though, the 4th core is deciding to run another Stage 1 when there are already Stage 1s available, which is bugging me.
jasong is offline   Reply With Quote
Old 2007-10-25, 22:32   #10
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

2×5×11×71 Posts
Default

We stand corrected. Looking back at our logs, stage 2 takes less time than stage 1.

Xyzzy is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
P-1 stage 1 only Siegmund PrimeNet 1 2016-12-13 01:45
How to use prime95 for stage 1 & GMP-ECM for stage 2 Prime95 Lone Mersenne Hunters 111 2015-06-13 03:18
Stage 1 with mprime/prime95, stage 2 with GMP-ECM D. B. Staple Factoring 2 2007-12-14 00:21
Stage 1 and stage 2 tests missing Matthias C. Noc PrimeNet 5 2004-08-25 15:42
P-1 stage 2 with GMP-ECM 5 ? hbock Software 9 2004-05-06 10:42

All times are UTC. The time now is 17:27.

Sun Nov 29 17:27:19 UTC 2020 up 80 days, 14:38, 4 users, load averages: 2.03, 1.74, 1.56

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.