CUDALucas

From Prime-Wiki
Jump to: navigation, search
CUDALucas
Workload type Lucas-Lehmer test
First release 2009
Latest version 2.06beta
2017-05-05

CUDALucas is a CUDA-based program written by Shoichiro Yamada for testing Mersenne numbers for primality with Lucas-Lehmer test.

CUDALucas is a sophisticated implementation of the IBDWT method for GPU. It has been developed by Yamada as a direct port of the highly optimized sequential MacLucasFFTW, itself a port to FFTW of a program tracing its roots back to original code by Richard Crandall et al.[1]

The program was used to verify primes M48, M49, M50 and M51 at the times of their discovery.

Tuning

To improve performance of CUDALucas, you need to run two benchmarks for your GPU. For example, like this:

CUDALucas -cufftbench 1 22680 5
CUDALucas -threadbench 1 22680 5 10

These commands will generate files DEVICENAME fft.txt and DEVICENAME threads.txt, enabling CUDALucas to select the parameters for an exponent being tested more efficiently.

Integrity checks

To ensure that your program and GPU are working properly, you need to run self tests. For example, like this:

CUDALucas -r 1
CUDALucas -memtest 40 1
CUDALucas 1398269

Option -r 1 will run a thorough (long) self test. Option -memtest 40 1 will run a short version of memory test for 1 GB (a few hours test is advised, however). The command CUDALucas 1398269 will test M35 for primality.

External links