mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Hardware > GPU Computing

Reply
 
Thread Tools
Old 2012-01-16, 15:11   #1552
flashjh
 
flashjh's Avatar
 
"Jerry"
Nov 2011
Vancouver, WA

1,123 Posts
Default

Quote:
Originally Posted by LaurV View Post
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.
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

Last fiddled with by flashjh on 2012-01-16 at 15:20 Reason: found the problem
flashjh is offline   Reply With Quote
Old 2012-01-18, 12:07   #1553
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

3×31 Posts
Default Factoring Repunits

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
Attached Files
File Type: zip factor5-repunit.zip (11.9 KB, 110 views)
MrRepunit is offline   Reply With Quote
Old 2012-01-19, 17:03   #1554
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

10111012 Posts
Default

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.
Attached Files
File Type: zip factor5-repunit.c.zip (6.0 KB, 120 views)
MrRepunit is offline   Reply With Quote
Old 2012-01-23, 14:50   #1555
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·3·11·73 Posts
Default

Quote:
Originally Posted by MrRepunit View Post
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.
Gee, I KNOW that source code...

Luigi
ET_ is online now   Reply With Quote
Old 2012-01-23, 15:23   #1556
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

3×31 Posts
Default

Quote:
Originally Posted by ET_ View Post
Gee, I KNOW that source code...

Luigi
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))
MrRepunit is offline   Reply With Quote
Old 2012-01-25, 12:26   #1557
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·3·11·73 Posts
Default

Quote:
Originally Posted by MrRepunit View Post
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))

Last fiddled with by ET_ on 2012-01-25 at 12:26
ET_ is online now   Reply With Quote
Old 2012-01-25, 12:56   #1558
axn
 
axn's Avatar
 
Jun 2003

2·3·7·112 Posts
Default

Quote:
Originally Posted by MrRepunit View Post
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.
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?
axn is offline   Reply With Quote
Old 2012-01-25, 14:40   #1559
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

3·31 Posts
Default

Quote:
Originally Posted by axn View Post
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?
What I did: I checked lots of known factors (see http://www.repunit.org) 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 .
MrRepunit is offline   Reply With Quote
Old 2012-01-25, 16:07   #1560
axn
 
axn's Avatar
 
Jun 2003

2·3·7·112 Posts
Default

Quote:
Originally Posted by MrRepunit View Post
or in other words an experimental mathematician .
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.
axn is offline   Reply With Quote
Old 2012-01-26, 22:29   #1561
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

2·47·101 Posts
Default

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 Phin10.txt ... (I am y.a. experimental mathematician.)
Batalov is offline   Reply With Quote
Old 2012-01-28, 07:58   #1562
firejuggler
 
firejuggler's Avatar
 
Apr 2010
Over the rainbow

2×1,303 Posts
Default

cuda 4.1 released http://www.tomshardware.com/news/nvi...lvm,14579.html
firejuggler is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
mfakto: an OpenCL program for Mersenne prefactoring Bdot GPU Computing 1676 2021-06-30 21:23
The P-1 factoring CUDA program firejuggler GPU Computing 753 2020-12-12 18:07
gr-mfaktc: a CUDA program for generalized repunits prefactoring MrRepunit GPU Computing 32 2020-11-11 19:56
mfaktc 0.21 - CUDA runtime wrong keisentraut Software 2 2020-08-18 07:03
World's second-dumbest CUDA program fivemack Programming 112 2015-02-12 22:51

All times are UTC. The time now is 10:28.


Mon Aug 2 10:28:27 UTC 2021 up 10 days, 4:57, 0 users, load averages: 2.02, 1.57, 1.31

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.