mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   mfaktc: a CUDA program for Mersenne prefactoring (https://www.mersenneforum.org/showthread.php?t=12827)

flashjh 2012-01-16 15:11

[QUOTE=LaurV;286443]smells like no rights to write the worktodo file, is that opened by somebody else? did you change the rights? file attributes? (hidden, system?)
mfaktc needs to access worktodo file to modify the first line, therefore eliminate the work already done. If it can not do that, it will certainly repeat the work.[/QUOTE]

I agree. I've tried all the normal stuff. The wierd part is it consistently repeats each factor one time and then force closes. I'll figure it our eventually.

EDIT: Just figured it out... program is fine. The script I use to open everything was opening the first two instances from the same directory. My fault, though I don't remember editing that file recently.

Thanks for the help

Jerry

MrRepunit 2012-01-18 12:07

Factoring Repunits
 
1 Attachment(s)
Hi Oliver,

I tried to follow the source code of mfaktc and found the important places where to change stuff to let it work with repunits. But as I don't fully understand all the source code I don't know if these places would be enough.
In general:
The factors itself have the form of f=2*k*p+1. What is additional compared to factors of Mersenne numbers is that f%8 can also be 3 and 5 (in addition to 1 and 7). So in mfaktc.c line 213 and 241 this must be changed. Also one has to make sure that <base>-1 is not a factor of f itself if the primality is not checked of these factors.
Then the divisibility checks in tf_*.cu must be done with <base>^p % f. (e.g. tf_71bit.cu line 455-481)

I implemented these changes (for normal base 10 repunits as this is my priority right now) in factor5 so that you can compare, just make a diff between the original and the repunit version.

I hope this helps not to invest too much time in thinking about math and the implementation.

Cheers,
Danilo

MrRepunit 2012-01-19 17:03

1 Attachment(s)
I found out that there are only 16 remainders for mod 120 (not 32 as I assumed first). This made the changes compared to factor5 even more easier. Now it is a factor 2 faster.
In case someone is interested I uploaded the new source file.

ET_ 2012-01-23 14:50

[QUOTE=MrRepunit;286707]I found out that there are only 16 remainders for mod 120 (not 32 as I assumed first). This made the changes compared to factor5 even more easier. Now it is a factor 2 faster.
In case someone is interested I uploaded the new source file.[/QUOTE]

Gee, I KNOW that source code... :smile:

Luigi

MrRepunit 2012-01-23 15:23

[QUOTE=ET_;287035]Gee, I KNOW that source code... :smile:

Luigi[/QUOTE]
I know, I really hope that you don't mind that I messed it up a bit :-).
But it already helped to find a factor of a double repunit (base 10):
657253333333333333267609 divides R(R(19))

ET_ 2012-01-25 12:26

:et_:[QUOTE=MrRepunit;287038]I know, I really hope that you don't mind that I messed it up a bit :-).
But it already helped to find a factor of a double repunit (base 10):
657253333333333333267609 divides R(R(19))[/QUOTE]

:et_:

axn 2012-01-25 12:56

[QUOTE=MrRepunit;286707]I found out that there are only 16 remainders for mod 120 (not 32 as I assumed first). This made the changes compared to factor5 even more easier. Now it is a factor 2 faster.
In case someone is interested I uploaded the new source file.[/QUOTE]

Hmmm... By my calculation, it should be 32 only (4 mod 8, 2 mod 3, 4 mod 5 = 32 mod 120). How did you arrive at the figure 16?

MrRepunit 2012-01-25 14:40

[QUOTE=axn;287193]Hmmm... By my calculation, it should be 32 only (4 mod 8, 2 mod 3, 4 mod 5 = 32 mod 120). How did you arrive at the figure 16?[/QUOTE]
What I did: I checked lots of known factors (see [URL="http://www.repunit.org/"]http://www.repunit.org[/URL]) for their remainder modulo 120, I just found 16. I also rechecked with more factors. These factors were found with a normal sieve, not taking care of the special form of repunit factors.
I am also no expert in number theory, I am just a theoretical physicist, or in other words an experimental mathematician :smile:.

axn 2012-01-25 16:07

[QUOTE=MrRepunit;287199] or in other words an experimental mathematician :smile:.[/QUOTE]

:smile: That's all well and good. And probably you're observing a real phenomenon. But I'd feel much more comfortable if this could be rigorously proven.

Batalov 2012-01-26 22:29

Apparently mod 5 and mod 8 are coupled.
There are 4 possibilities mod 5 and 4 possibilities mod 8, but only 8 possibilities mod 40: +/-1, +/-3, +/-9, +/-13.

I used known factors from [URL="http://homepage2.nifty.com/m_kamada/math/Phin10.txt.bz2"]Phin10.txt[/URL] ... (I am y.a. experimental mathematician.)

firejuggler 2012-01-28 07:58

cuda 4.1 released [URL]http://www.tomshardware.com/news/nvidia-cuda-gpu-developer-llvm,14579.html[/URL]


All times are UTC. The time now is 23:16.

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