![]() |
Oliver,
It was a while ago but I seem to remember it was an error at the link stage - something like the backend and frontend not matching. However, I was trying to compile it on a 64-bit OS so decided to have another go on a 32-bit OS. This time I got it to compile OK. However, I got 4 failures when running the full self-test. I have attached the log below - it actually looks like 2 failures. Any ideas? All 4910 other tests passed. [CODE] tf(53091919, 90, 91, ...); k_min = 9223372036854775800 k_max = 9223372036854775808 Using GPU kernel "95bit_mul32" class 4464: 0.00M candidates in 1ms (0.00M/sec) no factor for M53091919 from 2^90 to 2^91 [mfaktc 0.13-Win 95bit_mul32] ERROR: selftest failed for M53091919 no factor found tf(): total time spent: 0.002s tf(53091919, 90, 91, ...); k_min = 9223372036854775800 k_max = 9223372036854775808 Using GPU kernel "barrett92_mul32" class 4464: 0.00M candidates in 1ms (0.00M/sec) no factor for M53091919 from 2^90 to 2^91 [mfaktc 0.13-Win barrett92_mul32] ERROR: selftest failed for M53091919 no factor found tf(): total time spent: 0.002s tf(51612269, 90, 91, ...); k_min = 9223372036854775800 k_max = 9223372036854775808 Using GPU kernel "95bit_mul32" class 3039: 0.00M candidates in 1ms (0.00M/sec) no factor for M51612269 from 2^90 to 2^91 [mfaktc 0.13-Win 95bit_mul32] ERROR: selftest failed for M51612269 no factor found tf(): total time spent: 0.002s tf(51612269, 90, 91, ...); k_min = 9223372036854775800 k_max = 9223372036854775808 Using GPU kernel "barrett92_mul32" class 3039: 0.00M candidates in 1ms (0.00M/sec) no factor for M51612269 from 2^90 to 2^91 [mfaktc 0.13-Win barrett92_mul32] ERROR: selftest failed for M51612269 no factor found tf(): total time spent: 0.002s [/CODE] Dave |
Hi Dave!
[QUOTE=amphoria;239220]It was a while ago but I seem to remember it was an error at the link stage - something like the backend and frontend not matching. However, I was trying to compile it on a 64-bit OS so decided to have another go on a 32-bit OS. This time I got it to compile OK. However, I got 4 failures when running the full self-test. I have attached the log below - it actually looks like 2 failures. Any ideas? All 4910 other tests passed. [CODE] tf(53091919, 90, 91, ...); k_min = 9223372036854775800 k_max = 9223372036854775808 class 4464: 0.00M candidates in 1ms (0.00M/sec) tf(53091919, 90, 91, ...); k_min = 9223372036854775800 k_max = 9223372036854775808 class 4464: 0.00M candidates in 1ms (0.00M/sec) tf(51612269, 90, 91, ...); k_min = 9223372036854775800 k_max = 9223372036854775808 class 3039: 0.00M candidates in 1ms (0.00M/sec) tf(51612269, 90, 91, ...); k_min = 9223372036854775800 k_max = 9223372036854775808 Using GPU kernel "barrett92_mul32" class 3039: 0.00M candidates in 1ms (0.00M/sec) [/CODE] Dave[/QUOTE] The good news is that it is not related GPU part. :smile: It seems that the calculation of k_min and k_max fails. It is the same for both exponents and the difference between k_min and k_max is way to small. There are 0 candidates tested (no GPU kernel launched at all). I have to look at the code and may need your help on testing (still no Windows environment setup here...) Perhaps it is related to floorl() in calculate_k() in src/mfaktc.c... 2^63 = 9223372036854775808 Oliver |
Oliver,
I have confirmed after a few false starts that the problem is not with floorl(), but with the cast from long double to unsigned long long int. I modified the code to break this into two steps as follows: [CODE]unsigned long long int calculate_k(unsigned int exp, int bits) /* returns floor ((2^bits) / (2* exp)) */ /* FIXME, this is not 100% accurate... */ { long double d,e; unsigned long long int res; long double res1; e=(long double)exp*2.0F; d=1.0F; while(bits) { d=d*2.0F; bits--; } d/=e; res1=floorl(d); res = (unsigned long long int)res1; if(res==0)res=1; return res; } [/CODE] For the failed tests res = (unsigned long long int)res1 returns 2^63 rather than the correct value which is larger than 2^63. According to the Microsoft documentation an unsigned long long should be able to hold up to 18,446,744,073,709,551,615 independent of whether you use 32-bit or 64-bit code, so this looks like a bug with the 32-bit compiler. Dave |
Any chance you could allow factoring of Mersenne numbers with composite exponents? I'm interested in factoring M(p[sup]2[/sup]) and M(2*p) where p is prime. Factors are of the form 2*k*p+1. In general M(a*b) has factors with either 2*k*a+1 or 2*k*b+1.
If mfaktc got a composite exponent as input it could prompt the user for which type of factors to search for: 2ka+1 or 2kb+1 ? Otherwise the sieving should remain the same. |
Nvidia PCI Video Card Question for Oliver
Oliver,
I have a donated (e.g. free to me) Windows XP, PIII 933MHz, 512MB PC with an Intel MB video chip that trial factors and trial factors to low limits. It has an open PCI slot (not PCI-E) where I could add an Nvidia PCI video card and run mfaktc, if it makes sense to do so. What do you think? Are any of the Nvidia PCI video cards "strong" enough for this to make sense? Thanks in advance. RMAC9.5 |
[QUOTE=RMAC9.5;239827]Are any of the Nvidia PCI video cards "strong" enough for this to make sense?[/QUOTE]No, but a couple of AGP cards might be able to. You probably do have an AGP slot on the motherboard, if I had to guess I'd say it's a 4x slot. Not that it would be worth buying a card to use it.
At best you could get a low end card from a few generations ago, the throughput would be minimal and it'd still cost you decent sum of money purely because such cards are rare now. |
Hi Dave,
if you want to: - change version string in params.h to e.g. "mfaktc-0.13p1" - make the changes in calculate_k() - built a Win32 binary - run long selftest - if it passes the selftest: upload the binary somewhere Thank you! Oliver [QUOTE=amphoria;239527]Oliver, I have confirmed after a few false starts that the problem is not with floorl(), but with the cast from long double to unsigned long long int. I modified the code to break this into two steps as follows: [CODE]unsigned long long int calculate_k(unsigned int exp, int bits) /* returns floor ((2^bits) / (2* exp)) */ /* FIXME, this is not 100% accurate... */ { long double d,e; unsigned long long int res; long double res1; e=(long double)exp*2.0F; d=1.0F; while(bits) { d=d*2.0F; bits--; } d/=e; res1=floorl(d); res = (unsigned long long int)res1; if(res==0)res=1; return res; } [/CODE] For the failed tests res = (unsigned long long int)res1 returns 2^63 rather than the correct value which is larger than 2^63. According to the Microsoft documentation an unsigned long long should be able to hold up to 18,446,744,073,709,551,615 independent of whether you use 32-bit or 64-bit code, so this looks like a bug with the 32-bit compiler. Dave[/QUOTE] |
Hi,
[QUOTE=ATH;239823]Any chance you could allow factoring of Mersenne numbers with composite exponents? I'm interested in factoring M(p[sup]2[/sup]) and M(2*p) where p is prime. Factors are of the form 2*k*p+1. In general M(a*b) has factors with either 2*k*a+1 or 2*k*b+1. If mfaktc got a composite exponent as input it could prompt the user for which type of factors to search for: 2ka+1 or 2kb+1 ? Otherwise the sieving should remain the same.[/QUOTE] allowing composite exponents is not a big deal, just remove this line in src/mfaktc.c: [CODE]else if(!isprime(exp)) printf("WARNING: exponent is not prime! Ignoring this assignment!\n");[/CODE] But this will only check for factors of the form 2kab+1. :sad: For a more serios attempt you'll need to do the following things - sieve must be changed - you'll need to pass a (or b) to the innermost kernel - modify the factor calculation in each kernel - modify the selftest - whatever I've forgotten... Oliver |
Hi,
[QUOTE=RMAC9.5;239827]Oliver, I have a donated (e.g. free to me) Windows XP, PIII 933MHz, 512MB PC with an Intel MB video chip that trial factors and trial factors to low limits. It has an open PCI slot (not PCI-E) where I could add an Nvidia PCI video card and run mfaktc, if it makes sense to do so. What do you think? Are any of the Nvidia PCI video cards "strong" enough for this to make sense? Thanks in advance. RMAC9.5[/QUOTE] [QUOTE=lavalamp;239877]No, but a couple of AGP cards might be able to. You probably do have an AGP slot on the motherboard, if I had to guess I'd say it's a 4x slot. Not that it would be worth buying a card to use it. At best you could get a low end card from a few generations ago, the throughput would be minimal and it'd still cost you decent sum of money purely because such cards are rare now.[/QUOTE] - [B]I'm not sure if CUDA works on Pentium 3 and/or with PCI GPUs[/B] - for mfaktc you'll need a Geforce 8xxx or newer with the exception that the G80 based cards (8800 GTS 320 / GTS 640 / GTX / Ultra) don't work for mfaktc - PCI bandwidth (optimistic 100MB/sec) would be enough for 25M candidates/s (so 100MB/sec might be enough for a 9600GT or similar) - if you have (or can get for free) are CUDA-capable PCI GPU you could try, otherwise I won't recommend to try. I know that there are some PCI 8400GS and perhaps even 8600(GS). If it works it should give a boost compared to CPU-only computation but it isn't worth money/energy usually. Oliver |
Also note that the CUDA libraries require a certain version or better of Nvidia's driver, and Nvidia's driver 'forgets' about older cards on a fixed schedule.
|
[QUOTE=ATH;239823]Any chance you could allow factoring of Mersenne numbers with composite exponents? I'm interested in factoring M(p[sup]2[/sup]) and M(2*p) where p is prime. Factors are of the form 2*k*p+1. In general M(a*b) has factors with either 2*k*a+1 or 2*k*b+1.
If mfaktc got a composite exponent as input it could prompt the user for which type of factors to search for: 2ka+1 or 2kb+1 ? Otherwise the sieving should remain the same.[/QUOTE] I haven't looked closely, but I thought factors of form only 2ka+1 were always factors of the algebraic factor M(a) and likewise for b. I thought the primitive factors were always of the form 2kab+1. If that is correct, then I think it would more efficient to do the factoring in 3 stages: M(a) at step a, M(b) at step b and M(ab) at step ab. |
| All times are UTC. The time now is 22:59. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.