Node:Selftest, Next:, Up:Glucas basics



SourceForgeLogo
 

Glucas builtin selftest.

If the Glucas binary has been compiled without problems or you've downloaded a precompiled binary, it is recommended to run a short builtin selftest. This will show if Glucas runs properly and also displays some basic timings.

There are 31 basic different selftests, every one belonging to a FFT runlength. A selftest is a short run of 100 Lucas-Lehmer iterations. We can select the sample of test to run.

To run a selftest you have to invoke Glucas with the -s option. option is one of the following

n
Here n is a number from 1 to 31. It simply selects which selftest to run.
runlength
runlength selects the FFT runlength test to run directly (expressed in 2^10 = K units). The available values are 128, 144, 160, 192, 224, 256, 288, 320, 384, 448, 512, 576, 640, 768, 896, 1024, 1152, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120, 6144, 7168, 8192.
primenet
primenet will run selftest 6 to 21, i.e, from 256 to 2048 K FFT runlength. This roughly covers the complete range of exponents currently tested by PrimeNet (5M - 35M), including ten million digit prime candidates.
small
small will run selftest 1 to 11, from 128 to 512 K FFT runlength.
big
big will run selftest 11 to 21, i.e, from 512 to 2048 K FFT runlength.
huge
huge will run selftest 21 to 26, i.e, from 2048 to 4096 K FFT runlength.
enormous
enormous will run selftest 26 to 31, i.e, from 4096 to 8192 K FFT runlength. to run this test you will need a system with plenty of memory. Selftest 31 typically uses about 128 M of memory.
all
all will run all 31 selftests. to run this test you will need a system with plenty of memory. Selftest 31 typically uses about 128 M of memory.

As example

./Glucas -s small

will run the selftests from 128 to 512 K FFT runlength.

The amount of memory needed can be big enough to get you into problems. So be careful with the memory requirements. Glucas uses about a byte per bit, ie, to test M(66060289) it will need a minimum of 64M bytes, but if the errors in initial phase are bigger than a threshold the amount of memory can increase up to 80 Mbytes. Please, don't try to run big selftests unless you have enough memory.

For timing purposes it is important to note that Glucas is very sensitive to cache misses. If another memory hungry program is running at the same priority Glucas performance will drop because the available L2 cache memory will be reduced. So, if you want to compare the timings with other programs/platforms, be sure that programs like Mlucas, mprime or MacLucasUNIX are sleeping during the test.

During selftests Glucas will run at normal priority, automatically enabling the no nice flag. So be careful and don't select runs too big. A short result of each selftest will be printed to stdout. In addition more detailed results about errors and timings will be printed to the two files selftest.res and selftest.out. This information can be used to tune the Glucas binary.

Because at run time Glucas makes an initial accuracy adjustment phase, the FFTs actually used can be different than expected. This depends on the roundoff errors obtained in the first iterations. The only important thing here is to pass the test giving the correct 64 bits residue.