mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   genefer/CUDA (https://www.mersenneforum.org/showthread.php?t=14297)

prime7989 2012-10-12 02:20

Is genefercuda correct
 
I tried genefercuda for a gtx680 nvidia GPU on a AMD FX8120 cpu and 32 gb ram for
Fermat number F19 which is known composite with b=2 and N=524288=2^19
and the program prints out that it is probably prime.
Can any one else try this out?
A...

Batalov 2012-10-12 02:47

[QUOTE=prime7989;314331]I tried genefercuda for a gtx680 nvidia GPU on a AMD FX8120 cpu and 32 gb ram for
Fermat number F19 which is known composite with b=2 and N=524288=2^19
and the program prints out that it is probably prime.
Can any one else try this out?
A...[/QUOTE]
genefercuda is running a PRP test in base 2 (just checked the source), which is fine for checking any GF(b), b>2 (and not a power of 2, which would be pointless).
Of course, all Fermat numbers are 2-PRPs.

axn 2012-10-12 03:35

[QUOTE=Batalov;314332]genefercuda is running a PRP test in base 2 (just checked the source), which is fine for checking any GF(b), b>2 (and not a power of 2, which would be pointless).
Of course, all Fermat numbers are 2-PRPs.[/QUOTE]

It should be relatively trivial to change the PRP-base (to say, 3). I will try it out later.

Also, 2^524288 = 65536^32768. So a much smaller FFT may be used.

axn 2012-10-12 13:52

[QUOTE=axn;314339]It should be relatively trivial to change the PRP-base (to say, 3). I will try it out later.

Also, 2^524288 = 65536^32768. So a much smaller FFT may be used.[/QUOTE]

So, I tried this out... and you wouldn't believe what I found out:
[CODE]65536^32768+1 is composite. (RES=0df151a4161b6c99) (157827 digits) (err = 0.0005) (time = 0:07:24)[/CODE]

:shock:

LaurV 2012-10-13 12:19

That's creepy! Don't say all the tests need to be redone? :ouch:

msft 2012-10-15 01:26

[QUOTE=LaurV;314489]That's creepy! Don't say all the tests need to be redone? :ouch:[/QUOTE]
I Bet your side.:smile:

LaurV 2012-10-15 09:12

Oh, I forgot about this, my post was kinda joke, based on the fact that the incriminated number is F19, which is known as composite. If axn did a 3-PRP test it was normal to be composite (it is like a Pepin Test.... squared, I might be wrong here but this will never return a false result, i.e. Fx is 3-prp if and only if it is prime).

msft 2012-10-16 06:35

base=3
[code]
$ diff genefer.c genefer.c.ORG
1757c1757
< CONST double t1 = 2.0 / m, t2 = 3 * t1;
---
> CONST double t1 = 2.0 / m, t2 = 2 * t1;
1781c1781
< z = FFTinitGFN(m, 3.0, &n1, &n2);
---
> z = FFTinitGFN(m, 2.0, &n1, &n2);
$ cc genefer.c -lm
$ ./a.out -t
GeneFer 1.3 (standard) Copyright (C) 2001-2002, Yves GALLOT
A program for finding large probable generalized Fermat primes.

Usage: GeneFer -b run bench
GeneFer -t run test
GeneFer <filename> test <filename>
GeneFer use interactive mode

100050^16+1 is a probable prime. (err = 1.53e-05)
100014^32+1 is a probable prime. (err = 3.05e-05)
100234^64+1 is a probable prime. (err = 4.58e-05)
100032^128+1 is a probable prime. (err = 9.16e-05)
5684328^256+1 is a probable composite (err = 5.00e-01).
4619000^512+1 is a probable composite (err = 5.00e-01).
3752220^1024+1 is a probable composite (err = 5.00e-01).
[/code]

Batalov 2012-10-16 06:45

Aaah! msft is [URL="http://ru.wikipedia.org/wiki/%D0%9C%D0%BE%D1%80%D1%80%D0%B0"]Morra[/URL]!
(...I suddenly expect Morra defence in the Vote chess thread. No. I did expect it before. That's when I looked up Morra.
Too late. ;-) )

"The Groke" on the other hand reminds me of Piet Hein's Grooks.
[QUOTE]
THE ROAD TO WISDOM?

Well, it's plain
and simple to express.
Err and err and err again,
but less and less and less.[/QUOTE]

prime7989 2013-03-17 04:54

[QUOTE=axn;314396]So, I tried this out... and you wouldn't believe what I found out:
[CODE]65536^32768+1 is composite. (RES=0df151a4161b6c99) (157827 digits) (err = 0.0005) (time = 0:07:24)[/CODE]:shock:[/QUOTE]
Dear axn,
I dislike reading code. So please which variable did you change to make it 3-PRP
in GeneferCUDA.cu, please? If you could give me the line number of the code of function and var, I would be very greatful!
Thank you,
prime7989

axn 2013-03-17 08:23

[QUOTE=prime7989;333674]Dear axn,
I dislike reading code. So please which variable did you change to make it 3-PRP
in GeneferCUDA.cu, please? If you could give me the line number of the code of function and var, I would be very greatful!
Thank you,
prime7989[/QUOTE]

There are many versions of G/CUDA out there. If you can post the one you want to look at (as a forum attachment), I can tell you. FWIW, the change is easy and localised to "check" function.


All times are UTC. The time now is 05:55.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.