mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2019-05-03, 19:28   #210
rob147147
 
Apr 2013
Durham, UK

32×7 Posts
Default

I've been working on my own implementation of a CUDA version of sr2sieve for some time. Its still very much a work in progress (it only sieves the -1 side atm, so k*b^n-1, and only prints factors to the terminal). On a 2070 MaxQ it can sieve between 3x and 10x faster than a single cpu core on various test files I've tried, and finds all factors in my test cases, but I'm not claiming it is perfect. It could miss factors in other test cases though I hope not.

I push the code updates to my github occasionally but its a bit out of date currently. https://github.com/rob147147/CUDA-Ri...0BranchTesting

-Q varies the number of subsequences. sr2sieve will rewrite a sequence k*b^n-1 as (k*b^r) * b^(Qm) - 1, where n=Q*m + r. So you sieve a greater number of (sub)sequences, over a smaller range (m instead of n). Sometimes it can help to vary this, often not. I don't have any test cases to hand where I noticed a reasonable difference. Will try to dig some up at some point.

Last fiddled with by rob147147 on 2019-05-03 at 19:41
rob147147 is offline   Reply With Quote
Old 2019-05-03, 20:49   #211
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

635410 Posts
Default

Quote:
Originally Posted by pepi37 View Post
PPS sieva?
Running on GPU for base2
I'm not touching ppsieve and srsieve2 will not replace it.
rogue is offline   Reply With Quote
Old 2019-07-12, 17:57   #212
rebirther
 
rebirther's Avatar
 
Sep 2011
Germany

2·3·479 Posts
Default

@rogue:
I have a bigger difference in tests left between srsieve 1.0.5 and srsieve 1.1.4:


with R627 up to 100M (2.5-10k range)

srsieve 1.0.5: 1137188 tests left
srsieve 1.1.4: 1339442 tests left

Last fiddled with by rebirther on 2019-07-12 at 17:58
rebirther is offline   Reply With Quote
Old 2019-07-12, 20:04   #213
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

143228 Posts
Default

Quote:
Originally Posted by rebirther View Post
@rogue:
I have a bigger difference in tests left between srsieve 1.0.5 and srsieve 1.1.4:

with R627 up to 100M (2.5-10k range)

srsieve 1.0.5: 1137188 tests left
srsieve 1.1.4: 1339442 tests left
I'll take a look. Are the sequences to be sieved on the CRUS site?
rogue is offline   Reply With Quote
Old 2019-07-12, 20:12   #214
rebirther
 
rebirther's Avatar
 
Sep 2011
Germany

54728 Posts
Default

Quote:
Originally Posted by rogue View Post
I'll take a look. Are the sequences to be sieved on the CRUS site?
If you need a file let me know. Its a new started base up to 2.5k for CRUS.
rebirther is offline   Reply With Quote
Old 2019-07-12, 20:24   #215
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2×32×353 Posts
Default

Quote:
Originally Posted by rebirther View Post
If you need a file let me know. Its a new started base up to 2.5k for CRUS.
I will since I didn't see it on the CRUS page.
rogue is offline   Reply With Quote
Old 2019-07-12, 20:37   #216
rebirther
 
rebirther's Avatar
 
Sep 2011
Germany

2×3×479 Posts
Default

Quote:
Originally Posted by rogue View Post
I will since I didn't see it on the CRUS page.

Email sent.
rebirther is offline   Reply With Quote
Old 2019-07-13, 03:14   #217
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·32·353 Posts
Default

The old code is removing algebraic factors that are not removed by the newer code (which was heavily reworked). Although I won't fix srsieve, I will ensure that srsieve2 removes those algebraic factors correctly.
rogue is offline   Reply With Quote
Old 2019-09-25, 22:21   #218
kuratkull
 
kuratkull's Avatar
 
Mar 2007
Estonia

2×71 Posts
Default

