mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   mtsieve (https://www.mersenneforum.org/showthread.php?t=23042)

storm5510 2023-03-29 17:00

I use [I]p/sec[/I] as a relative speed indicator. On my aging i7 hardware, it will run between 500K and 650K with 7 threads. I have tried 8, but the Windows GUI gets sluggish at times. It is fine at 7. Of course, this throughput depends on how large the series is. There are 36 [I]k's[/I] in the series I am running now for CRUS. A smaller series means a little faster. It would be nice if [I]srsieve2[/I] could run faster, but it would need to maintain the stability it has now. This is where the "not broken, don't fix" idea comes from.

Citrix 2023-04-03 01:01

For version 2_4.0 I am getting

[CODE]

twinsieve.exe -k2 -K1000000 -n1000000 -r -b2 -p3 -P10e14
twinsieve v1.3, a program to find factors of k*b^n+1/-1 numbers for fixed b and n and variable k
Sieve started: 3 < p < 1e15 with 499999 terms (2 < k < 1000000, k*2^1000000) (expecting 484095 factors)
p=0, 0.000 p/sec, no factors found

[/CODE]

Am I doing something wrong?
Thanks

henryzz 2023-04-03 08:57

[QUOTE=Citrix;627748]For version 2_4.0 I am getting

[CODE]

twinsieve.exe -k2 -K1000000 -n1000000 -r -b2 -p3 -P10e14
twinsieve v1.3, a program to find factors of k*b^n+1/-1 numbers for fixed b and n and variable k
Sieve started: 3 < p < 1e15 with 499999 terms (2 < k < 1000000, k*2^1000000) (expecting 484095 factors)
p=0, 0.000 p/sec, no factors found

[/CODE]

Am I doing something wrong?
Thanks[/QUOTE]

You are using an old buggy version. Hopefully an update should solve your issue.

rogue 2023-04-03 12:05

[QUOTE=Citrix;627748]For version 2_4.0 I am getting

[CODE]

twinsieve.exe -k2 -K1000000 -n1000000 -r -b2 -p3 -P10e14
twinsieve v1.3, a program to find factors of k*b^n+1/-1 numbers for fixed b and n and variable k
Sieve started: 3 < p < 1e15 with 499999 terms (2 < k < 1000000, k*2^1000000) (expecting 484095 factors)
p=0, 0.000 p/sec, no factors found

[/CODE]

Am I doing something wrong?
Thanks[/QUOTE]

This was fixed in twinsieve 1.4. The current version is 1.6.

rogue 2023-04-03 13:34

[QUOTE=Citrix;627508]Here is the simplest pseudocode
1. Get n from command line and classes to be tested (generally +1 or -1 or both); (if n is 2 all primes need to be tested and we do not need to filter as all primes are odd; 2 is the default value)
2. The location where il_PrimeList is initialized with primes we can insert the following lines of code to filter the primes.
(p is current prime)

[CODE]
while (prime<max)
{
if (n>2 && (p%n==+1 || p%n==-1)) {Enter this prime in the array}
else {skip this prime and go to next prime from iterator}
}
[/CODE]

3. p%n can be calculated faster for certain n values (ex. n=2^x)- though this might not provide any significant speed up. I will let you decide.[/QUOTE]

Is "n" the only value to be specified on the command line? I cannot change where the il_PrimeList is populated. I would have to eliminate in TestMegaPrimeChunk(). For the GPU the kernel itself would need to ignore.

Citrix 2023-04-04 02:05

[QUOTE=rogue;627758]This was fixed in twinsieve 1.4. The current version is 1.6.[/QUOTE]

[code]

twinsieve.exe -W16 -k2 -K1000000 -n1000000 -r -b2 -p3 -P10e14 -fA -t1 -r
twinsieve v1.6, a program to find factors of k*b^n+1/-1 numbers for fixed b and n and variable k
Sieve started: 3 < p < 1e15 with 2 terms (3 < k < 999999, k*2^1000000) (expecting 2 factors)
Increasing worksize to 80000 since each chunk is tested in less than a second
Increasing worksize to 10000000 since each chunk is tested in less than a second
Increasing worksize to 50000000 since each chunk is tested in less than a second
Decreasing worksize to 25000000 since each chunk needs more than 5 seconds to test
p=82453759727, 57.39M p/sec, 1 factors found at 180 sec per factor (last 1 min), 0.0% done. ETC 2023-04-12 17:16

CTRL-C accepted. Threads will stop after sieving to 158741299859
Sieve interrupted at p=160495427809.
CPU time: 410.95 sec. (21.41 sieving) (4.20 cores)
Fatal Error: Something is wrong. Counted terms (0) != expected terms (1)

[/code]

How does this need to be fixed?

Citrix 2023-04-04 02:13

[QUOTE=rogue;627759]Is "n" the only value to be specified on the command line? I cannot change where the il_PrimeList is populated. I would have to eliminate in TestMegaPrimeChunk(). For the GPU the kernel itself would need to ignore.[/QUOTE]

The value of N and possible classes need to be specified in the command line. If possible can we allow multiple arbitrary number of classes ex. -f{N,a,b,c,d...}. So we allow p%N=a or b or c or d

You can eliminate in TestMegaPrimeChunk() or wherever you think it would be appropriate.

rogue 2023-04-04 12:36

[QUOTE=Citrix;627795][code]

twinsieve.exe -W16 -k2 -K1000000 -n1000000 -r -b2 -p3 -P10e14 -fA -t1 -r
twinsieve v1.6, a program to find factors of k*b^n+1/-1 numbers for fixed b and n and variable k
Sieve started: 3 < p < 1e15 with 2 terms (3 < k < 999999, k*2^1000000) (expecting 2 factors)
Increasing worksize to 80000 since each chunk is tested in less than a second
Increasing worksize to 10000000 since each chunk is tested in less than a second
Increasing worksize to 50000000 since each chunk is tested in less than a second
Decreasing worksize to 25000000 since each chunk needs more than 5 seconds to test
p=82453759727, 57.39M p/sec, 1 factors found at 180 sec per factor (last 1 min), 0.0% done. ETC 2023-04-12 17:16

CTRL-C accepted. Threads will stop after sieving to 158741299859
Sieve interrupted at p=160495427809.
CPU time: 410.95 sec. (21.41 sieving) (4.20 cores)
Fatal Error: Something is wrong. Counted terms (0) != expected terms (1)

[/code]

How does this need to be fixed?[/QUOTE]

For base 2, even k are already removed, so you don't need -r. I broke this in 1.6. I will fix the code. I think I should remove -r and do that automatically. Thoughts?

storm5510 2023-04-04 15:57

[I]srsieve2[/I] uses values of [B]n[/B] and [I]fbncsieve[/I] uses values of [B]k[/B].

I don't believe this is a 1-to-1 relationship. So, what is the conversion value for [B]n[/B] to [B]k[/B]?

rogue 2023-04-04 17:16

[QUOTE=storm5510;627823][I]srsieve2[/I] uses values of [B]n[/B] and [I]fbncsieve[/I] uses values of [B]k[/B].

I don't believe this is a 1-to-1 relationship. So, what is the conversion value for [B]n[/B] to [B]k[/B]?[/QUOTE]

i don't understand the question.

storm5510 2023-04-04 18:18

[QUOTE=rogue;627826]i don't understand the question.[/QUOTE]

You don't understand the question. OK. I will make it simpler.

Is k=1e6 the same as n=1e6?


All times are UTC. The time now is 15:20.

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