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)

pepi37 2019-09-23 19:30

[QUOTE=paulunderwood;526389]"Within the ABCD format, the difference on the first line is the [COLOR=Red]insertion
of the [$a $b ...] information [/COLOR]from the first line of the ABC file, and
on subsquent lines, only the [COLOR=Red]delta of the accumulation[/COLOR] is written. In
the ABCD format, blank lines are ignored, and it is valid to append
ABCD files togther (or to have a siever output "headers" to switch
processing)"

What is the problem exactly?

ABCD was designed for CPAP runs and to save on space. Why are you not using ABC format with the example headers?[/QUOTE]
I play at home and try to find some xGF divisors. So I can make initial sieve by srsieve and sr2sieve but that was is much slower then gfdnsieve from MTsieve pack.
Since I work with 1M or more candidates and even one test is about 4 seconds, different is huge when you have smaller number of candidate . And gfndsieve give me that with speed. But output ( at least to me) cannot be used on other program then PFGW, and I use Prime95 to find PRP and then it is easy with PFGW to test is prime xGF or not.

rebirther 2019-09-23 19:38

@rogue:

a feature request for srsieve2, the x factors found is uninteresting for me, can you replace it with x factors left + factors found rate f/sec? The factors left total I can only see at the end of sieving.

paulunderwood 2019-09-23 21:07

[QUOTE=pepi37;526418]I play at home and try to find some xGF divisors. So I can make initial sieve by srsieve and sr2sieve but that was is much slower then gfdnsieve from MTsieve pack.
Since I work with 1M or more candidates and even one test is about 4 seconds, different is huge when you have smaller number of candidate . And gfndsieve give me that with speed. But output ( at least to me) cannot be used on other program then PFGW, and I use Prime95 to find PRP and then it is easy with PFGW to test is prime xGF or not.[/QUOTE]

Can you run Perl? I am sure someone will knock up a program to convert from ABCD to Prime95 format...

pepi37 2019-09-23 21:15

[QUOTE=paulunderwood;526426]Can you run Perl? I am sure someone will knock up a program to convert from ABCD to Prime95 format...[/QUOTE]
I will install it if someone give me Perl code

paulunderwood 2019-09-23 23:40

Put this in a file called [C]abcd2p95.pl[/C] and run it like [C]perl abcd2p95.pl file.ABCD prime95input.txt[/C].

Make sure you do a backup of the sieve file first in case something goes wrong.

[CODE]open INFILE, "<@ARGV[0]" or die "Need input file\n";
open OUTFILE, ">@ARGV[1]" or die "Need output file\n";
@header = split( ' ', <INFILE> );

@expression = split( '\$', @header[1] );

@start = split( '\[', @header[2] );
@start = split( '\]', @start[1] );

$current = @start[0];
print OUTFILE $expression[0].$current.substr($expression[1],1)."\n";
while ( <INFILE> ) {
$current += $_;
print OUTFILE $expression[0].$current.substr($expression[1],1)."\n";
}

[/CODE]

pepi37 2019-09-24 07:44

Script is working but output file is wrong.
I have search in range k=20000 to 29999 and n=140000 to 150000


this is few factors to understand


[QUOTE]90109718183 | 25809*2^146911+1
90084905843 | 28401*2^144193+1
90110967913 | 21673*2^140160+1
90110995423 | 27213*2^145845+1
90086036939 | 29667*2^147152+1
90086094547 | 29673*2^142642+1
90111537401 | 21821*2^145953+1
90137001109 | 22923*2^145704+1
90086812721 | 26817*2^143047+1[/QUOTE]


your script as output give me this (last few results)


[QUOTE]99201471*2^140000+1
99201501*2^140000+1
99201525*2^140000+1
99201531*2^140000+1
99201551*2^140000+1
99201555*2^140000+1
99201585*2^140000+1
99201597*2^140000+1
99201681*2^140000+1
99201735*2^140000+1
99201765*2^140000+1
99201797*2^140000+1[/QUOTE]


So n is fixed to 140000 ( that is first problem) and second that k is out of range.

paulunderwood 2019-09-24 08:39

I have modified the above script to print to file the very first value in "[...]".

What you have there is a factor file, not an [U]ABCD[/U] file.

Here is my run of [C]perl ABCD2P95.pl test.ABCD test.p95input[/C]

test.ABCD:
[CODE]ABCD $a*2^140000+1 [20023] // Sieved to 97478600873
252
36
66
36
44
4
2
54
24
36
10
20
54[/CODE]

test.p95input
[CODE]20023*2^140000+1
20275*2^140000+1
20311*2^140000+1
20377*2^140000+1
20413*2^140000+1
20457*2^140000+1
20461*2^140000+1
20463*2^140000+1
20517*2^140000+1
20541*2^140000+1
20577*2^140000+1
20587*2^140000+1
20607*2^140000+1
20661*2^140000+1
[/CODE]

pepi37 2019-09-24 08:43

[QUOTE=paulunderwood;526471]I have modified the above script to print to file the very first value in "[...]".

What you have there is a factor file, not an [U]ABCD[/U] file.

Here is my run of [C]perl ABCD2P95.pl test.ABCD test.p95input[/C]

test.ABCD:
[CODE]ABCD $a*2^140000+1 [20023] // Sieved to 97478600873
252
36
66
36
44
4
2
54
24
36
10
20
54[/CODE]

test.p95input
[CODE]20275*2^140000+1
20311*2^140000+1
20377*2^140000+1
20413*2^140000+1
20457*2^140000+1
20461*2^140000+1
20463*2^140000+1
20517*2^140000+1
20541*2^140000+1
20577*2^140000+1
20587*2^140000+1
20607*2^140000+1
20661*2^140000+1
[/CODE][/QUOTE]

Where is New perl code?

paulunderwood 2019-09-24 08:56

[QUOTE=pepi37;526472]Where is New perl code?[/QUOTE]

[url]https://mersenneforum.org/showpost.php?p=526436&postcount=236[/url]

(Note 20023 will be included!)

pepi37 2019-09-24 09:08

[QUOTE=paulunderwood;526474][URL]https://mersenneforum.org/showpost.php?p=526436&postcount=236[/URL]

(Note 20023 will be included!)[/QUOTE]


As I say before , I search in range
k= 20000 to 29999
n=140000 to 150000


Part of output of perl script
k is above my limit
n is fixed to 140000 and that is no true

[QUOTE]196749*2^140000+1
196775*2^140000+1
196785*2^140000+1
196815*2^140000+1
196865*2^140000+1
[/QUOTE]

paulunderwood 2019-09-24 09:37

Here is the script that handles multiple header lines in a file:

[CODE]open INFILE, "<@ARGV[0]" or die "Need input file\n";
open OUTFILE, ">@ARGV[1]" or die "Need output file\n";

while ( <INFILE> ) {
if( $_ =~ /\[/ ) {
@header = split( ' ', $_ );

@expression = split( '\$', @header[1] );

@start = split( '\[', @header[2] );
@start = split( '\]', @start[1] );

$current = @start[0];
} else {
$current += $_;
}
print OUTFILE $expression[0].$current.substr($expression[1],1)."\n";
}
[/CODE]


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

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