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)

rogue 2020-01-15 21:17

I found the cause of the other issue. That will be fixed in the next update as well.

Happy5214 2020-01-15 22:28

[QUOTE=rogue;535165]The segfault is the same issue. I'm not certain why one just terminates without a segfault and the other does. For this range I now see this:

[code]
srsieve2 -W 3 -n 100 -N 1500000 -P 1e9 -o t17_b2.prp -f B -s "963643*2^n-1"
srsieve2 v1.2, a program to find factors of k*b^n+c numbers for fixed b and variable k and n
Sieving with generic logic
Sieve started: 2 < p < 1e9 with 1499901 terms (100 < n < 1500000, k*2^n+c) (expecting 1449733 factors)
Sieving with generic logic
Split 1 base 2 sequence into 1 base 2^120 sequences.
Fatal Error: 963643*2^14263-1 mod 269 = 142
[/code]I don't know what is causing that yet. Fortunately you can break it up into smaller ranges:

[code]
srsieve2 -W 3 -n 1 -N 200 -P 1e9 -o t17_b2.prp -f B -s "963643*2^n-1"
srsieve2 v1.2, a program to find factors of k*b^n+c numbers for fixed b and variable k and n
Sieving with generic logic
Sieve started: 2 < p < 1e9 with 200 terms (1 < n < 200, k*2^n+c) (expecting 193 factors)
Sequence 963643*2^n-1 removed as all terms have a factor
Fatal Error: All sequences have been removed

srsieve2 -W 3 -n 200 -N 5000 -P 1e9 -o t17_b2.prp -f B -s "963643*2^n-1"
srsieve2 v1.2, a program to find factors of k*b^n+c numbers for fixed b and variable k and n
Sieving with generic logic
Sieve started: 2 < p < 1e9 with 4801 terms (200 < n < 5000, k*2^n+c) (expecting 4640 factors)
Sieving with generic logic
Split 1 base 2 sequence into 1 base 2^24 sequences.
Sieving with generic logic
Split 1 base 2 sequence into 1 base 2^24 sequences.

CTRL-C accepted. Please wait for threads to complete.
Sieve interrupted at p=694848779.
Processor time: 21.72 sec. (0.39 sieving) (2.82 cores)
8 terms written to t17_b2.prp
Primes tested: 33000000. Factors found: 0. Remaining terms: 8. Time: 7.69 seconds.
[/code]and eventually test the entire range. That is just a workaround. I still need to find the root cause of this issue and fix it.[/QUOTE]

I still use sr1sieve (sr2sieve for multi-k batches) past p=1e9, so I just went ahead and used the old srsieve instead. I've also hit this issue with other low ranges, though I don't have a record of what those batches were.

The segfault was new in the SVN version. My copy of 1.9.5 (from source) did display a divisibility check error similar to the first quoted output.

rogue 2020-01-16 02:21

[QUOTE=Happy5214;535174]I still use sr1sieve (sr2sieve for multi-k batches) past p=1e9, so I just went ahead and used the old srsieve instead. I've also hit this issue with other low ranges, though I don't have a record of what those batches were.

The segfault was new in the SVN version. My copy of 1.9.5 (from source) did display a divisibility check error similar to the first quoted output.[/QUOTE]

Yup, that is what I have fixed. The issue is a piece of code that computes b^n (mod p) which only works if n > 0. In this case n = 0, so it failed.

Eventually srsieve2 will be able to do what sr1sieve does, but I need to finish the integration of sr2sieve logic. It is partially there, but disabled. I just haven't had time to do it.

rogue 2020-01-16 14:43

I have posted 1.9.7 and removed 1.9.6. The only change is to fix the two bugs in srsieve2.

unconnected 2020-01-17 13:09

Got a permanent error while trying to use srsieve2:
[CODE]

