mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   srsieve/sr2sieve enhancements (https://www.mersenneforum.org/showthread.php?t=15833)

henryzz 2013-03-30 22:45

[QUOTE=pepi37;335573]Can someone explain better what is this options for?

-B --baby METHOD Use METHOD for baby step mulmods.
-G --giant METHOD Use METHOD for giant step mulmods.
--ladder METHOD Use METHOD for ladder mulmods.

Is any of those methods faster or slower ( and in what cases)?[/QUOTE]
Depending on various things like number of ks, range of n, number of candidates, etc the different methods can be faster or slower. By default it checks all of them to see which is fastest for that file on startup.

pepi37 2013-03-30 23:21

That is great news, so always fastest method is selected :)

kar_bon 2013-03-31 02:35

[QUOTE=f1pokerspeed;335564]I wish there was a way that I could automatically run the sieve with a batch file that does all of the ranges for you.
[/QUOTE]

You could try this:

To do:
- srsieve.exe is in the directory
- you have the rights to copy files and create dirs in here

Make a batch file named "run.bat" with this:
[code]
set /a num=1
set /a range_start=%2
set /a increment=%3
set /a range_end=%range_start%+increment

:next
md sieve%num%
copy input.txt sieve%num%
copy srsieve.exe sieve%num%
echo srsieve -f -q -G -n 1 -N 50000 -p %range_start% -P %range_end% input.txt >sieve%num%/run.bat

set /a num=%num%+1
set /a range_start=%range_start%+increment
set /a range_end=%range_end%+increment

if %num% LEQ %1 goto next

start "Sieving 1..." /Dsieve1 run.bat
start "Sieving 2..." /Dsieve2 run.bat
[/code]

There's also an input-file with the values you want to sieve named "input.txt" like this
[code]
11*2^n-1
[/code]

Call "run.bat" with 3 parameters:
1. number of cores/sieves you want to start at once
2. start-value of sieve (p-value in srsieve)
3. increment of the sieve-value

For example

run 2 1 1000000

will create 2 folders named "sieve1" and "sieve2", copy srsieve.exe and the input file in there and start each sieve.

After finished there're in each folder the "srfactors.txt" files with the found factors
Delete them with srfile.exe from one of the resulted "t17_b2.prp" (in this example).
Another batch would help here, too.

Some changes needed for sr(x)sieve.exe.

f1pokerspeed 2013-03-31 18:26

Thanks for the batch file kar_bon - I'll see if I can get it to work for sr(x)sieve and test it out.

pepi37 2013-03-31 23:37

I have small problem with removing factors.
I collect and put all factors in one file, and there is 941 factor.
But it is only removed 920?
Also when I add another 133 ( from another computer) it is only removed 114
I double-checked and no one sieve range was overlap, so it must be some other explanation.
Thanks for any idea...

henryzz 2013-04-01 00:39

There is always the possibility of multiple factors being found for the same candidate.

pepi37 2013-04-01 01:27

Yes , it looks like you are right!
I found duplicates in factors...

f1pokerspeed 2013-04-03 19:16

ERROR: 4216856631*2^n-1: Square-free part 4216856631 of k too large.

I get this error when using sr2sieve. Is there any way of getting around this? It's frustrating because that is the smallest K in a batch of 90 that I have to sieve now - making me use sr1sieve, which is tough to manipulate for speed - it only sieves 1 K at a time...

Any suggestions?

rogue 2013-04-03 21:08

[QUOTE=f1pokerspeed;335989]ERROR: 4216856631*2^n-1: Square-free part 4216856631 of k too large.

I get this error when using sr2sieve. Is there any way of getting around this? It's frustrating because that is the smallest K in a batch of 90 that I have to sieve now - making me use sr1sieve, which is tough to manipulate for speed - it only sieves 1 K at a time...[/QUOTE]

Use -x.

f1pokerspeed 2013-04-03 22:28

N:\sr2sieve>sr2sieve -i sr_2.abcd -p 1e6 -P 1e9 -x
sr2sieve 1.8.11 -- A sieve for multiple sequences k*b^n+/-1 or b^n+/-k.
Read 752555 terms for 89 sequences from ABCD format file `sr_2.abcd'.
Split 89 base 2 sequences into 178 base 2^2 subsequences.
ERROR: 4216856631*2^n-1: Square-free part 4216856631 of k too large.

Still does not work... ideas?

rogue 2013-04-03 23:23

[QUOTE=f1pokerspeed;336015]N:\sr2sieve>sr2sieve -i sr_2.abcd -p 1e6 -P 1e9 -x
sr2sieve 1.8.11 -- A sieve for multiple sequences k*b^n+/-1 or b^n+/-k.
Read 752555 terms for 89 sequences from ABCD format file `sr_2.abcd'.
Split 89 base 2 sequences into 178 base 2^2 subsequences.
ERROR: 4216856631*2^n-1: Square-free part 4216856631 of k too large.

Still does not work... ideas?[/QUOTE]

My bad. That is enabled by default and cannot be disabled. Unfortunately it is not easy to fix the code to handle k larger than 31 bits and such a change could significantly impact performance.


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

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