Re: Mersenne: Error message from prime95 on an old Win95 box

2002-07-17 Thread Christian Goetz

Try http://www.sysinternals.com/ntw2k/source/regmon.shtml to get the name and 
value of the registry entry. (or maybe anyone knows what's going wrong)

Greetings,

Mohk

Am Mittwoch, 17. Juli 2002 03:34 schrieb A  T Schrum:
 Hi Folks,

 I didn't find a reference to this problem. My old PentiumMMX 200 Mhz box
 running Win95 OSR2 (with tons of patches) now has Prime95 2.26.1 on it
 and it runs reasonably faster (about 20ms faster at 768K FFT size). But
 upon startup, Prime95 reports Can't write registry value and continues
 on. Should I be concerned?

 Thanks,

 -Allan

 _
 Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
 Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers

_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Re: Mersenne: Error message from prime95 on an old Win95 box

2002-07-17 Thread George Woltman


At 09:34 PM 7/16/2002 -0400, A  T Schrum wrote:
I didn't find a reference to this problem. My old PentiumMMX 200 Mhz box 
running Win95 OSR2 (with tons of patches) now has Prime95 2.26.1 on it and 
it runs reasonably faster (about 20ms faster at 768K FFT size). But upon 
startup, Prime95 reports Can't write registry value and continues on. 
Should I be concerned?

I doubt it.  Prime95 should be trying to create a registry entry to run the
program at bootup.  If you uncheck the Options/Start at Bootup menu item
the problem should go away.

I'm curious though.  Do other Win95 users have the same trouble?

_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Re: Mersenne: Re: P-1 limits

2002-07-17 Thread Richard Woods

Recently I've been translating Prime95's P-1 limit-choosing algorithm 
into another language for a P-1 utility of mine.  Let me offer some 
further explanation.  (George, please point out any errors!)

Inputs to the algorithm: exponent of the Mersenne number to be factored, 
how far (as a power of 2) trial factoring of that Mnumber has reached, 
whether the P-1 effort precedes a first-time LL test or a double-check, 
how much memory is to be available during P-1 factoring, plus 
empirically-derived constants and fudge factors in various formulas.

The algorithm is independent of specific systems or CPUs.  That is, it 
does not consider or estimate actual time needed to perform an 
operation, or consider a given CPU's relative performance on integer vs. 
floating-point instructions.  Its basic unit of measure for the cost of 
a procedure is the FFT squaring (= a transform, a convolution, then 
another transform).  For GCDs, which do FFT multiplications that are not 
squarings, the algorithm estimates the number of FFT transforms needed 
by the GCD, then divides by two to get the equivalent number of 
squarings.

If a P-1 factoring run with particular B1 and B2 bounds will require 
175,000 FFT squarings in stage 1, a GCD that will take as much time as 
3,000 FFT squarings, and 122,000 FFT squarings in stage 2, the algorithm 
considers that P-1 run's total cost to be 300,000 -- it is assumed that 
the time required for other parts of the run can be neglected in 
comparison.

(George -- Doesn't a two-stage P-1 require two GCDs, not just one?  And 
it looks like some of the cost comparisons don't include even one GCD 
... was that a deliberate omission, or am I overlooking something?)

Dickman's function (see Knuth Vol. 2, or previous discussion on this 
list) is used to calculate the probability of the P-1 procedure's 
finding a factor.

