mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2002-12-24, 05:45   #1
pin
 
Dec 2002

210 Posts
Default amount of memory needed for Stage 2 (factor)

hiya, i'm new here and i got a problem, and i can't seem to solve it myself, and initial searches on the forum hasn't turned up what i'm looking for...

Prime95 is running great, except it keeps telling me:

"Not enough memory available to run stage 2 now" regarding finding a factor.

i suspect i have my settings screwed up. i have been playing around with the CPU available memory settings, first raising them to 32 and then lowering them to 12 or so. still no luck. i have closed down almost everything i'm running and still no luck.

i'm running winxp on my PC with a p4 / 1.8 GHz / 480 MB.

any suggestions as to what i may be doing wrong? i think i ought to have enough power to handle this, but maybe i'm just being arrogant! just how much memory IS required to run the second stage?
=)

thx!
pin is offline   Reply With Quote
Old 2002-12-24, 11:34   #2
Ian_H
 
Aug 2002
Europe

2·3·5 Posts
Default Re: amount of memory needed for Stage 2 (factor)

Quote:
Originally Posted by pin
just how much memory IS required to run the second stage?
The README.TXT file in your Prime95 folder covers this well (under "SETTING AVAILABLE MEMORY") and is worth looking at (as is the whole README). At section 4 you can read:

Exponent Minimum Reasonable Desirable
-------- ------- ---------- ---------
6000000 12MB 23MB 33MB
10000000 19MB 36MB 53MB
33000000 65MB 125MB 185MB
Ian_H is offline   Reply With Quote
Old 2002-12-24, 15:19   #3
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×641 Posts
Default Amount of memory needed for V22 P-1 Stage 2 factoring

Quote:
Originally Posted by README.TXT
Exponent Minimum Reasonable Desirable
-------- ------- ---------- ---------
6000000 12MB 23MB 33MB
10000000 19MB 36MB 53MB
33000000 65MB 125MB 185MB
Recently V22 raised the P-1 stage 2 memory requirements, but this change has not yet been reflected in README.TXT.

According to my calculations (based on a reading of V22.12 source code), the P-1 stage 2 minimum requirements and desirable amounts for V22 Prime95 are:

exponent - - minimum - - desirable

6000000 - - - - 15MB - - - 45MB

10000000 - - - - 20MB - - - 60MB

18000000 - - - - 39MB - - - 119MB

33000000 - - - - 68MB - - - 209MB

CORRECTION: I mistakenly listed the new V22 "desirable" memory requirements as for 13 temporary storage areas instead of for 12 temporaries. My understanding is that Prime95 uses a maximum of 12 temporaries during P-1 stage 2, so that the above should read:
[list]exponent - - minimum - - desirable
6000000 - - - - - 15MB - - - 42MB
10000000 - - - - 20MB - - - 55MB
18000000 - - - - 39MB - - - 110MB
33000000 - - - - 68MB - - - 193MB[/list:u]
cheesehead is offline   Reply With Quote
Old 2002-12-24, 18:56   #4
Ian_H
 
Aug 2002
Europe

3010 Posts
Default

Thanks, Cheesehead - a useful update. I'll tweak some settings shortly...!
Ian_H is offline   Reply With Quote
Old 2002-12-24, 19:29   #5
smh
 
smh's Avatar
 
"Sander"
Oct 2002
52.345322,5.52471

29×41 Posts
Default Re: amount of memory needed for Stage 2 (factor)

Quote:
Originally Posted by pin
"Not enough memory available to run stage 2 now" regarding finding a factor.
The program is running a P-1 test in the hope it finds a factor so it doesn't have to run a lengthy LL test.

The P-1 test concistes of two stages, of which the second stage needs the most memory.

A few things can cause this:

Both your daytime and nighttime memory settings are too low (as mentioned above) to run stage 2. If you can't give the test more memory, too bad, the second stage won't be run. Worst that can happen is that you miss a factor, but you will prove the number composite with a LL test anyway.

It can also be the case that the available memory during the night time is enough for running stage 2, but as soon as it gets daytime (you can set this time yourself), less memory is available. The program stops stage 2 and continues doing other things until it gets night time again and enough memory is available to continue the test.

if that PC is running 24/7 and noone is using it during the night, you might consider giving the program more memory during that time, something like 200mb, so it'll continue during the nights. As long as performance doesn't suffer you can increase the daytime memory too. It's only used during P-1 stage 2. The default settings are a bit conservative for pc's with enough memory available.
smh is offline   Reply With Quote
Old 2002-12-25, 00:55   #6
pin
 
Dec 2002

2 Posts
Default

thx for the help.. looks like my cpu settings were indeed too low! thx again.
pin is offline   Reply With Quote
Old 2002-12-31, 21:55   #7
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

170148 Posts
Default

