Join PrimeGrid
Returning Participants
Community
Leader Boards
Results
Other
drummers-lowrise
|
Message boards :
Sieving :
P-1 factoring discussion
Author |
Message |
geoff Volunteer developer Send message
Joined: 3 Aug 07 Posts: 99 ID: 10427 Credit: 343,437 RAC: 0
 
|
Since the gcwsieve algorithm is much less efficient than the sr2sieve algorithm, I think P-1 factoring of Cullen/Woodall candidates will become worthwhile at a much earlier stage than for Sierpinski/Riesel candidates. I am not totally sure about this, but it seems to make sense intuitively.
If so, then since the 64-bit gcwsieve is twice as fast as the 32-bit version but 64-bit Prime95 is not much faster than the 32-bit version for P-1, it will become worthwhile doing P-1 quite a bit earlier on 32-bit machines than on 64-bit machines.
Has anyone looked into the best point to stop sieving and start P-1?
I did one test on my P4, a Northwood at 2.9GHz, with the Cullen candidate 3800013*2^3800013+1. I put the following line into worktodo.ini (because the candidate has been sieved to 2^43, and a factor saves 2 LLR tests):
Pfactor=3800013,2,3800013,+1,43,2
mprime 24.14 took 1572 seconds to complete. The selected bounds were B1=45000, B2=652500 and the estimated chance of finding a factor was 2.7%. (This assumes the candidate has been sieved to 2^43 or about 8796e9, actually it has been sieved deeper).
That means the time per factor should be 1572/0.027 = 58222 seconds.
Then I tried gcwsieve 1.1.5 over the range 8796e9-8800e9 on the same machine, using the current (58714 candidate) 3M-4M combined sieve file. The expected number of factors is 0.55 and the speed is 80000 p/sec.
The time per factor should be (8800e9-8796e9)/80000/0.55 = 90909 seconds.
There may be things I haven't considered, but it appears to be worthwhile switching this machine to P-1 rather than continuing sieving the 3M-4M range.
| |
|
|
any teaching on doing such kind of work? | |
|
|
I got the required program and doing some test.
What I have done is that install Prime95,create a worktodo.ini and paste a line into it. Is that right?
(I am doing 3999831,+1,what a strange start! LOL) | |
|
|
I got the required program and doing some test.
What I have done is that install Prime95,create a worktodo.ini and paste a line into it. Is that right?
(I am doing 3999831,+1,what a strange start! LOL)
Can you send me the worktodo.txt
It don't seems correct.
Lennart
EDIT
[Worker #1]
Pminus1=3750223,2,3750223,-1,500000,6000000
Pminus1=3750243,2,3750243,-1,500000,6000000
Pminus1=3750248,2,3750248,-1,500000,6000000
Pminus1=3750271,2,3750271,-1,500000,6000000
Pminus1=3750272,2,3750272,-1,500000,6000000
Try this in worktodo.txt
| |
|
|
What's that?
Doing 2jobs in same time? | |
|
|
What's that?
Doing 2jobs in same time?
What do you mean?
1 line at the time.
Just past whis in your file( you may test with only one line.
Worker #1]
Pminus1=3750223,2,3750223,-1,500000,6000000
Its only doing one to its finnish then move over to next.
Or are you doing 2 task now?
Lennart | |
|
|
No! Is just a mistake.
I thought you have a method to do two jobs at same time and so do I. | |
|
|
No! Is just a mistake.
I thought you have a method to do two jobs at same time and so do I.
I don't think you gain anything to run 2 Task.
Lennart | |
|
|
That's not my meaning!
I know running only one work is better.
Is just a "word-misunderstanding",LOL.
EDIT:where is the file and its name if a factor is found? | |
|
|
That's not my meaning!
I know running only one work is better.
Is just a "word-misunderstanding",LOL.
EDIT:where is the file and its name if a factor is found?
Yes i am sorry for my bad english :(
Lennart | |
|
|
OH! Not your problem.
Actually, its my problem.(LOL)
I have to say, I am 16-yr-old only and my mother langauge isn't English. | |
|
|
What's the meaning?(from result.txt)
3999831*2^3999831+1 completed P-1, B1=500000, Wc1: 6792D8F5
| |
|
|
EDIT:where is the file and its name if a factor is found?
Its in the result.txt
____________
| |
|
|
No! Is just a mistake.
I thought you have a method to do two jobs at same time and so do I.
I don't think you gain anything to run 2 Task.
Lennart
If you have a single-core, or a hyperthreaded, machine, then you don't gain anything (actually you can theoretically gain a small amount if you run two tasks with hyperthreading, but it generally doesn't matter); however, if you have a dualcore or quadcore, or multiple CPUs, then you'll need to run multiple instances of the application to fully utilize it. (Otherwise you're letting all but one of your cores go to waste.)
The same goes for all other distributed computing apps; BOINC takes care of this automatically unless you set it to use a smaller number of CPUs, but with manual apps, they're generally not multithreaded.
____________
| |
|
|
What's the meaning?(from result.txt)
3999831*2^3999831+1 completed P-1, B1=500000, Wc1: 6792D8F5
This means that P-1 factoring was completed on the number, but no factors were found.
Note: If you set Prime95 so that it's allowed to use more memory (preferably 512 MB or more if you've got plenty) then it has a better chance of finding a factor in stage 2, I've heard.
____________
| |
|
|
Are P-1 factoring reservations for the 4M-5M range handled here, too? I only see the 3.75-4M file here.
Oh, and by the way, if you use Pfactor= instead of Pminus1= in the worktodo.ini file entry, you can enter B1 and B2 based on the sieving depth, and how many LLR tests a factor saves, and Prime95 will pick the B1 and B2 for you automatically. (This is how they do it over at Riesel Sieve, for example.)
Here's the format for that:
Pfactor=k,2,n,[+1 or -1],[Sieve depth in terms of 2^x],[How many LLR tests a factor saves]
An example of how that might look would be:
Pfactor=4000029,2,4000029,-1,42,2
If the candidate has been sieved to 2^42, and a factor saves 2 LLR tests.
Are there any advantages to picking the B1 and B2 using either method? Or, are the B1 and B2 values you specified simply the same as Prime95 would have picked for the values such as the ones above (tuned for the 3M-4M range, of course)?
____________
| |
|
|
Does anyone know the odds of these numbers yielding a p-1 factor? Also, as the n-value gets larger, a p-1 test prevents more and more unneeded work, so it would make sense if that caused the B1/B2 values to go up. Which leads to my next question:
How were the B1/B2 values calculated? | |
|
|
Next question: Is there an easy way to track the progress of the primetesting? I want to know how much time I have to turn in my numbers, that will affect my reservations AND how often I send those emails. | |
|
|
Does anyone know the odds of these numbers yielding a p-1 factor? Also, as the n-value gets larger, a p-1 test prevents more and more unneeded work, so it would make sense if that caused the B1/B2 values to go up. Which leads to my next question:
How were the B1/B2 values calculated?
Hopefully 1 in 12.
They were picked to have a reasonable chance of finding factors.
| |
|
|
What's the meaning?(from result.txt)
3999831*2^3999831+1 completed P-1, B1=500000, Wc1: 6792D8F5
It looks like you have not given Prime95 enough memory to do Stage2.
What are your memory settings? If you don't know, look into the local.ini file. For example,
DayMemory=320
NightMemory=320
DayStartTime=450
DayEndTime=1410
tells Prime95 to use 350MB no matter the time of day. | |
|
|
What's the meaning?(from result.txt)
3999831*2^3999831+1 completed P-1, B1=500000, Wc1: 6792D8F5
This means that P-1 factoring was completed on the number, but no factors were found.
Note: If you set Prime95 so that it's allowed to use more memory (preferably 512 MB or more if you've got plenty) then it has a better chance of finding a factor in stage 2, I've heard.
Unless you are letting B2 default, what you say about "better chance" is incorrect. Increasing memory for a fixed B2 just speeds things up, it does not change the odds of finding a factor. Increasing B2 does change the odds of finding a factor. If you do not specify B2 then Prime95 picks B2 based on the amount of memory you allow it to use.
If you don't give the program enough memory, it will not run stage 2 so B2 is irrelavant. The odds of finding a factor depend only on B1 in that case. | |
|
John Honorary cruncher
 Send message
