Here is a listing of the current factoring status of my local machines running the GIMPS client. I have also jotted down a description of how I configured my local machines to access Primenet and how I set up this status page with (relatively) up to date stats.
What are Mersenne primes and why do we search for them?
Prime numbers have long fascinated amateur and professional mathematicians. An integer greater than one is called a prime number if its only divisors are one and itself. The first prime numbers are 2, 3, 5, 7, 11, etc. For example, the number 10 is not prime because it is divisible by 2 and 5. A Mersenne prime is a prime of the form 2P-1, where P itself is a prime number. The first Mersenne primes are 3, 7, 31, 127, etc. There are only 44 known Mersenne primes.
GIMPS, the Great Internet Mersenne Prime Search, was formed in January 1996 to discover new world-record-size Mersenne primes. GIMPS harnesses the power of thousands of small computers like yours to search for these "needles in a haystack".
News from the GIMPS Project!
On September 4, 2006 Dr. Curtis Cooper and Dr. Steven Boone's CMSU team broke their own world record, discovering the 44th known Mersenne prime, 232,582,657-1. The CMSU team is the most prolific contributor to the GIMPS project. The discovery is the largest known prime number. You can read more about the discovery at the GIMPS home page.
My current GIMPS Stats.
Click here for a graph of my relative standing on Primenet over the past 4 years.
My Factoring Status
Client Setup
Windows Client
Download prime95 from the mersenne.org site.
Install taking the defaults.
Enter your account information and other pertinant data when the client is first run.
The client will then start a self-test to verify your computer has no hardware problems.
When the client is finished it will connect to the primenet server and receive an assignment.
I configure the results file to be written every 50000 iterations.
Linux Client
Download mprime from the mersenne.org site.
Unpack into a secure destination directory.
Enter your account information and other pertinant data when the client is first run.
The client will then start a self-test to verify your computer has no hardware problems.
When the client is finished it will connect to the primenet server and receive an assignment.
Add the following line to your /etc/rc.d/rc.local (or equiv.) file. /root/mersenne/mprime -d >> /root/mersenne/mprime.log &
I configure the results file to be written every 50000 iterations.
Status Output
Windows Client
Set up a windows scheduler task to copy the files in the prime95 directory to a place on your web server accessable by your web serving software (I find Samba essential for this).
You will need to set up a static page like this one to contain your GIMPS info. Server side includes must be on. I have written a little perl script that parses the results file and pulls out the latest applicable entry for display purposes.
Here is the applicable snippet for Windows based machines (note you will have to set this up in your own server-side include script):
# Find the last line with a useful datum - everything we need is there
open (SOURCE, "/your-pathname-here/results.txt");
while () {
if (/(Iteration .*)/) { $fline = $1; $testType = "Lucas-Lehmer"; }
if (/(Factoring .*)/) { $fline = $1; $testType = "Trial Factoring"; }
if (/(.*stage 1 is.*)/) { $fline = $1; $testType = "LL Factoring"; $iteration = "Stage 1"; }
if (/(.*stage 2 is.*)/) { $fline = $1; $testType = "LL Factoring"; $iteration = "Stage 2"; }
}
close SOURCE;
($dummy,$dummy,$dummy,$dummy,$dummy,$dummy,$dummy,$dummy, $dummy,$lastUpdate,$dummy,$dummy,$dummy)
= stat( "/your-pathname-here/results.txt");
$lastUpdate = localtime ($lastUpdate);
$machineName = "MachineName CPU-info";
if ( $testType eq "Lucas-Lehmer" )
{
$fline =~ /(\d\d\d\d+)/g;
$iteration = $1;
$fline =~ /(\d\d\d\d+)/g;
$exponent = $1;
$status = sprintf("%d.%02d%%",($iteration*100/$exponent),($iteration*10000/$exponent%100));
}
else
{
if ( $testType eq "LL Factoring" )
{
$fline =~ /(\d\d\d\d+)/g;
$exponent = $1;
}
else
{
$fline =~ /(\d\d\d\d+)/g;
$exponent = $1;
$fline =~ /(\d\^\d\d)/g;
$iteration = $1;
}
$fline =~ /(\d+\.\d+%)/g;
$status = $1;
}
print qq|
$machineName
$testType
$exponent
$iteration
$status
$lastUpdate
|;
Finally, I have a cron job that runs and picks up my status every day just after noon.
# Fetch the user status for the day and store in the mprime dir - runs at 12:13pm every day
# Join the next three lines
13 12 * * * unix-userid wget -t 33 -w 1200 -o /tmp/wget.log
-O "/path-to-your-update-files-directory/`date +\%y\%m\%d`.txt"
http://mersenne.org/cgi-bin/primenet_user.pl?UserID=your-user-id
That is written to a server accessible directory and then included using the following bit of html:
Set up a cron job to copy the files in the mprime directory to a place on your web server accessable by Apache (or IIS so help you).
You will need to set up a static page like this one to contain your GIMPS info. Server side includes must be on. I have written a little perl script that parses the results file and pulls out the latest applicable entry for display purposes.
Here is the applicable snippet for the linux client (note you will have to set this up in your own server-side include script): # Find the last line with a useful datum - everything we need is there
open (SOURCE, "/your-pathname-here/mprime.log");
while () {
if (/(.*Iteration: .*)/) { $fline = $1; $testType = "Lucas-Lehmer"; }
if (/(.*Factoring .*)/) { $fline = $1; $testType = "Trial Factoring"; }
if (/(.*stage 1 is .*)/) { $fline = $1; $testType = "LL Factoring"; $iteration = "Stage 1"; }
if (/(.*stage 2 is .*)/) { $fline = $1; $testType = "LL Factoring"; $iteration = "Stage 2"; }
}
close (SOURCE);
($dummy,$dummy,$dummy,$dummy,$dummy,$dummy,$dummy,$dummy,$dummy,$lastUpdate,$dummy,$dummy,$dummy)
= stat( "/your-pathname-here/mprime.log" );
$lastUpdate = localtime ($lastUpdate);
$machineName = "MachineName CPU-info";
if ( $testType eq "Lucas-Lehmer" )
{
$fline =~ /(\d\d\d\d+)/g;
$iteration = $1;
$fline =~ /(\d\d\d\d+)/g;
$exponent = $1;
}
else
{
if ( $testType eq "LL Factoring" )
{
$fline =~ /(\d\d\d\d+)/g;
$exponent = $1;
}
else
{
$fline =~ /(\d\d\d\d+)/g;
$exponent = $1;
$fline =~ /(\d\^\d\d)/g;
$iteration = $1;
}
}
$fline =~ /(\d+\.\d+%)/;
$status = $1;
print qq|
$machineName
$testType
$exponent
$iteration
$status
$lastUpdate
|;
Finally, I have a cron job that runs and picks up my status every day just after noon (if you're not running Linux you will have to come up with some other way of doing this, I'm sure there are some automated URL grabbing tools out there for Windows).
# Fetch the user status for the day and store in the mprime dir - runs at 12:13pm every day
# Join the next three lines
13 12 * * * unix-userid wget -t 33 -w 1200 -o /tmp/wget.log
-O "/path-to-your-update-files-directory/`date +\%y\%m\%d`.txt"
http://mersenne.org/cgi-bin/primenet_user.pl?UserID=your-user-id
That is written to a server accessible directory and then included using the following bit of html: