Hi,

finally I completed the generalized repunit version of mfaktc.

Changes compared to mfaktc-0.21:

- implemented factoring of generalized repunits

- Removed Barrett and 72 bit kernels

- Removed Wagstaff related stuff

- Added 64 bit kernels

- Compiling with more-classes flag seem to be slightly faster, thus it is switched on

- allowed are all bases >= 2, program might crash if base is larger than roughly 100,000

- implemented special cases for bases 2, 3, 5, 6, 7, 8, 10, 11, 12

- dropped lower limit for exponents from 100,000 to 50,000

The zip file contains the source code and executables for Linux and Windows (both 64 bit).

Check if it runs correctly first

.

Code:

./gr-mfaktc.exe -st

Which takes a few minutes and should give a similar output at the end:

Code:

Selftest statistics
number of tests 31127
successfull tests 31127
kernel | success | fail
-------------------+---------+-------
UNKNOWN kernel | 0 | 0
64bit_mul32 | 4633 | 0
75bit_mul32 | 5712 | 0
95bit_mul32 | 5918 | 0
64bit_mul32_gs | 4190 | 0
75bit_mul32_gs | 5248 | 0
95bit_mul32_gs | 5426 | 0
selftest PASSED!

Running

Code:

./gr-mfaktc.exe -tf 23 3300019 1 60

Example Output:

Code:

got assignment: base=23 exp=3300019 bit_min=1 bit_max=60 (0.05 GHz-days)
Starting trial factoring R[23]3300019 from 2^1 to 2^60 (0.05 GHz-days)
k_min = 0
k_max = 174684070698
Using GPU kernel "64bit_mul32_gs"
Date Time | class Pct | time ETA | GHz-d/day Sieve | Exp Base bit-range
Oct 31 21:57 | 6 0.1% | 0.009 n.a. | 232.71 22837 | 3300019 23 1:60
R[23]3300019 has a factor: 39600229
Oct 31 21:57 | 1347 29.1% | 0.008 n.a. | 261.80 22837 | 3300019 23 1:60
R[23]3300019 has a factor: 1021252834106707
Oct 31 21:57 | 4619 100.0% | 0.011 n.a. | 190.40 22837 | 3300019 23 1:60
found 2 factors for R[23]3300019 from 2^ 1 to 2^60 [mfaktc 0.21 64bit_mul32_gs]
tf(): total time spent: 19.370s

Or running without parameters, then it uses the worktodo.txt file:

Code:

Factor=bla,66362159,64,68
Factor=bla,base=17,1055167,1,64

The bla string is optional. First line defaults to base=10

I attached the compiled versions of gr-mfaktc for Linux and Windows (both 64 bit).

Executables are compiled with

Code:

NVCCFLAGS += --generate-code arch=compute_50,code=sm_50 # CC 5.x GPUs will use this code
NVCCFLAGS += --generate-code arch=compute_60,code=sm_60 # CC 6.0 GPUs will use this code
NVCCFLAGS += --generate-code arch=compute_61,code=sm_61 # CC 6.1 GPUs will use this code
NVCCFLAGS += --generate-code arch=compute_70,code=sm_70 # CC 7.x GPUs will use this code
NVCCFLAGS += --generate-code arch=compute_75,code=sm_75 # CC 7.5 GPUs will use this code

I am using gr-mfaktc to find factors of base 10 repunits as the presieving step for the PRP tests. Recently the search reached the 4000000 digits milestone, but so far no new prime was found (after R270343). Help is always welcome, pm me if you want to join the search.

Let me know if there are any issues. Have fun finding new factors.

Cheers,

Danilo