mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Twin Prime Search

Reply
 
Thread Tools
Old 2010-08-15, 20:59   #1
The Carnivore
 
The Carnivore's Avatar
 
Jun 2010

17810 Posts
Default Two sieving questions

1.) What's the optimal sieve depth, and how is it calculated? I'm assuming the LLR part of the project goes like this:

A.) Test k<100K for n=480K-495K. If a twin is found, work on "Operation Megabit Twin". If not, go to step B.
B.) Test 100K<k<1M for n=480-495K. If a twin is found, work on "Operation Megabit Twin". If not, go to step C.
C.) Test 1M<k<10M. If a twin is found, work on "Operation Megabit Twin". If not, repeat the same process for n=495K-500K.

Would it be a good idea to stop sieving now until the project is done with k<1M? At p=550T, it takes 5-6 minutes to find a k<1M factor on one core, but only four and a half minutes to finish an LLR test.

2.) How much efficiency is lost by breaking up the 480K-495K range into three separate ranges? Shouldn't they be merged into one 480K-495K file?
The Carnivore is offline   Reply With Quote
Old 2010-08-15, 23:27   #2
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3·2,083 Posts
Default

Quote:
Originally Posted by The Carnivore View Post
1.) What's the optimal sieve depth, and how is it calculated? I'm assuming the LLR part of the project goes like this:

A.) Test k<100K for n=480K-495K. If a twin is found, work on "Operation Megabit Twin". If not, go to step B.
B.) Test 100K<k<1M for n=480-495K. If a twin is found, work on "Operation Megabit Twin". If not, go to step C.
C.) Test 1M<k<10M. If a twin is found, work on "Operation Megabit Twin". If not, repeat the same process for n=495K-500K.
I've heard that the optimal depth is estimated to be around p=3P for the entire range. I don't believe any hard calculations have been done to that effect, though.

Quote:
Would it be a good idea to stop sieving now until the project is done with k<1M? At p=550T, it takes 5-6 minutes to find a k<1M factor on one core, but only four and a half minutes to finish an LLR test.
For a range with small variability of k and large variability of n (a la NPLB or RPS--usually sieved with one of the srsieve programs), that is how you'd calculate optimal depth, since a smaller n-range sieves faster. But for something with small variability of n and large variability of k (usually sieved with tpsive, as we're doing here), it actually doesn't make any sizeable difference in sieving speed when you extend the k-range. So the sieve would proceed just as fast if we were only working on k<1M. Unless I'm overlooking something here, that means that we should be sieving to the same depth for k<1M as we would for k<10M; otherwise, we're effectively throwing out our advantage that we gained by sieving that entire range together.

Note that this assumes that the entire file (k<10M) will eventually be used. I'm not sure how we're going to do that, whether we'll test the whole range or stop after the first twin. It really is most efficient to go and test the whole file (as otherwise we'd be potentially wasting quite a bit of sieve work), but usually the popular opinion is for the next twin to be significantly bigger than the last (not just marginally so as it would be from later in the same range).
Quote:
2.) How much efficiency is lost by breaking up the 480K-495K range into three separate ranges? Shouldn't they be merged into one 480K-495K file?
I'm not sure how much efficiency is lost, but I do know that combining them is more efficient. That's what gribozavr's doing for n=485K-495K. However, memory usage increases rather quickly as you do a bigger n-range, which is why the 480K-500K range was split into 4 pieces to begin with. If you have sufficient memory, though (as gribozavr does) then combining two or three of the subranges may be worth it.

Last fiddled with by mdettweiler on 2010-08-15 at 23:29
mdettweiler is offline   Reply With Quote
Old 2010-08-16, 06:28   #3
Oddball
 
Oddball's Avatar
 
May 2010

499 Posts
Default

Quote:
Originally Posted by mdettweiler View Post
I've heard that the optimal depth is estimated to be around p=3P for the entire range. I don't believe any hard calculations have been done to that effect, though.
I've just run a quick benchmark: sieving 5999T-6000T yields 171 factors. It took me just over two hours (7401 seconds, to be precise) to finish that 1T range, or a rate of 7401/171 = 43.28 seconds per factor.

If I were to use all cores of that same machine for LLR instead, I'd be completing tests at a rate of 65-66 seconds per test.

