PrimeGrid
Please visit donation page to help the project cover running costs for this month

Toggle Menu

Join PrimeGrid

Returning Participants

Community

Leader Boards

Results

Other

drummers-lowrise

Advanced search

Message boards : Number crunching : Primality algorithms

Author Message
Christopher Siegert
Send message
Joined: 5 Jul 09
Posts: 233
ID: 42986
Credit: 121,873,589
RAC: 0
321 LLR Amethyst: Earned 1,000,000 credits (1,041,657)Cullen LLR Amethyst: Earned 1,000,000 credits (1,366,558)PPS LLR Sapphire: Earned 20,000,000 credits (22,481,912)PSP LLR Amethyst: Earned 1,000,000 credits (1,521,444)SoB LLR Amethyst: Earned 1,000,000 credits (1,751,070)SR5 LLR Amethyst: Earned 1,000,000 credits (1,100,031)SGS LLR (suspended) Amethyst: Earned 1,000,000 credits (1,014,953)TRP LLR Ruby: Earned 2,000,000 credits (3,647,371)Woodall LLR Amethyst: Earned 1,000,000 credits (1,479,507)Cullen/Woodall Sieve Bronze: Earned 10,000 credits (41,181)PPS Sieve Emerald: Earned 50,000,000 credits (74,260,244)TRP Sieve (suspended) Silver: Earned 100,000 credits (206,682)GFN Jade: Earned 10,000,000 credits (11,960,980)
Message 80512 - Posted: 24 Oct 2014 | 5:05:38 UTC

Recently, I've begun to understand some basic primality testing algorithms: Pepin's Test and Lucas' Converse of Fermat's Little Theorem.

Obviously, I still have more to learn, but I'm wondering which algorithms PrimeGrid uses to test the variety of numbers we check.

I know GIMPS uses the Lucas-Lehmer test for Mersenne numbers.

I've discovered many large prime numbers, but I've yet to fully understand why they're prime. That is, I don't personally know that they're prime; I just have faith in the word of mathematicians!

Iain Bethune Project donor
Honorary cruncher
Send message
Joined: 28 Jan 09
Posts: 1588
ID: 34775
Credit: 194,056,043
RAC: 0
321 LLR Gold: Earned 500,000 credits (597,175)Cullen LLR Amethyst: Earned 1,000,000 credits (1,355,381)ESP LLR Turquoise: Earned 5,000,000 credits (5,048,594)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,564,412)PPS LLR Amethyst: Earned 1,000,000 credits (1,025,115)PSP LLR Sapphire: Earned 20,000,000 credits (28,367,849)SoB LLR Jade: Earned 10,000,000 credits (16,215,329)SR5 LLR Turquoise: Earned 5,000,000 credits (5,189,992)SGS LLR (suspended) Amethyst: Earned 1,000,000 credits (1,244,067)TRP LLR Turquoise: Earned 5,000,000 credits (5,169,405)Woodall LLR Amethyst: Earned 1,000,000 credits (1,070,956)321 Sieve (suspended) Bronze: Earned 10,000 credits (20,003)Cullen/Woodall Sieve Silver: Earned 100,000 credits (200,371)Generalized Cullen/Woodall Sieve (suspended) Jade: Earned 10,000,000 credits (11,645,025)PPS Sieve Turquoise: Earned 5,000,000 credits (7,536,532)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,017,144)TRP Sieve (suspended) Gold: Earned 500,000 credits (554,946)AP 26/27 Ruby: Earned 2,000,000 credits (3,577,848)GFN Emerald: Earned 50,000,000 credits (97,047,976)PSA Ruby: Earned 2,000,000 credits (4,606,694)
Message 80522 - Posted: 24 Oct 2014 | 20:47:44 UTC - in response to Message 80512.

Hi Chris,

The principle tests that are used at Primegrid are (along with some references you might find useful for further reading):



There are also some good sieving algorithms which are used to remove the vast number of candidates before we even start running primality tests on them, but I'm not very well versed in that area, others might be able to give more details…

Cheers

- Iain
____________
Twitter: IainBethune
Proud member of team "Aggie The Pew". Go Aggie!
3073428256125*2^1290000-1 is Prime!