Please note the correction to my Dec 24 posting above.
cheesehead is offline   Reply With Quote
Old 2003-03-18, 17:50   #8
eepiccolo
 
eepiccolo's Avatar
 
Dec 2002
Frederick County, MD

17216 Posts
Default Re: Amount of memory needed for V22 P-1 Stage 2 factoring

Quote:
Originally Posted by cheesehead
[list]exponent - - minimum - - desirable[*]6000000 - - - - - 15MB - - - 42MB[*]10000000 - - - - 20MB - - - 55MB[*]18000000 - - - - 39MB - - - 110MB[*]33000000 - - - - 68MB - - - 193MB[/list:u]
So, what happens if you have the minimum memory availible, rather than the desirable amount availible? Will the P-1 stage 2 factoring just go slower, or is it posible that a factor might be missed that would have been found if the memory was set higher?
eepiccolo is offline   Reply With Quote
Old 2003-03-18, 18:49   #9
garo
 
garo's Avatar
 
Aug 2002
Termonfeckin, IE

53148 Posts
Default

Yes a factor may be missed but the chance it not large enough to be worried about. We are talking about say a 3.5% chance instead of a 4.5% chance. Note: numebrs off the top of my head.

More memory actually makes P-1 slower as it means P-1 does more work - larger bounds - but ti works out as then you have more chance of finding a factor.

Garo
garo is offline   Reply With Quote
Old 2003-03-18, 18:54   #10
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×641 Posts
Default Re: Amount of memory needed for V22 P-1 Stage 2 factoring

Quote:
Originally Posted by eepiccolo
So, what happens if you have the minimum memory availible, rather than the desirable amount availible?
It's the classic time vs. space tradeoff.

Prime95 allocates work areas ("temporaries") in storage for P-1 stage 2 to hold certain computed values so that when it needs them later in that stage it can just pick those values up instead of re-computing them. It requires at least 2 (IIRC) temporaries, which is how many it will allocate if the available storage is the "minimum" shown in the table above.

There's an upper limit (12) to the number of temporaries Prime95 will use, and that's what it will allocate if the available storage is the "desirable" shown.

The "reasonable" amounts listed in some versions of the table are simply the average of the "minimum" and "desirable" amounts. There's nothing special about the "reasonable" amounts, and there's no particular difference in program behavior above/below those amounts.

Quote:
Will the P-1 stage 2 factoring just go slower, or is it posible that a factor might be missed that would have been found if the memory was set higher?
Both.

A) The more temporaries it has, the fewer times the software has to re-compute certain values, so the faster it will run.

B) The stage 2 software will employ an enhancement (Suyama's improvement) that can find more factors, if there are at least a certain number of temporaries. (I don't remember that certain number, but it's more than 2 and not more than 12.)

So above a certain amount of available memory (which is not related to the "reasonable" amounts I mentioned earlier), the software can indeed find factors that would have been missed if the available memory had been lower.
cheesehead is offline   Reply With Quote
Old 2003-03-18, 19:10   #11
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

769210 Posts
Default

Quote:
Originally Posted by garo
Yes a factor may be missed but the chance it not large enough to be worried about. We are talking about say a 3.5% chance instead of a 4.5% chance.
A 4.5% probability of finding a factor is 29% better than a 3.5% probability... :)

Quote:
More memory actually makes P-1 slower as it means P-1 does more work - larger bounds
Here I put all that work into carefully composing my explanation of how more temporaries make P-1 faster ... and meanwhile you're contradicting me! ;)

We're both right.

Garo, you were referring to the algorithm for choosing B1/B2 limits, given an amount of available memory, for the automatic P-1 done ahead of an L-L run. The more the available memory, the higher the B2 selected by the limit-choosing algorithm. The higher the chosen B2 limit, the longer the P-1 stage 2 will take.

I was referring to how the execution time of the P-1 stage 2 would vary according to different amounts of available memory, with unvarying B1/B2 limits. The more the memory (up to the 12-temporaries "desirable" amount), the faster the P-1 stage 2 will run ... except that when it shofts to using Suyama's improvement, it will do more work than when it was not using that enhancement and so the total run time will be longer even though it is more efficiently (faster) calculating because it is storing/loading certain values instead of re-computing them.
cheesehead is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
amount of memory when P-1 factoring wildrabbitt Hardware 3 2015-03-11 16:41
Stage 2 Memory Setting - Again Antonio Software 6 2012-09-04 12:48
Improvement suggestions / Memory amount & Prime95 Brain Software 2 2010-04-12 09:20
Predicting the Amount of CPU Power Needed to LL Test Exponent p jinydu Math 19 2005-02-07 02:52
Choosing amount of memory azhad Software 2 2004-10-16 16:41

All times are UTC. The time now is 19:03.


Wed Oct 27 19:03:20 UTC 2021 up 96 days, 13:32, 0 users, load averages: 2.74, 2.39, 2.01

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