When you take other things into account (duplicate factors, factors for candidates which have already been LLR tested, and computers which are better in LLRing than at sieving), you'll find that 6P is more or less the optimal sieve depth.
Oddball is offline   Reply With Quote
Old 2011-04-13, 23:46   #4
Lennart
 
Lennart's Avatar
 
"Lennart"
Jun 2007

25×5×7 Posts
Default

Quote:
Originally Posted by Oddball View Post
I've just run a quick benchmark: sieving 5999T-6000T yields 171 factors. It took me just over two hours (7401 seconds, to be precise) to finish that 1T range, or a rate of 7401/171 = 43.28 seconds per factor.

If I were to use all cores of that same machine for LLR instead, I'd be completing tests at a rate of 65-66 seconds per test.

When you take other things into account (duplicate factors, factors for candidates which have already been LLR tested, and computers which are better in LLRing than at sieving), you'll find that 6P is more or less the optimal sieve depth.

When I sieve on my GPU I get 227 f/hr Thats 3600/227 = 15.9 sec

If you merge two files to 480k-490k You will do it faster.

Lennart

EDIT I forgot to say this was on 6P-6002T

Last fiddled with by Lennart on 2011-04-13 at 23:50
Lennart is offline   Reply With Quote
Old 2013-04-24, 01:37   #5
hemiboso
 
Apr 2013

12 Posts
Default Question re Prime Spiral Sieve Spin on Twin Primes

I'm wondering if the way I've presented the factorization of twin primes is even remotely useful to any of you ... http://www.primesdemystified.com/twinprimes ... accepting that this is from the perspective of a crackpot arithmetician sticking his neck out to ask a sincere question of bonafide mathematicians and programmers(?)
hemiboso is offline   Reply With Quote
Old 2018-12-19, 18:38   #6
Puzzle-Peter
 
Puzzle-Peter's Avatar
 
Jun 2009

3·223 Posts
Default

Talking about sieving - I tried to run tpsieve-cuda on a recent and powerful GPU. But it appears to be looking for some libcudart library that is way outdated and nowhere to be found on the system. Does anybody know how to get it to run on a modern system?
Puzzle-Peter is offline   Reply With Quote
Old 2018-12-20, 07:32   #7
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

218816 Posts
Default

can you post lib name? there are lots of old cuda libs here somewhere, we may be able to find it for you...
LaurV is offline   Reply With Quote
Old 2018-12-21, 10:12   #8
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT)

13×19×23 Posts
Default

If the binaries are ancient then you are probably better off recompiling as it will then be optimised for your modern gpu this might give you a nice speed boost(or not).
henryzz is offline   Reply With Quote
Old 2018-12-25, 17:57   #9
Puzzle-Peter
 
Puzzle-Peter's Avatar
 
Jun 2009

66910 Posts
Default

It's looking for libcudart.so.2 but I don't know where it's trying to find that file.
Is the source available? Trying to compile might be a good idea.

Last fiddled with by Puzzle-Peter on 2018-12-25 at 17:57
Puzzle-Peter is offline   Reply With Quote
Old 2018-12-27, 10:02   #10
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

23·29·37 Posts
Default

That library is part of cuda runtime toolkit 2.3 (from 2009) which you can take from here.

Old discussion here (just first google searched link).

You should not need anything like that for the new cards. You need to reinstall new stuff, and possible tweak the source code of that old program.
LaurV is offline   Reply With Quote
Old 2019-07-04, 18:26   #11
Puzzle-Peter
 
Puzzle-Peter's Avatar
 
Jun 2009

3×223 Posts
Default

I had a look at the source, but that's not what I am very good at. I learned it is "built from the ppsieve package" but I am at a loss at how to get a tpsieve from that?


I had a hard time tweaking polysieve which is only a single file of code and a short one also. These multifile builds just go over my head. It clearly shows I never really learned to write software.
Puzzle-Peter is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Test Sieving Questions nstaab1 Lounge 15 2013-03-06 13:48
Questions: automated trial sieving Dubslow Factoring 0 2012-12-31 09:47
Questions about P-1 NBtarheel_33 Math 5 2011-02-21 23:44
GPU Questions Flatlander GPU Computing 6 2011-02-06 00:17
Line sieving vs. lattice sieving JHansen NFSNET Discussion 9 2010-06-09 19:25

All times are UTC. The time now is 06:18.

Mon Jul 13 06:18:42 UTC 2020 up 110 days, 3:51, 0 users, load averages: 2.24, 2.46, 2.25

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.