Joined: 21 Feb 06 Posts: 2875 ID: 2449 Credit: 2,681,934 RAC: 0
                 
|
Next question: Is there an easy way to track the progress of the primetesting? I want to know how much time I have to turn in my numbers, that will affect my reservations AND how often I send those emails.
Unfortunately, no easy way right now. Currently we're at least 2-3 weeks out before PG reaches the 3.75M range.
____________
| |
|
|
For those of you who have Intel quad-cores, or core2Duos, performance is absolutely horrendous when you're doing Stage 2 p-1 on cores 0 and 1 simultaneously, or cores 2 and 3 simultaneously. The solution, if doing 2 Stage 2s, is pick one core of 0 and 1, and one core of 2 and 3, and set the affinity for those cores. This is not a problem for the beta version of the program, just set the affinity for each core and don't worry about it. For version 24.x(x being any number from 1 to 14), it's a bit more of a hassle. You need to figure out how to set affinity AND how to make half the cores only do Stage 1. Then after the Stage 1s are done, you have to manually switch them to the Prime95 directory of the instance that is doing the Stage 2s, though that instance won't necessarily be doing Stage 2s at that very second. After you switch them over, stop the program, bring up the status window, close the status window, and start the program up again. I'm not sure if stopping the program is necessary, but the status window part is DEFINITELY necessary if you're adding work to Prime95 after it's already started. Bringing up the status window guarantees the program is aware of the extra stuff.
Back to the performance numbers. When I'm talking about performance, the situation is EXTREME. When I run p-1 Stage 2 on both cores 0 and 1, the total time for a candidate is about 30 hours, when I run just one Stage 2, the total time is a little under 5 hours. So a difference of a factor of about 6(a little less). Btw, Stage 2s, when core assignment is done as I've instructed, is fast enough that the Stage 1s don't build up faster than the computer can complete the Stage 2 for them.
From Philmoore at Mersenne Forum(thanks dude :) : Set B2 equal to 1 to skip stage 2. Setting it equal to 0 causes mprime to take B2=100*B1 in most cases (B2 must be < 4.29e9). Setting B2 to any positive value < the B1 limit will cause B2 to be skipped.
(Please don't delete this post, people need the information here. But if you want to edit it, go for it) | |
|
|
I have made a slight error. Apparently, the cpu affinity isn't the issue, it's the RAM bandwidth. If you use 800MHz RAM(never tried the faster stuff, not ever) then you can only use one instance of p-1 without causing a major slowdown. The effect is that, if more than one core is running Stage 2, one core runs normally and the other(s) run dog slow.
At this point I'm not sure if one core can cope with the Stage 1 save files and complete all the necessary Stage 2s without the work being backlogged. Dual core owners need not be concerned. | |
|
|
I have made a slight error. Apparently, the cpu affinity isn't the issue, it's the RAM bandwidth. If you use 800MHz RAM(never tried the faster stuff, not ever) then you can only use one instance of p-1 without causing a major slowdown. The effect is that, if more than one core is running Stage 2, one core runs normally and the other(s) run dog slow.
At this point I'm not sure if one core can cope with the Stage 1 save files and complete all the necessary Stage 2s without the work being backlogged. Dual core owners need not be concerned.
You could always set the different instances to be allowed to use a bunch of RAM during different times of the day, and during the rest of the day, only a little, say 128 MB...this will force Prime95 to do Stage 2 only during the time of day where it can use more RAM. Set them all so they each have 1/4 of the time of day you'll be running them, and they'll all simply take turns (Prime95 will hold on to the Stage 1 save files until it can do Stage 2).
____________
| |
|
|
I have made a slight error. Apparently, the cpu affinity isn't the issue, it's the RAM bandwidth. If you use 800MHz RAM(never tried the faster stuff, not ever) then you can only use one instance of p-1 without causing a major slowdown. The effect is that, if more than one core is running Stage 2, one core runs normally and the other(s) run dog slow.
At this point I'm not sure if one core can cope with the Stage 1 save files and complete all the necessary Stage 2s without the work being backlogged. Dual core owners need not be concerned.
You could always set the different instances to be allowed to use a bunch of RAM during different times of the day, and during the rest of the day, only a little, say 128 MB...this will force Prime95 to do Stage 2 only during the time of day where it can use more RAM. Set them all so they each have 1/4 of the time of day you'll be running them, and they'll all simply take turns (Prime95 will hold on to the Stage 1 save files until it can do Stage 2).
Actually, Anonymous, in the specific case of the E6600 quad-core(I can't speak for other quad-cores) the problem is that Stage 1 for these numbers takes 1hr40min and Stage 2 takes 1hr20min. Not only that, but if the first two cores or the second two cores both together have p-1 going, there's a slowdown. The only answer is to pick a core to do both Stage 1 and Stage 2, pick one of the two cores on the opposite side to only do Stage 1(and switch it over for Stage 2 later) and the two cores that are left have to choose something that isn't high bandwidth.
Anything else would make things worse than running two cores for p-1 and having two cores idle. | |
|
|
Suddenly my prime95 is saying not enough memory to do stage 2 which is bull because there is over 500Mb ram available and settings are for max use of 500Mb ram.
Also I've noticed when running Boinc LLR prime95 runs REALLY slow.. (only ~35% CPU usage)
Any Ideas?
____________
| |
|
|
Suddenly my prime95 is saying not enough memory to do stage 2 which is bull because there is over 500Mb ram available and settings are for max use of 500Mb ram.
Also I've noticed when running Boinc LLR prime95 runs REALLY slow.. (only ~35% CPU usage)
Any Ideas?
maybe over 512mb
my setting is 768mb | |
|
|
Suddenly my prime95 is saying not enough memory to do stage 2 which is bull because there is over 500Mb ram available and settings are for max use of 500Mb ram.
Also I've noticed when running Boinc LLR prime95 runs REALLY slow.. (only ~35% CPU usage)
Any Ideas?
maybe over 512mb
my setting is 768mb
upped the setting to 600... no more not enough memory errors... maybe it was just a one off event.. but when running llr the speed is still really slow... I dont know if its memory restrictions or what but it uses a max of 35% of cpu (70% of one core)
Also I have found that for the optimal depth of 96000s per factor is best obtained by using:
pfactor=NUMBER TO BE TESTED, 44.7, 4
ie. Pfactor=3800013,2,3800013,+1,44.7,4
What are others noticing?
____________
| |
|
|
Strange message in results.txt...
3751392*2^3751392+1 does not need P-1 factoring.
????????????????????????????????
____________
| |
|
|
Using Pfactor= and prime95 version 25.4 I am getting a factor every approx. 45,444s
core2 duo E6400 @2.6Ghz (OC'ed)
1Gb ram
I know that using the B1=500000 and B2=6000000 takes a lot longer than this on my PC.
Also I am doing the ranges using pfactor= and I found a factor that wasn't found in StephanoD's range. I also found the 2 that he did.
Pfactor selects the bounds of B1=90000 and B2=1440000
Anyone know why I found the extra factor? and also what are others seeing for the seconds per factor?
~BoB
____________
| |
|
|
As a reminder to all P-1 Sievers The whole goal is to find a factor in less time than it takes to do an LLR test.
From my testing I have found it is better to run Pfactor= than Pminus1= (see P-1 discussion thread)
Please do your own tests to see which one finds factors better.
Since I found it better to use Pfactor= I have created a separate available candidates page for it located here
Also for multi core systems I recommend trying Prime95 version 25.4 available here ( I found better results using all cpu's (cores) than multiple worker threads but again test and see what works best for you.)
~Bob
____________
| |
|
|
Has anyone thought of doing a bit of sieving on these numbers with newpgen? I tried a number and it was banging along at about 10G every minute and a half on a core of my 2.4GHz Intel quad-core.
If it's worthwhile, maybe someone could come up with a batch file that runs these numbers in succession up to a certain level. It would be slower than Prime95, but we might be able to kill a few more numbers. | |
|
|
Has anyone thought of doing a bit of sieving on these numbers with newpgen? I tried a number and it was banging along at about 10G every minute and a half on a core of my 2.4GHz Intel quad-core.
If it's worthwhile, maybe someone could come up with a batch file that runs these numbers in succession up to a certain level. It would be slower than Prime95, but we might be able to kill a few more numbers.
We can use any program programmed to handle woodall and cullen numbers but the bottom line is, Can we find factors faster than it takes to do a LLR test on that number.
If it takes 96,000s to run a LLR (2 tests added together) and it takes less than 96,000 per factor then its worth it. If it takes more than 96,000s per factor then its not worth it as we could eliminate the number with LLR faster.
~BoB
____________
| |
|
|
I talked to some people in Mersenne forum(a very good place for questions like this) and apparently it IS worthwhile, the question is how high to go.
I'm willing to do a bit of legwork, but are people wanting to add this project to the list, seeing as how it could get rid of some more numbers?
One other thing is that if we're going to add this, then it should be done BEFORE p-1, since it will probably increase the recommended parameters, at least in terms of B1, if not B2. | |
|
|
*bump*
That newpgen idea was a bust, I simply forgot to post that fact here.
Could we get an update on where things stand right now? As in, whether or not it's safe to just start at the top of the file that's supplied? (I mean the 3.75M-4M file) | |
|
|
*bump*
That newpgen idea was a bust, I simply forgot to post that fact here.
Could we get an update on where things stand right now? As in, whether or not it's safe to just start at the top of the file that's supplied? (I mean the 3.75M-4M file)
Don't start on that file. Wait until jmblazek answer you.
Lennart
____________
| |
|
John Honorary cruncher
 Send message
Joined: 21 Feb 06 Posts: 2875 ID: 2449 Credit: 2,681,934 RAC: 0
                 
|
*bump*
That newpgen idea was a bust, I simply forgot to post that fact here.
Could we get an update on where things stand right now? As in, whether or not it's safe to just start at the top of the file that's supplied? (I mean the 3.75M-4M file)
Thanks for the interest. I updated the page. We are currently testing all n<4.3M. Therefore, 4.3M-5M is available.
cwcombined 4.3M-5M
Our rate has been around a 100K range every two weeks. So we should be releasing 4.3M-4.4M at the end of next week.
____________
| |
|
Message boards :
Sieving :
P-1 factoring discussion |