• Home
  • Readings
  • Github
  • MIES
  • TmVal
  • About
Gene Dan's Blog

Tag Archives: Great Internet Mersenne Prime Search

No. 42: The Great Internet Mersenne Prime Search – How to Install and Start GIMPS on Ubuntu 11.10

3 January, 2012 6:28 AM / 2 Comments / Gene Dan

Hey everyone,

When I said that I’d update this blog once a week, I didn’t realize that I’d have to post five times as many updates as I did last year. Fortunately, I don’t see this as something I can’t do so I decided to make it my new year’s resolution. Today I’ve decided to write about the Great Internet Mersenne Prime Search (GIMPS)- an online distributed computing project that aims to find Mersenne Primes.  Distributed computing means that several computers on a network work together on a certain task. In the case of the Great Mersenne Prime Search, these computers come from university computer labs, homes, and even video game consoles all across the world. Other distributed computing projects involve protein folding (perhaps the most famous), finding extraterrestrial life, searching for gravitational waves, and so on and so forth. These projects work by utilizing spare processing power from participating computers. All this processing power put together makes for a very powerful network, and these projects have already made important discoveries, such as a protein structure related to HIV. Anyway, after I set up my Linux server, which runs throughout the day, I decided that letting it run idly would waste a lot of processing power, so I decided to install a program from a distributed computing project. I chose GIMPS because I spent some time studying the Mersenne primes in school, so as a math major this project would come naturally to me. I couldn’t find a suitable setup guide for Ubuntu 11.10, however, so I decided to write one here.

About Mersenne Primes

We call numbers of the form $latex M_p = 2^p-1$ Mersenne Numbers. However, only a few of these Mersenne Numbers belong to the set of prime numbers, and as of 2009 we know of only 47 Mersenne Primes. The nature of Mersenne Primes makes them some of the largest known prime numbers out there, and indeed, the largest known prime, $latex 2^{43112609}-1$, is a Mersenne Prime. The Great Internet Mersenne Prime Search aims to find additional Mersenne Primes through distributed computing using the Lucas-Lehmer test for Mersenne Primes.

Downloading GIMPS

Go to the GIMPS homepage, and click on the link “Getting Started.” Go to the link called “Register a new user account login” and create your user account. After you create your account, go to the Download Software page and select the package appropriate for your operating system. Since I use 64-bit Ubuntu, I downloaded the 64-bit Linux package. Place the package into the desired directory. For my computer, I created a folder called “GIMPS” in my home folder, and put the package there.

Placing the package into the GIMPS folder and opening it with Archive Manager

Next, click open the package with Archive Manager and then extract the files. Archive Manager will extract the files into the GIMPS folder.

GIMPS folder after extraction

Next, open up the terminal (CTRL+ALT+T) and change the directory to the GIMPS folder (do this simply by typing “cd GIMPS”). Now, open the mprime folder by typing in the command “./mprime -m”. Remember the space! The program “mprime” is the main program that will do the primality testing.

Use these commands to start mprime

mprime will now ask you if you want to join GIMPS. Select yes. Then, mprime will ask you to create an optional user ID and computer name. Fill these out – for example I entered my name as “gene” and my computer name as “Archimedes.” You can leave the proxy host name blank, just press enter. Then, type “Y” when mprime asks you to accept the above answers.

Initial running of mprime

mprime will then ask you the number of hours per day the program will run, how much memory to let it use, and the number of workers (number of CPUs) that will run. The default answers to these questions are in parentheses (). I selected the defaults for all of them. You do have the option to use more memory to speed up the program, however. mprime will then ask you to set the work priorities for your computer. Go ahead and select all the defaults, this will allow mprime to automatically allocate work to your processors. After accepting the answers, you will see your terminal window fill up with a bunch of text. This text describes which Mersenne Numbers your CPUs are testing, how much progress they’ve made, and the estimated completion dates. Depending on how you set it up, you may have missed the main menu. On my first install I saw the menu right away, but on the second install the program seemed to have skipped over the menu.

Here is a screenshot of the menu:

mprime options menu

Go ahead and select option 3. This will give you a summary of the progress.

mprime at work, showing progress

You can see here that my version of mprime is currently testing Mersenne numbers M55085531, M55091137, M55093139, and M55093327 using the Lucas-Lehmer test. The number after the M is the p in $latex M_p = 2^p-1$. So as you can see, these are very large numbers. The odds of me finding a Mersenne prime are 1 in 113533 for this current batch of tests!

And that’s it! Press any key to continue, and select option 5 to exit.

Things to do

You can see from the last picture that mprime will cause your computer to constantly use 100% of its processing power, 24 hours a day. This somewhat concerns me when it comes to temperatures, as I don’t want things to overheat while I’m away from the computer or at work. So, I plan on writing a script to have the server save the temperature readings into a text file so I can check on it periodically from a phone or another computer, and in the case of an emergency I can shut it down remotely.

If you think there’s anything missing in this guide, or if you think you have anything useful to add, or if you find any errors, let me know! I’m always open to input from others.

Posted in: Logs, Mathematics / Tagged: Distributed Computing, GIMPS, Great Internet Mersenne Prime Search, Installing GIMPS, Mersenne Primes

Archives

  • September 2023
  • February 2023
  • January 2023
  • October 2022
  • March 2022
  • February 2022
  • December 2021
  • July 2020
  • June 2020
  • May 2020
  • May 2019
  • April 2019
  • November 2018
  • September 2018
  • August 2018
  • December 2017
  • July 2017
  • March 2017
  • November 2016
  • December 2014
  • November 2014
  • October 2014
  • August 2014
  • July 2014
  • June 2014
  • February 2014
  • December 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • March 2013
  • January 2013
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • January 2011
  • December 2010
  • October 2010
  • September 2010
  • August 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • September 2009
  • August 2009
  • May 2009
  • December 2008

Categories

  • Actuarial
  • Cycling
  • Logs
  • Mathematics
  • MIES
  • Music
  • Uncategorized

Links

Cyclingnews
Jason Lee
Knitted Together
Megan Turley
Shama Cycles
Shama Cycles Blog
South Central Collegiate Cycling Conference
Texas Bicycle Racing Association
Texbiker.net
Tiffany Chan
USA Cycling
VeloNews

Texas Cycling

Cameron Lindsay
Jacob Dodson
Ken Day
Texas Cycling
Texas Cycling Blog
Whitney Schultz
© Copyright 2025 - Gene Dan's Blog
Infinity Theme by DesignCoral / WordPress