mersenneforum.org  

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

Closed Thread
 
Thread Tools
Old 2005-03-11, 00:33   #12
lycorn
 
lycorn's Avatar
 
Sep 2002
Oeiras, Portugal

23·181 Posts
Default

You´re right. The LL test shouldn´t use more than 12-14 Mb of memory. If less than the minimum memory is allowed, the program just skips stage 2 and goes straight to the LL test.
lycorn is online now  
Old 2005-03-11, 12:11   #13
Mystwalker
 
Mystwalker's Avatar
 
Jul 2004
Potsdam, Germany

3·277 Posts
Default

Quote:
Originally Posted by Uncwilly
AFAIK those numbers are for Stage2.
That's correct. It was meant as an appendix to my guess in #2, which were for stage2...
Mystwalker is offline  
Old 2005-03-11, 14:31   #14
Primeinator
 
Primeinator's Avatar
 
"Kyle"
Feb 2005
Somewhere near M52..

38C16 Posts
Default

Okay, what are the cons of skipping stage 2 to go directly to the LL test?
Primeinator is offline  
Old 2005-03-11, 16:30   #15
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

32·19·43 Posts
Default

Quote:
Originally Posted by Primeinator
Okay, what are the cons of skipping stage 2 to go directly to the LL test?
Stage 2 might find a factor in half a day saving you a three week LL test.

Of course, the chances are only about 2%, so more likely skipping stage 2 will save you half a day.

In short, don't worry about it.
Prime95 is online now  
Old 2005-03-11, 22:48   #16
Primeinator
 
Primeinator's Avatar
 
"Kyle"
Feb 2005
Somewhere near M52..

22×227 Posts
Default

Ahh, so the LL test is where it usually finds the factors then? I was getting my hopes up .
Primeinator is offline  
Old 2005-03-11, 23:03   #17
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

32·19·43 Posts
Default

Quote:
Originally Posted by Primeinator
Ahh, so the LL test is where it usually finds the factors then? I was getting my hopes up .
Uh no. An LL test will tell you if the number is prime or not, but without finding a factor. Trial factoring and P-1 factoring can find a factor, telling us it is not prime without an expensive LL test.

See http://mersenne.org/math.htm. It might help
Prime95 is online now  
Old 2005-03-11, 23:06   #18
smh
 
smh's Avatar
 
"Sander"
Oct 2002
52.345322,5.52471

29×41 Posts
Default

Quote:
Originally Posted by Primeinator
Ahh, so the LL test is where it usually finds the factors then? I was getting my hopes up .
No, a LL test is only to determine primality. You perform a long test and the only thing it tells you is PRIME or COMPOSITE.

Before performing a LL test, we try to find small factors using two different kind of calculations.

First, trail factoring is performed. The program just tries all possible factors below a certain value (around 2^67 or so). If a factor is found, the number is composite and can be discarded. A factor can be found any time. After a few minutes, a few hours or not at all. If a factor exists, it will always be found.

If trail factoring doesn't succeed, a different method is used. This is called P-1 and is what you were doing. P-1 will find a factor if the factor-1 is 'smooth', that is, it has only small factors.

P-1 consists of 2 stages, and a factor can be found after each stage (not before!). This method doesn't 'try' all possible numbers, but if a factor is found depends on the properties of the factor itself. This method can however find much larger factors.

For more information read the math page on www.mersenne.org

If no factor is found, only then will a LL test be done. This test also needs to be completed fully to determine the result.

Some things might be a bit simplistic, but i hope this makes things a bit more clear to you.
smh is offline  
Old 2005-03-11, 23:55   #19
Primeinator
 
Primeinator's Avatar
 
"Kyle"
Feb 2005
Somewhere near M52..

90810 Posts
Default

Yeah, that helps. Thanks . I'm really crossing my fingers that the exponent is prime...
Primeinator is offline  
Old 2005-05-22, 01:21   #20
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

5×701 Posts
Default 2 processor/dual-core limited memory question

I don't actually have this problem, but I thought I'd bring it up. A possibility that may become a concern in the future.

I read elsewhere on this site that the second part of p-1 testing uses more memory than usual and that got me to thinking. What if, for example, you have a huge farm and limit your RAM based on the usual needs instead of the maximum needs? If you have enough RAM for the second part of P-1 testing and the rest is for the other processor when it isn't doing the second part of p-1 testing on it's own exponent, what happens if the second processor wants to do P-1 testing and detects that it doesn't have enough RAM? Would it abandon that portion, continue on, and potentially waste days worth of time because it wasn't told to wait?

I hope I make sense, if I had a scanner I'd draw a picture to explain.
jasong is offline  
Old 2005-05-22, 05:05   #21
moo
 
moo's Avatar
 
Jul 2004
Nowhere

80910 Posts
Default

If not enough memory is avaible for stage 2 of p1 testing it will skip and go straight to ll testing.
moo is offline  
Old 2005-05-22, 09:10   #22
dsouza123
 
dsouza123's Avatar
 
Sep 2002

2·331 Posts
Default

What moo said is correct.

A slightly different answer is how much memory is needed so P-1 stage 2 factoring will be done and not skipped maybe saving having to do a LL and DC
or more.

From the Prime95.chm file for 24.x
(Index -> Menus -> Choosing CPU -> Setting up Available Memory)
is the following information.

Exponent Minimum Reasonable Desirable
6,000,000 12MB 23MB 33MB
10,000,000 19MB 36MB 53MB
33,000,000 65MB 125MB 185MB

But the default is 8MB so P-1 stage 2 would be skipped
but it prevents the issue of thrashing
(virtual memory being used constantly,
ie the hard drive being used for virtual memory
which is very slow and would severely impact
the reponsiveness of the system and the performance
of other programs).

George also gave a formula for how much memory he allocates
both for day and night given a dual processor and an amount
of RAM.

For a dual processor it must be less than half of total RAM.

(Total RAM - what OS needs) / 2 for night and less for day, about / 4 instead.

If your PC has very little RAM ie less than 96 MB it might be best to use 8MB
and skip P-1 factoring and prevent the thrashing issue.

Remember the only part of Mersenne prime testing that uses the large amounts
of RAM is during P-1 stage 2 factoring, about 12 hours per month.
Trial factoring, P-1 stage 1, LL/DC (Lucas Lehmer/double check LL) all should
work with the default amount 8MB or the minimum from the table 12MB.

With 512 or more, even the desirable becomes possible.
dsouza123 is offline  
Closed Thread

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Coordination thread for redoing P-1 factoring ixfd64 Lone Mersenne Hunters 80 2021-01-19 17:17
NOT the official forum factoring project thread jyb Factoring 2 2013-09-03 16:11
Yet another basic-factoring-questions thread davar55 Factoring 24 2011-01-23 23:57
Perpetual ECM factoring challenge thread... Xyzzy Factoring 65 2005-09-05 08:16
Deutscher Thread (german thread) TauCeti NFSNET Discussion 0 2003-12-11 22:12

All times are UTC. The time now is 21:04.

Tue Mar 2 21:04:08 UTC 2021 up 89 days, 17:15, 0 users, load averages: 1.86, 1.87, 1.87

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.