mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Conjectures 'R Us

Reply
 
Thread Tools
Old 2008-05-24, 06:43   #34
KEP
Quasi Admin Thing
 
KEP's Avatar
 
May 2005

2·3·7·23 Posts
Default

Quote:
Originally Posted by michaf View Post
Thanks, KEP,

I don't have the computerpower to run 8 cpu-years, unfortunately :(
this test was on a laptop, so maybe a 'normal' computer will be quicker.
The perfect thing about the script is, that it works sequential, so you can just start off where you left; a power-outage will now result in much less work to restart.

The script will output one file: it contains just the k's which have no primes upto 1k.

When I get the time, I'll try to write a script that takes it on from 1k onward on a more convenient non-intervening way (My script-writing skills need a LOT of honing, so I need the challenge :) )

Does anyone know what the maximum number of sequences is for srsieve?
This would largely determine the need for manual intervention...

KEP, I'll PM you the script in a sec
OK I got your script. I'll try to make it work, but how do I run it using WinPFGW? Also will it be possible to ask the range to end at some point? Like every billion or 15 billion k's (which means my Quad can do a quarter each core)?

About srsieve, according to reply from Geoff, the amount of candidates for Base 3 is limited to memory issues only, so if one has enough memory, it shouldnt be a big issue to use srsieve

Regards

Kenneth!

Ps. Actually if I makes your script work, I would really like to throw in the effort and try to break this challenge up to at least n=25,000. However we all has to remember that WinPFGW (without sieving) gets hopelessly ineffecient above n=1,000 or with a little luck above n=2,500.
KEP is offline   Reply With Quote
Old 2008-05-24, 12:26   #35
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

24×397 Posts
Default

Quote:
Originally Posted by KEP View Post
OK I got your script. I'll try to make it work, but how do I run it using WinPFGW? Also will it be possible to ask the range to end at some point? Like every billion or 15 billion k's (which means my Quad can do a quarter each core)?
Would someone mind posting the script here? I would like to take a look at it.
rogue is offline   Reply With Quote
Old 2008-05-24, 13:45   #36
KEP
Quasi Admin Thing
 
KEP's Avatar
 
May 2005

2×3×7×23 Posts
Default

Quote:
Originally Posted by rogue View Post
Would someone mind posting the script here? I would like to take a look at it.
I guess someone can delete this post, if Michaf is against me publicing the script that he wrote and I am going to use :

--------------------------------------------------------------------------
SCRIPT // autobodgified by scriptify.pl
: pre-declare scriptify's globals
DIMS PCtmpString
DIMS str
OPENFILEAPP logfile,log.out
DIM k,2
DIM n,1
DIM primefound
DIM bignum,k*3^n-1
PRP bignum
SET k,100000000
SET n,1
LABEL label
SET bignum,k*3^n-1
PRP bignum
IF !(ISPRIME) THEN GOTO PCnotif_a
SET k,k+(2)
PRINT k
SET n,1
GOTO label
GOTO PCendelse_b
LABEL PCnotif_a
IF !(n<1000) THEN GOTO PCnotif_c
SET n,n+(1)
GOTO label
GOTO PCendelse_d
LABEL PCnotif_c
: synthesise fprintf
SETS PCtmpString,%d;k
WRITE logfile,PCtmpString
SET n,1
SET k,k+(2)
GOTO label
LABEL PCendelse_d

LABEL PCendelse_b

END
--------------------------------------------------------------------------

Actually Michaf did send me another one, which lies in my PM, but the above one, is workable if you copy it into a notepad and names it "*.pl", and then ask WinPFGW to run it. However the script has some lackings, since it appears that there is no way it saves the PRP or at least verifys it as a composite or a strict prime, before moving on to next k. Also its impossible to see in the pfgw.log and pfgw-prime.log file what k/n pair is primed, hence this makes it virtually impossible to compare the verification file once one verifys the PRP and of course when running billions a few PRP will fail to be primes, and then you really has no chance, to know which k is not in fact a prime and therefor still remaining. I've written this to Michaf, and is expecting to hear from him sometimes, because there were a list of things I would like to be able to do before switching to use only that script (even though it is a lot faster, 100M k's on a Quad core a day). But hey let's wait and see what he says when he gets out of bed and sneaks up to his computer (hope it doesn't get scared once it realise Michaf is in front of it)

Take care!

Kenneth!
KEP is offline   Reply With Quote
Old 2008-05-24, 16:16   #37
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

24×397 Posts
Default

