Prime95

Prime95 icon in its "on" state

Developer(s)| George Woltman
Initial release| 3 January 1996; 30 years ago (1996-01-03)
Stable release|

30.19 build 20[1] / June 2, 2024; 23 months ago (2024-06-02)

Preview release|

31.04 build 3[2] / January 4, 2026; 4 months ago (2026-01-04)

Written in| ASM, C
Operating system| Microsoft Windows, macOS, Linux, FreeBSD
Type| Mersenne prime finder / system stability tester
License| Freeware[3]

Prime95, also distributed as the command-line utility mprime for FreeBSD, Linux, and MacOS is a freeware application written by George Woltman. It is the official client of the Great Internet Mersenne Prime Search (GIMPS), a volunteer computing project dedicated to searching for Mersenne primes. It is also used in overclocking to test for system stability.[4]

Although most[5] of its source code is available, Prime95 is not free and open-source software because its end-user license agreement[3] states that if the software is used to find a prime qualifying for a bounty offered by the Electronic Frontier Foundation,[6] then that bounty will be claimed and distributed by GIMPS.

## Contents

* 1 Finding Mersenne primes by volunteer computing
* 2 gwnum
* 3 Use for stress testing
* 4 See also
* 5 References
* 6 External links

## Finding Mersenne primes by volunteer computing

Prime95 tests numbers for primality using the Fermat primality test (referred to internally as PRP, or "probable prime"). For much of its history, it used the Lucas–Lehmer primality test, but the availability of Lucas–Lehmer assignments was deprecated in April 2021[7] to increase search throughput. Specifically, to guard against faulty results, every Lucas–Lehmer test had to be performed twice in its entirety, while Fermat tests can be verified in a small fraction of their original run time using a proof generated during the test by Prime95. Current versions of Prime95 remain capable of Lucas–Lehmer testing for the purpose of double-checking existing Lucas–Lehmer results, and for fully verifying "probably prime" Fermat test results (which, unlike "prime" Lucas–Lehmer results, are not conclusive).

To reduce the number of full-length primality tests needed, Prime95 first checks numbers for trivial compositeness by attempting to find a small factor. As of 2024, test candidates are mainly filtered using Pollard's p − 1 algorithm. Trial division is implemented, but Prime95 is rarely used for that work in practice because it can be done much more efficiently using a GPU, due to the type of arithmetic involved. Finally, the elliptic-curve factorization method and Williams's p + 1 algorithm are implemented, but are considered not useful at modern GIMPS testing levels and mostly used in attempts to factor much smaller Mersenne numbers that have already undergone primality testing.

GIMPS has discovered 18 new Mersenne primes since its foundation in 1996, the first 17 of which using Prime95. The 18th and most recent, M136279841, was discovered in October 2024 using an Nvidia GPU, being the first GIMPS discovery to not have used Prime95 and its CPU computation.[8][9][10] 15 of the 17 primes discovered with Prime95 were the largest known prime number at the time of their respective discoveries, the exceptions being M37156667 and M42643801, which were discovered out of order from the larger M43112609.[11]

## gwnum

gwnum is the code for most mathematical operations in Prime95. It is written in hand-tuned assembly code for a number of microarchitectures. For large number modular multiplication it implements the irrational base discrete weighted transform in double precision, exploiting the oversized (compared to integer operations) floating-point capacity of x86 CPUs. It also implements polynomial multiplication for use in P-1 and ECM Stage 2.

gwnum is also used by other distributed computing projects such as PrimeGrid's PRST.

## Use for stress testing

Prime95 28.7 running a stress test on an Intel quad-core Windows 10 system

To maximize search throughput, most of Prime95's math library (gwnum) is written in hand-tuned assembly, which makes its system resource usage much greater than most other computer programs. Additionally, due to the high precision requirements of primality testing, the program is very sensitive to computation errors and proactively reports them. These factors make it a commonly used tool among overclockers to check the stability of a particular configuration.[4]

Prime95 has a built-in "torture test" (formerly "Self-Test") feature for this purpose. In this mode, it checks the results of stress testing against known-good results that comes with the program. As a result, any miscalculation is definitively spotted. The "small" and "medium" FFT modes have a memory access pattern that fits into the CPU's cache, making them ideal for placing maximal stress on the CPU cores. The "large" FFT mode needs to frequently access the RAM. As a result, it produces less stress on the CPU but is able to test the memory controller as well as the memory modules. There is also a "blend" mode that mixes these modes.[12]

## See also

* List of volunteer computing projects
* Stress testing
* Prime number
* PrimeGrid

## References

1. ↑ "GIMPS - Free Prime95 software downloads - PrimeNet". https://www.mersenne.org/download/.
2. ↑ "Gimps/V31/_pre-release/31.04 - download.mersenne.ca". https://download.mersenne.ca/gimps/v31/_pre-release/31.04.
3. ↑ 3.0 3.1 "GIMPS Legalese - PrimeNet". https://mersenne.org/legal.
4. ↑ 4.0 4.1 "How To Run a CPU Stress Test Using Prime95" (in en-US). 2015-12-10. https://appuals.com/how-to-run-a-cpu-stress-test-using-prime95/.
5. ↑ Woltman, George. "The security code or checksum is hard to forge. This is the only source code that is not published.". https://mersenneforum.org/showpost.php?p=47191&postcount=16.
6. ↑ "EFF Cooperative Computing Awards" (in en). 2008-02-29. https://www.eff.org/awards/coop.
7. ↑ Woltman, George (2021-04-08). "First time LL is no more". https://www.mersenneforum.org/showpost.php?p=575514&postcount=1.
8. ↑ "GIMPS History - PrimeNet". https://www.mersenne.org/various/history.php.
9. ↑ "GpuOwl - GitHub". https://github.com/preda/gpuowl.
10. ↑ "GIMPS Discovers Largest Known Prime Number:2136,279,841-1". https://www.mersenne.org/primes/?press=M136279841.
11. ↑ "GIMPS Milestones". https://www.mersenne.org/report_milestones/.
12. ↑ stress.txt, Prime95 documentation, available online at https://www.mersenne.org/download/stress.txt

## External links

* No URL found. Please specify a URL here or add one to Wikidata. with downloads for various architectures
* How to use Prime95 for stress (torture) testing[1]

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Prime95. Read more

|

1. ↑ "Torture test your CPU with Prime95". http://www.playtool.com/pages/prime95/prime95.html.

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Prime95&oldid=4218772"