$ ./srsieve2 -P1000000000 -n2 -N10000 -fA -s"64*500^n+1"
srsieve2 v1.2.1, a program to find factors of k*b^n+c numbers for fixed b and variable k and n
(kp) Sequence has algebraic factorization: 64*500^n+1 -> (4^3)*500^n+1
(kp) Sequence 64*500^n+1 has 3333 terms removed due to algebraic factors of the form 4*500^(n/3)+1
(cr) Sequence has algebraic factorization: 64*500^n+1 -> 64*500^6 = (2^2*5^2)^9
(cr) Sequence has algebraic factorization: 64*500^n+1 -> 64*500^6 = (2^3*5^3)^6
(cr) Sequence has algebraic factorization: 64*500^n+1 -> 64*500^6 = (2^6*5^6)^3
(cr) Sequence has algebraic factorization: 64*500^n+1 -> 64*500^6 = (2^9*5^9)^2
(p4) Removed 1667 algebraic factors for 64*500^n+1 of the form (2*2^2*500^(n/2)+2*2^1*500^(n/4)+1)
Sieving with generic logic
Sieve started: 2 < p < 1e9 with 4999 terms (2 < n < 10000, k*500^n+c) (expecting 4832 factors)
Unable to lock mutex thread_1_worker. Exiting.

[/CODE]

rogue 2020-01-17 14:12

[QUOTE=unconnected;535325]Got a permanent error while trying to use srsieve2:
[CODE]

$ ./srsieve2 -P1000000000 -n2 -N10000 -fA -s"64*500^n+1"
srsieve2 v1.2.1, a program to find factors of k*b^n+c numbers for fixed b and variable k and n
(kp) Sequence has algebraic factorization: 64*500^n+1 -> (4^3)*500^n+1
(kp) Sequence 64*500^n+1 has 3333 terms removed due to algebraic factors of the form 4*500^(n/3)+1
(cr) Sequence has algebraic factorization: 64*500^n+1 -> 64*500^6 = (2^2*5^2)^9
(cr) Sequence has algebraic factorization: 64*500^n+1 -> 64*500^6 = (2^3*5^3)^6
(cr) Sequence has algebraic factorization: 64*500^n+1 -> 64*500^6 = (2^6*5^6)^3
(cr) Sequence has algebraic factorization: 64*500^n+1 -> 64*500^6 = (2^9*5^9)^2
(p4) Removed 1667 algebraic factors for 64*500^n+1 of the form (2*2^2*500^(n/2)+2*2^1*500^(n/4)+1)
Sieving with generic logic
Sieve started: 2 < p < 1e9 with 4999 terms (2 < n < 10000, k*500^n+c) (expecting 4832 factors)
Unable to lock mutex thread_1_worker. Exiting.

[/CODE][/QUOTE]

Hmm. I cannot reproduce this on Windows. I'll try on my Mac later.

unconnected 2020-01-17 14:35

I'm on Ubuntu 18.04.3 LTS, kernel version 5.3.7.
srsieve2 binary info:
[CODE]$ file srsieve2
srsieve2: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=b0d4a87145925df566d084383d36b5997f8faf0a, not stripped


$ ldd srsieve2
linux-vdso.so.1 (0x00007fff35128000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4346d2c000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f43469a3000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4346605000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f43463ed000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4345ffc000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4347180000)

[/CODE]
Things I've tried - varyed sequences and sieve ranges, set -W option, even run from root account - none of this helped. Let me know if you need any additional info to investigate this issue.
My initial goal was to integrate srsieve2 to srbsieve to speed up overall progress.

rogue 2020-01-17 17:00

Since you are building on your own, you can comment out the code in the SharedMemoryItem.cpp class in the TryLock(), Lock(), and Release() methods and rebuild. This will only work if you have 1 worker.

If you have any debugging experience, a stack trace would be helpful.

pepi37 2020-01-17 22:26

[QUOTE=rogue;535217]I have posted 1.9.7 and removed 1.9.6. The only change is to fix the two bugs in srsieve2.[/QUOTE]


Link is outdated. Give me 1.9.5.7 version

rebirther 2020-01-19 08:13

@rogue: Just let you know that the -fB switch is working now :)

rogue 2020-01-20 00:35

[QUOTE=pepi37;535387]Link is outdated. Give me 1.9.5.7 version[/QUOTE]

There is no 1.9.5.7. There is 1.9.5 and 1.9.7. Since you are not on Windows, you need to d/l 1.9.7 and build. All of the source is checked in (I think) and is included in the .7z file (by accident).


All times are UTC. The time now is 22:45.

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