Quote:
Originally Posted by KEP View Post
SCRIPT // autobodgified by scriptify.pl
: pre-declare scriptify's globals
DIMS PCtmpString
DIMS str
OPENFILEAPP logfile,log.out
DIM k,2
DIM n,1
DIM primefound
DIM bignum,k*3^n-1
PRP bignum
SET k,100000000
SET n,1
LABEL label
SET bignum,k*3^n-1
PRP bignum
IF !(ISPRIME) THEN GOTO PCnotif_a
SET k,k+(2)
PRINT k
SET n,1
GOTO label
GOTO PCendelse_b
LABEL PCnotif_a
IF !(n<1000) THEN GOTO PCnotif_c
SET n,n+(1)
GOTO label
GOTO PCendelse_d
LABEL PCnotif_c
: synthesise fprintf
SETS PCtmpString,%d;k
WRITE logfile,PCtmpString
SET n,1
SET k,k+(2)
GOTO label
LABEL PCendelse_d
LABEL PCendelse_b
END
It should be possible to use srsieve to kick out a pre-sieved file (across many k and n), then use a script similar to this to PRP test the inputs and skip to the next k when a prime is found for a given k/n combination. You can change the WRITE command to write bignum instead of PCtmpString and that will log the PRP, not just the value of k. With a small change to srsieve, I think you can have it sieve a thousand or so k at a time and append to an output file that could then be read by the script after a few million k have been sieved.

BTW, does someone have a list of all primes for the k that have been removed? It must be a fairly large file.
rogue is offline   Reply With Quote
Old 2008-05-24, 18:32   #38
michaf
 
michaf's Avatar
 
Jan 2005

479 Posts
Default

Quote:
Originally Posted by KEP View Post
OK I got your script. I'll try to make it work, but how do I run it using WinPFGW? Also will it be possible to ask the range to end at some point? Like every billion or 15 billion k's (which means my Quad can do a quarter each core)?

About srsieve, according to reply from Geoff, the amount of candidates for Base 3 is limited to memory issues only, so if one has enough memory, it shouldnt be a big issue to use srsieve

Regards

Kenneth!

Ps. Actually if I makes your script work, I would really like to throw in the effort and try to break this challenge up to at least n=25,000. However we all has to remember that WinPFGW (without sieving) gets hopelessly ineffecient above n=1,000 or with a little luck above n=2,500.
In part, see your PM's.
To run in WinPFGW, just use: 'riesel3.scr -f' in the input window.
(-f factors it to the 'standard' depth in winpfgw)

On srsieve: that would be wonderful :)

On winpfgw: I've tested 0.3M per hour when testing to 10k
and 1M per hour to 1k,
and 2M per DAY ro 25k!

I think testing to 10k is worth the effort of tripling the initial time.

I haven't tested to 5k.

Rogue, the original script is:
Code:
string str;
file logfile=fopen("log.out", "a");
integer k=2;
integer n=1;
integer primefound=0;
integer bignum=k*3^n-1;
PRP(bignum);

k=30000000;
n=1;

label :

bignum=k*3^n-1;
PRP(bignum);
if(ISPRIME) {
  k+=2;
  print(k);
  n=1;
  goto label;
} else {
  if(n<25000) {
    n+=1;
    goto label;
  } else {
    fprintf(logfile, "%d", k);
    n=1;
    k+=2;
    goto label;
    }
}
I can send you the scriptify - thingy which makes this into a working pfgw-script too,if you don't have it.

Oh, and no, I don't mind the script to bepublished at all :)
Just do not bash on it too hard, I know it can be improved in thousands of ways :)

Last fiddled with by michaf on 2008-05-24 at 18:39 Reason: changed sierpinski script to riesel
michaf is offline   Reply With Quote
Old 2008-05-24, 19:07   #39
KEP
Quasi Admin Thing
 
KEP's Avatar
 
May 2005

11110001102 Posts
Default

On my Quad core, I can bring down 600000 k's. each hour if going to only n<=1k .

For SrSieve, sieving 1541 base 19 candidates for sierpinski took around 12 Mb of RAM, so I think sieving thousands upon thousands of candidates should be rather easy. And again, I'm not interested in finding PRP only primes, but I may asses what you have suggested Rogue, and see if this can work.

Oh and about storering the k/n prime list for k<=100M, it is about 800Mb uncompressed and compressed around 100Mb

Hope I got it all, take care my hard working friends

Kenneth!
KEP is offline   Reply With Quote
Old 2008-05-24, 19:12   #40
michaf
 
michaf's Avatar
 
Jan 2005

7378 Posts
Default

Quote:
Originally Posted by KEP View Post
On my Quad core, I can bring down 600000 k's. each hour if going to only n<=1k .

For SrSieve, sieving 1541 base 19 candidates for sierpinski took around 12 Mb of RAM, so I think sieving thousands upon thousands of candidates should be rather easy. And again, I'm not interested in finding PRP only primes, but I may asses what you have suggested Rogue, and see if this can work.

Oh and about storering the k/n prime list for k<=100M, it is about 800Mb uncompressed and compressed around 100Mb

Hope I got it all, take care my hard working friends

Kenneth!
Do you use -f in pfgw? It sounds like you are prp-ing ALL values, while you better can try to factor it first.
michaf is offline   Reply With Quote
Old 2008-05-24, 19:17   #41
michaf
 
michaf's Avatar
 
Jan 2005

7378 Posts
Default

Rogue, the script is a bit updated:

version 0.2 now:

It saves primes found in primes.out
It saves NO primes sequences in NOprimes.out
It has a starting and stopping value for n and k
It writes the sequence instead of just k
(123456*3^n-1) instead of 123456


Code:
file noprimesfile=fopen("NOprimes.out", "a");
file primefile=fopen("primes.out", "a");
integer mink=30000000;
integer maxk=30000500;
integer minn=1;
integer maxn=100;
integer bignum;
integer k;
integer n;

k=mink;
n=minn;

label :

if(k>maxk) {
  goto end;
}

bignum=k*3^n-1;
PRP(bignum);
if(ISPRIME) {
  fprintf(primefile, "%d*3^%d-1", k, n);
  k+=2;
  print(k);
  n=1;
  goto label;
} else {
  if(n<maxn) {
    n+=1;
    goto label;
  } else {
    fprintf(noprimesfile, "%d*3^n-1", k);
    n=1;
    k+=2;
    goto label;
    }
}

end :
michaf is offline   Reply With Quote
Old 2008-05-24, 19:21   #42
KEP
Quasi Admin Thing
 
KEP's Avatar
 
May 2005

2×3×7×23 Posts
Default

@Michaf: I was doing PRP testing of all values untill now. However I still have the problem, when asking following: script.pl -f -tp, it runs 20002 tests and then WinPFGW gets caught in an endless loop of Brillart Lehmer tests, anyone who has an idea how to avoid that, because it is getting a pain in the $$s since I would really like to know for sure which k's is really primed, and bring them to n=25,000. That way we will for sure only have removed k's that is actual primes, hence the value of the evidence is more accurate.

@Rogue: Switching PCtmpString with bignum, still doesn't meet the needings, since it is important that I do not get the decimal expansion of the Prime found but the k*3^n-1 expression of the prime found. This will also save a ton of data.

Thank you for pointing out the need of -f Michaf, had totally sweat that one out of my little head

Kenneth!
KEP is offline   Reply With Quote
Old 2008-05-24, 19:22   #43
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

143208 Posts
Default

I was thinking that a fixed n sieve would probably be faster, but I don't know the removal rate. For example if you test to n=100, what percentage of k still do not have a prime? What about n=1000? n=10000?
rogue is offline   Reply With Quote
Old 2008-05-24, 19:25   #44
michaf
 
michaf's Avatar
 
Jan 2005

479 Posts
Default

Quote:
Originally Posted by KEP View Post
@Michaf: I was doing PRP testing of all values untill now. However I still have the problem, when asking following: script.pl -f -tp, it runs 20002 tests and then WinPFGW gets caught in an endless loop of Brillart Lehmer tests, anyone who has an idea how to avoid that, because it is getting a pain in the $$s since I would really like to know for sure which k's is really primed, and bring them to n=25,000. That way we will for sure only have removed k's that is actual primes, hence the value of the evidence is more accurate.

@Rogue: Switching PCtmpString with bignum, still doesn't meet the needings, since it is important that I do not get the decimal expansion of the Prime found but the k*3^n-1 expression of the prime found. This will also save a ton of data.

Thank you for pointing out the need of -f Michaf, had totally sweat that one out of my little head

Kenneth!
Now, a list is created with all PRP's, which can then be confirmed at a later stage. (Only a few, if any will not be primes, so that won't be a problem)
michaf is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bases 2 & 4 reservations/statuses/primes Jean Penné Conjectures 'R Us 466 2021-07-25 04:05
Prime finding rate, Sierp vs. Riesel? CGKIII Conjectures 'R Us 27 2012-09-12 23:16
Riesel and Sierp numbers bases <= 1024 R. Gerbicz Conjectures 'R Us 22 2009-12-29 20:21
Sieving Riesel & Sierp base 16 gd_barnes Conjectures 'R Us 13 2009-12-14 09:23
Sierpinski/ Riesel bases 6 to 18 robert44444uk Conjectures 'R Us 139 2007-12-17 05:17

All times are UTC. The time now is 09:47.


Tue Jul 27 09:47:41 UTC 2021 up 4 days, 4:16, 0 users, load averages: 1.87, 2.00, 1.92

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.