Perhaps you've wondered what role the how-far-trial-factored input 
plays.  Well, if a Mnumber has been trial-factored to 2^63 (with no 
success, or else we wouldn't be considering P-1 now), then P-1 will not 
find any factors of 63 bits or less.  But if the Mnumber had been 
trial-factored to only 2^57, then there would still be some chance of 
finding a factor between 2^57 and 2^63 during a P-1 run, in addition to 
the chance of finding a factor above 2^63.  The algorithm takes this 
into account.

Continuing the example from above -- If that 300,000-squaring P-1 run 
has a 1.25% probability of finding a factor, then it would balance an 
L-L test costing 300,000/.0125 = 24,000,000.  L-L tests are considered 
to cost 1.015 times their number of FFT squarings, to balance the 
historically observed 1.5% rate of erroneous L-L results, so an L-L test 
on an exponent of, say, 22,000,000 would be considered to cost 
22,000,000 * 1.015 = 22,330,000 squarings.  In this case, the P-1 
limit-choosing algorithm would decide that a P-1 cost of 300,000 with 
probability of 0.0125 would not be worthwhile on an exponent of 
22,000,000, but would be worth a try on an exponent of, say, 25,000,000 
because 300,000/.0125 is less than 25,000,000 * 1.015.

The above example is somewhat backwards, though, because the algorithm 
actually considers only one given exponent's L-L cost versus the costs 
and probabilities for several combinations of B1 and B2 bounds, and 
picks out the best combination of P-1 cost and probability for that 
exponent.

Prime95 considers B1 values starting at 10,000 then going up in 
increments of 5,000.  For each B1, Prime95 considers B2 values starting 
with B2 = B1, then going up in increments of B1*0.25.  So, for B1 = 
10,000, Prime95 calculates costs and probabilities for B2 = 10,000, 
12,500, 15,000, 17,500, and so on.  Then for B1 = 15,000, it considers 
B2 = 15,000, 18,750, 22,500, 26,250, 30,000, and so on.

When does the algorithm stop incrementing B1 and B2 values it examines? 
 Either (1) when the B2 stage would require too much memory (one of the 
algorithm inputs was how much memory is to be available during P-1 
factoring), or (2) when the relative worth of the P-1 run falls below 
90% of the most worthy P-1 bounds combination so far considered.  By 
relative worth and worthy, I mean the amount by which [L-L cost 
multiplied by probability of P-1 success] exceeds [P-1 cost].  The shape 
of Dickman's function guarantees that criterion (2) is eventually 
satisfied at some increment of both B1 and B2.

Where the first-time/double-check matters:  For a double-check, the L-L 
cost is as illustrated in the example above.  For a first-time L-L, the 
L-L cost against which P-1 cost is compared is twice that value -- i.e., 
the algorithm multiplies the exponent by 1.015 * 2 = 2.03 to get the 
number of L-L squarings.  That's because a successful P-1 factoring 
before a first-time test will eliminate the need for both the first-time 
and double-check L-L tests rather than only the double-check L-L test.

Formulas for calculating the numbers of FFT squarings required 

Re: Mersenne: Error message from prime95 on an old Win95 box

2002-07-17 Thread A T Schrum

No go. The box was unchecked. I checked it, restarted Prime95, and the 
error message was not there. So I unchecked it, restarted Prime95, and 
the error message came back.

George Woltman wrote:


 At 09:34 PM 7/16/2002 -0400, A  T Schrum wrote:

 I didn't find a reference to this problem. My old PentiumMMX 200 Mhz 
 box running Win95 OSR2 (with tons of patches) now has Prime95 2.26.1 
 on it and it runs reasonably faster (about 20ms faster at 768K FFT 
 size). But upon startup, Prime95 reports Can't write registry value 
 and continues on. Should I be concerned?


 I doubt it.  Prime95 should be trying to create a registry entry to 
 run the
 program at bootup.  If you uncheck the Options/Start at Bootup menu item
 the problem should go away.

 I'm curious though.  Do other Win95 users have the same trouble?





_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Re: Mersenne: Error message from prime95 on an old Win95 box

2002-07-17 Thread Steve Harris

Sounds like the opposite problem: Prime95 is trying to delete a registry
entry that doesn't exist. I had one do that to me recently. Rather than
uncheck the box, manually edit ( in prime.ini ) the line windows service=1
(or whatever line it has to that effect) to ...=0 and it will no longer
see a need to try to delete the registry entry. And the box will now show as
unchecked.

Hope that helps,
Steve Harris

-Original Message-
From: A  T Schrum [EMAIL PROTECTED]
Date: Wednesday, July 17, 2002 5:26 PM



No go. The box was unchecked. I checked it, restarted Prime95, and the
error message was not there. So I unchecked it, restarted Prime95, and
the error message came back.

George Woltman wrote:


 At 09:34 PM 7/16/2002 -0400, A  T Schrum wrote:

 I didn't find a reference to this problem. My old PentiumMMX 200 Mhz
 box running Win95 OSR2 (with tons of patches) now has Prime95 2.26.1
 on it and it runs reasonably faster (about 20ms faster at 768K FFT
 size). But upon startup, Prime95 reports Can't write registry value
 and continues on. Should I be concerned?


 I doubt it.  Prime95 should be trying to create a registry entry to
 run the
 program at bootup.  If you uncheck the Options/Start at Bootup menu item
 the problem should go away.

 I'm curious though.  Do other Win95 users have the same trouble?





_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers


_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Re: Mersenne: Re: P-1 limits

2002-07-17 Thread Richard Woods

Recently I wrote:
 Well, if a Mnumber has been trial-factored to 2^63 (with no success,
 or else we wouldn't be considering P-1 now), then P-1 will not 
 find any factors of 63 bits or less.

Tom Cage has reminded me that he and others have found factors with
P-1 that are smaller than the posted bit limit in the current
nofactor.cmp at http://www.mersenne.org/gimps.

AFAIK, the number of such findings is too small to make any significant 
difference in the probabilities calculated by the P-1 limit-choosing 
algorithm, but it would be well to remember that it can still happen.

Richard Woods

_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Re: Mersenne: Error message from prime95 on an old Win95 box

2002-07-17 Thread George Woltman


At 06:01 PM 7/17/2002 -0400, A  T Schrum wrote:
No go. The box was unchecked. I checked it, restarted Prime95, and the 
error message was not there. So I unchecked it, restarted Prime95, and the 
error message came back.

I reactivated an old Win98 box for debugging.  You are correct.  The
error message is harmless.  I've got a fix ready for download at
ftp://mersenne.org/p95v227.zip

The only new feature a v22.7 is SSE2 based trial factoring for factors
above 2^64.  It is about 4 times faster than v22.6.  Since most P4 users
are getting assigned prefactored exponents, the speedup is of no value.
However, if you are working on 10 million digit numbers, you may get
assigned a number that needs factoring and the new code will certainly help.


_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Re: Mersenne: Error message from prime95 on an old Win95 box

2002-07-17 Thread A T Schrum

Hi Steve,

My current prime.ini has Windows95Service=0, and the Win95 Service box 
is not checked. However, whenever the program starts, it gives me the 
Can't write registry value error. I looked into the latest source 
(source22.zip) and I see that for Win95 systems, it seems to always try 
to delete the key:

HKEY_LOCAL_MACHINE\ Software\ Microsoft\ CurrentVersion\ RunServices\ 
Prime95

but cannot because it is not there (as you said). This is in the routine 
Service95(). But this is not supposed to be called unless Prime95 is 
setup as a Windows service.

For some reason, on my Win95 box, Service95() is always called. I tried 
deleting the Windows95Service option from prime.ini, then set Prime95 to 
be a service and it properly changed the prime.ini file. I do not use 
the -A option with Prime95, so the prime.ini in the Prime95.exe 
directory is used. But whether the Windows95Service option is deleted or 
just set to zero, I still get the error. The code in Prime95.cpp looks 
fine, but I must be missing something.

But wait, there's more. Just for grins, I tried it on my Win98 SE box 
and it shows the same behavior! If I uncheck the Start at bootup box, 
restart Prime95, I get the exact same error message. So this is not a 
Win95-specific problem. I always had my Win98 box set with Start at 
bootup so I never noticed this before.

And just for more fun, I found another problem with Prime95 in how it 
operates. I have my Prime95 setup with Tray Icon. If I start Prime95, 
double-click on the icon to open Prime95, do a File- Exit real quick, 
the program hangs and stops responding to all mouse clicks. At this 
point, you must kill it. This is reproducible on my Win98 and Win95 box. 
If you wait a few more seconds before doing the File- Exit, then there 
is no problem.

Note to everyone else: None of these problems are critical to the 
operation of Prime95. They amount to minor annoyances, so please don't 
blow this out of proportion. The details I supplied are to help George 
figure this out sometime when he is looking for something to do :-)

Thanks for the air time.

Regards,

-Allan

Steve Harris wrote:

Sounds like the opposite problem: Prime95 is trying to delete a registry
entry that doesn't exist. I had one do that to me recently. Rather than
uncheck the box, manually edit ( in prime.ini ) the line windows service=1
(or whatever line it has to that effect) to ...=0 and it will no longer
see a need to try to delete the registry entry. And the box will now show as
unchecked.

Hope that helps,
Steve Harris


_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers