Thread: mtsieve
View Single Post
Old 2018-02-23, 02:31   #33
Dylan14
 
Dylan14's Avatar
 
"Dylan"
Mar 2017

499 Posts
Default

I found a bug with the cksieve executable: when the -n flag is supplied with 1 as its argument it gives a fatal error saying that 1 is out of range. The output is given below:

Code:
C:\Users\Dylan_000\Desktop\mtsieve\mtsieve>cksieve -P1e9 -n1 -N50000 -b50
cksieve v1.2, a program to find factors of (b^n+/-1)^2-2 numbers
Fatal Error:  cksieve: out of range argument -n 1
whereas if the -n flag is supplied with a 2 instead it works fine:

Code:
C:\Users\Dylan_000\Desktop\mtsieve\mtsieve>cksieve -P1e9 -n2 -N50000 -b50
cksieve v1.2, a program to find factors of (b^n+/-1)^2-2 numbers
Sieve started: 1 < p < 1e9 with 99998 terms
<snip program output>
In cksieve v1.1.4 -n 1 works fine:

Code:
cksieve -P1e9 -n1 -N50000 -b50
cksieve 1.1.4 -- A sieve for Carol (b^n-1)^2-2 and Kynea (b^n+1)^2-2 numbers.
Started with 100000 terms for (50^n+/-c)^2-2 from command line.
cksieve 1.1.4 started: 1 <= n <= 50000, 3 <= p <= 1000000000
<snip program output>
I can confirm that the multithreading works in cksieve: with one thread on a otherwise idle i5-5200U it takes 261.82 seconds to process the sieve in the second code snippet, whereas with 4 threads the time taken is 88.82 sec.

Last fiddled with by Dylan14 on 2018-02-23 at 02:34
Dylan14 is online now   Reply With Quote