Christopher Siegert
Send message
Joined: 5 Jul 09
Posts: 233
ID: 42986
Credit: 121,873,589
RAC: 0
321 LLR Amethyst: Earned 1,000,000 credits (1,041,657)Cullen LLR Amethyst: Earned 1,000,000 credits (1,366,558)PPS LLR Sapphire: Earned 20,000,000 credits (22,481,912)PSP LLR Amethyst: Earned 1,000,000 credits (1,521,444)SoB LLR Amethyst: Earned 1,000,000 credits (1,751,070)SR5 LLR Amethyst: Earned 1,000,000 credits (1,100,031)SGS LLR (suspended) Amethyst: Earned 1,000,000 credits (1,014,953)TRP LLR Ruby: Earned 2,000,000 credits (3,647,371)Woodall LLR Amethyst: Earned 1,000,000 credits (1,479,507)Cullen/Woodall Sieve Bronze: Earned 10,000 credits (41,181)PPS Sieve Emerald: Earned 50,000,000 credits (74,260,244)TRP Sieve (suspended) Silver: Earned 100,000 credits (206,682)GFN Jade: Earned 10,000,000 credits (11,960,980)
Message 80523 - Posted: 24 Oct 2014 | 21:45:33 UTC

Thank you.

So are the GFNs tested with a simple Fermat test?

Just: a^(GFN-1) = 1 (mod GFN) ?

Or is a more sophisticated probable prime test used?

Why are GFNs (in particular) capable of being tested using GPU parallelization? Can't any number be tested in this way?

Iain Bethune Project donor
Honorary cruncher
Send message
Joined: 28 Jan 09
Posts: 1588
ID: 34775
Credit: 194,056,043
RAC: 0
321 LLR Gold: Earned 500,000 credits (597,175)Cullen LLR Amethyst: Earned 1,000,000 credits (1,355,381)ESP LLR Turquoise: Earned 5,000,000 credits (5,048,594)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,564,412)PPS LLR Amethyst: Earned 1,000,000 credits (1,025,115)PSP LLR Sapphire: Earned 20,000,000 credits (28,367,849)SoB LLR Jade: Earned 10,000,000 credits (16,215,329)SR5 LLR Turquoise: Earned 5,000,000 credits (5,189,992)SGS LLR (suspended) Amethyst: Earned 1,000,000 credits (1,244,067)TRP LLR Turquoise: Earned 5,000,000 credits (5,169,405)Woodall LLR Amethyst: Earned 1,000,000 credits (1,070,956)321 Sieve (suspended) Bronze: Earned 10,000 credits (20,003)Cullen/Woodall Sieve Silver: Earned 100,000 credits (200,371)Generalized Cullen/Woodall Sieve (suspended) Jade: Earned 10,000,000 credits (11,645,025)PPS Sieve Turquoise: Earned 5,000,000 credits (7,536,532)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,017,144)TRP Sieve (suspended) Gold: Earned 500,000 credits (554,946)AP 26/27 Ruby: Earned 2,000,000 credits (3,577,848)GFN Emerald: Earned 50,000,000 credits (97,047,976)PSA Ruby: Earned 2,000,000 credits (4,606,694)
Message 80527 - Posted: 25 Oct 2014 | 6:04:07 UTC - in response to Message 80523.

That's correct.

Genefer (which does the Fermat test), has both CUDA and OpenCL versions written, which are quite efficient. All the other tests are done by LLR, which makes use of the gwnum library for the expensive numerical parts (squaring, modular reduction …). There was a CUDA port of LLR floating around a few years ago where the gwnum parts were replaced by CUDA but it was not particularly efficient (only a little faster than CPUs, and used quite a lot of CPU to keep the GPU busy), and it had some bugs too.

There is no reason in principle why LLR can't be implemented on GPUs but no-one (including myself) has had the time to do it :(
____________
Twitter: IainBethune
Proud member of team "Aggie The Pew". Go Aggie!
3073428256125*2^1290000-1 is Prime!

Message boards : Number crunching : Primality algorithms

[Return to PrimeGrid main page]
DNS Powered by DNSEXIT.COM
Copyright © 2005 - 2025 Rytis Slatkevičius (contact) and PrimeGrid community. Server load 5.65, 4.62, 3.90
Generated 3 Oct 2025 | 20:12:05 UTC