I am using s2sieve v2 as a drop in replacement for an in-progress 1.8.11 sieve.
The 1.8.11 has a 65 mil p/sec rate on 4 threads, s2sieve 2 has a 50mil p/sec rate with the exact same arguments.

Code:
sr2sieve 1.8.11 -- A sieve for multiple sequences k*b^n+/-1 or b^n+/-k.
Read 11367 terms for 1 sequence from ABCD format file `sr_2.abcd'.
Split 1 base 2 sequence into 32 base 2^36 subsequences.
Wrote 1 Legendre symbol lookup tables to version 1 cache file `cache'.
Loaded Legendre symbol lookup tables for 1 sequences from `cache'.
Resuming from checkpoint pmin=5499307326589 in `checkpoint.txt'.
Expecting to find factors for about 507.80 terms in this range.
sr2sieve 1.8.11 started: 2221074 <= n <= 2300000, 5499307326589 <= p <= 20000000000000
5509220732291 | 39547695*2^2269624-1
p=5513128324607, 65904269 p/sec, 34 factors, 2.8% done, ETA 28 Sep 14:27
Code:
sr2sieve 2.0.0 -- A sieve for multiple sequences k*b^n+/-1 or b^n+/-k.
Read 11367 terms for 1 sequence from ABCD format file `sr_2.abcd'.
Split 1 base 2 sequence into 32 base 2^36 subsequences.
Loaded Legendre symbol lookup tables for 1 sequences from `cache'.
Resuming from checkpoint pmin=5484267013231 in `checkpoint.txt'.
Expecting to find factors for about 507.80 terms in this range.
sr2sieve 2.0.0 started: 2221074 <= n <= 2300000, 5484267013231 <= p <= 20000000000000
  5496333170473, 50718759 p/sec, 33 factors, 2.7% done, 0 sec/factor, ETA 29 Sep 09:21
IMPORTANT EDIT: sr2sieve v2 has niceness of 19, while 1.8 has 0, so that was the cause - my cpu was overburdened at the time of the testing.

But after giving ample cpu headroom I am still getting 85 mil p/sec vs 82 mil p/sec against v2

Last fiddled with by kuratkull on 2019-09-25 at 22:33 Reason: update
kuratkull is offline   Reply With Quote
Old 2020-02-03, 17:12   #219
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009

22×3×163 Posts
Default

Quote:
Originally Posted by rogue View Post
sr2seive 2.0.0 is attached. This version supports k up to 2^64, which required a number of code changes. This version also does additional validation to prevent the building of invalid Legendre tables, which can happen in all older releases. That is likely to happen for k > 2^31, but can happen for k < 2^31...
I tried running this yesterday. There are some items missing, according to the readme file. srsieve.exe and srfile.exe. Other references suggest sr1sieve.exe. I am looking for Windows builds! It would be nice to have all the pieces...
storm5510 is offline   Reply With Quote
Old 2020-02-03, 18:06   #220
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2×32×353 Posts
Default

Quote:
Originally Posted by storm5510 View Post
I tried running this yesterday. There are some items missing, according to the readme file. srsieve.exe and srfile.exe. Other references suggest sr1sieve.exe. I am looking for Windows builds! It would be nice to have all the pieces...
I suggest switching from srsieve to srsieve2 (part of the mtsieve distribution). srsieve and srfile are published in a separate post on this thread.
rogue is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sieving twins with srsieve henryzz Twin Prime Search 0 2014-03-18 12:44
Intel announces multi-core enhancements for Haswell chips ixfd64 Hardware 8 2012-02-10 20:32
LLRnet enhancements kar_bon No Prime Left Behind 10 2008-03-28 11:21
TODO list and suggestions/comments/enhancements Greenbank Octoproth Search 2 2006-12-03 17:28
Suggestions for future enhancements Reboot It Software 16 2003-10-17 01:31

All times are UTC. The time now is 19:54.


Sun Aug 1 19:54:00 UTC 2021 up 9 days, 14:22, 0 users, load averages: 1.40, 1.27, 1.33

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.