mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Conjectures 'R Us (https://www.mersenneforum.org/forumdisplay.php?f=81)
-   -   Software/instructions/questions (https://www.mersenneforum.org/showthread.php?t=9742)

gd_barnes 2007-12-15 08:54

Software/instructions/questions
 
This thread is for software downloads and instructions as well as a forum for any related questions on how to run software related to the effort.

Here is a link to all of the latest software that should be needed: [URL]http://www.rieselprime.de/dl/CRUS_pack.zip[/URL]. The programs are LLR, PFGW, srsieve, sr1sieve, sr2sieve, and a PFGW starting bases script.

First an important note for more experienced prime searchers. This first post will be relatively elementary. For the specific sequence of what to run for different efforts here, see the second post. This will be detailed instructions on running each program.

Preliminaries:
I would suggest creating a separate directory for most of the programs except Srfile. The Sr(n)sieve series of sieving programs have a tendency to use some of the same generic file names and you don't want one sieve overlaying a prior one. Srfile could be copied into each of the 3 directories of the Sr(n)sieve programs. It is used to manipulate files of different types, remove factors from sieved files, and other misc. tasks.

Program instructions:
LLR - This is a prime finding or PRP (probable prime) finding program. It is the primary one that we will use for finding primes for n > ~3K-5K. If the base is a power of 2, (bases 4 and 16 for this effort), it difinitively finds a prime. If not, it only finds probable primes that must be proven by PFGW. To run it, double click it, choose 'Test Input', key in your sieved file name, the name of the file that you would like it to write programs to, and line 1, and press OK. Primes will be in the file you specified and it will write an 'lresults.txt' file that show details about the search.

PFGW - This is an outstanding general purpose program that can trial factor, find PRP's (probable primes), and do deterministic tests. It should be used at all times for testing bases that are not a power of 2 and is far faster than anything else for testing. It is also the best program to use when starting a new base because scripts can be written for it to do very specific things such as stop serching k's when a prime is found. You'll want to read the pfgwdoc.txt instructions in the download. It will talk about all of the parameters for the program. To open the program, double click the WinPFGW.exe icon. You'll want to change 'Output Verbose Screen' option to 'Super quiet' or the program will slow down slightly from displaying much info. on the screen. There are two different efforts it will be used for. Commands for each:

(1) When proving +1 PRP's found by LLR, use the following command:
"PFGW (input file with extension) -f0 -t -l". -f0 will cause it to do no initial factoring, -t will force it to prove the PRP's prime, and -l will cause it to write a more detailed results file. If you have a lot of primes you're proving, just see if the # of lines in the pfgw-prime.log file equal the number of primes in yor input. If so, they were all prime.

(2) When starting a new base, run PFGW version 3.4.0 or later using the [URL="http://www.noprimeleftbehind.net/crus/new-bases-4.3.txt"]new-bases-4.3[/URL] script as an input file. Then use the following command to run it:
"(script name) -f100 -l". -f100 will cause it do to a 'normal amount' of initial factoring. See above for -l. Regarding the script file, there are very simple instructions in the script. There are only 5 lines that need to be changed for each base.

srsieve: This is an all-purpose sieving program that is used as a 'set up' for sr1sieve and sr2sieve as well as sieving very large #'s of k's more quickly than anything else. It also is very effective at sieving starting from n=1 because it does not erroneously remove low n-values that would make the equation prime. First you need to create an input file of actual equations such as 7*30^n+1, 9*30^n+1, etc., one per line. Then go to the command prompt and use the equations file as input with a command like "srsieve -a -n 25e3 -N 100e3 -P 1e9 -m 4e9 (input file). -a is the type of output file (ABCD file-type in this case) -n is the low n-value of your range, -N is the high of the range, -P is how far to search (1 billion in this case), and -m tells it to not display factors on the screen less than 4G. (Unfortunately you can't set it higher than that but in this case you're not going higher so it keeps it moving by not displaying info. on the screen.

sr1sieve: This is the best program to use to sieve one candidate and is far faster than anything else for that purpose. You do need to use srsieve to sieve up to at least the value of k or the base first but I think the creator recommends something greater than P=1G. When running srsieve first, be sure and use the -g paramater to create the correctly formatted sieved file. I personally sieve to P=250M or 500M and then let sr1sieve have at it. To run sr1sieve, go to the command prompt and try something like "sr1sieve -P 500e6 -i (input file) -o (output file). See the instructions for additional details.

sr2sieve: This one is a little tricky but it is by far the fastest for multi-k sieving anywhere from 3 k's and up. I will just tell you the steps and not how to do them:

(1) Use srsieve to sieve up to about P=1G. Force it to create an 'ABCD' output file using the -a paramater.

(2) Run sr2sieve using the file in (1) as input. You'll need to specify a P= paramater that tells it how far to sieve. It knows by a value in the input file where p-value to start at. The command might be something like "sr2sieve -P 500e9 -i (ABCD-input file). Sr2sieve will not remove prime-search candidates, it will only write factors into a file called factors.txt so one more step is needed.

(3) Run srfile with the commnd "srfile -G -k factors.txt (ABCD-input file from #1). This will cause it to remove all factors found by #2 and write out a file sorted by n that LLR and PFGW can do primality tests on. You're now ready to do primality tests on it.


Any questions...just ask. There is a lot of info. in the various README and other help and doc files for the programs, especially for the sr(n)sieve programs.


Gary

gd_barnes 2007-12-15 09:54

Guidelines on doing searches
 
Below are the suggested guidelines for doing a prime-search effort for the conjectures. All instructions here are the fastest known ways that I am aware of but some of you may not want to take extra steps for speed.


Sieving:

1. If you are sieving more than one k for n > 2500:
a. Run srsieve with the -a parameter up to P=100M.
b. Run sr2sieve up to an appropriate value.
c. Run srfile with the -G (sorted by n) or -g (sorted by k) parameter to remove factors and create input for LLR or PFGW.

2. If you are sieving 1 or 2 k's for n > 2500:
a. Run srsieve with the -g paramater up to P=100M.
b. Run 1 or 2 instances of sr1sieve up to an appropriate value (1 instance for each k).

3. If you are searching any # of k's for n <= 2500, no sieving is needed. A PFGW script using trial factoring is by far the fastest way to go. If you are testing a new base or a new k-range for a previously searched base, see important notes about starting a new base below.

Primality testing:

1. For bases that are powers of 2:
a. Run LLR with the sieve file as input and a file name of prime.txt as output.
b. Two files will be created: prime.txt and lresults.txt. Check for and post any primes found and send me the results file.

2. For bases that are not powers of 2:
a. Run PFGW with the sieve file as input using the -f0 and -l switches in order to do PRP tests on the entire range of n. 2 or 3 files will be created: Primes will be in pfgw-prime.log, probable primes (PRP's) will be in pfgw.log, and the results will be in pfgw.out. IMPORTANT: If you have to stop PFGW in the middle of testing, it will not remember k's that it has found primes for and will begin searching them again when you restart. See instructions in the next post under #2 (referencing running LLR) for running srfile to remove k's with primes before restarting.
b. Run PFGW to prove primality of the pfgw.log output from a. using the -f0 switch and (-t switch for the Sierp side -OR- -tp switch for the Riesel side). Once all have been proven, as with LLR, please post primes found and send me the results file.
[See important notes below if starting a new k-range or starting a new base. You'll need to use the PFGW script for new bases as instead of a sieve file as input to PFGW.]


Below are IMPORTANT notes on starting from scratch on a NEW BASE. Even with the automated script, if you're new to CRUS, I'd suggest getting with me or one of our regular searchers first. Some of the exceptions can get quite tricky.

1. As shown in the 1st post here, please use the link to the script for starting new bases as input to PFGW.

2. Review the web pages for algebraic factors such as squared k's on Riesels or cubed k's on Riesels and Sierpinski's for removal at the end of the search. Worse than searching for a multiple of the base that might be a duplicate effort would be to search a k that was proven composite for all n without realizing it ahead of time.

3. If you have to stop PFGW in the middle of the search and have to restart it, it will not remember where it left off (because it is running a script). A change to the min_k in the script will be needed before restarting.

4. Please send me the pl_MOB, pl_prime, and pl_remain output files from the new bases script. A results file is not necessary. Also, if it is an even Sierp base, please send me the pl_GFN file. If any of the files would be too large, let me know. For large-conjectured bases such as 3, 7, and 15, I will probably suggest just sending primes for n>1000 while running primes up to n=1000 myself because the files are too large to send around. For ultimate proof in the mathematical world, we'll need a central repository of the primes found for each k. I'll post an Email later on to send them to.

Good luck and may the prime-searching God's be with us all! :smile:


Gary

gd_barnes 2007-12-16 06:33

Additional info. on searches
 
Here are some more particulars on the searches now:

-- 1 --

If starting a new base, if you're not using the deterministic parameters of -t or -tp for PFGW (meaning that it is proving all primes as it goes), then it will write out two separate files. They are called pfgw.log and pfgw-prime.log. pfgw.log is the PRP's (probable primes) and pfgw-prime.log is the proven primes. Even if the deterministic parameters are not set on, PFGW can still prove small primes because with the -f100 paramater set on, it automatically attempts factoring up to a certain limit, depending on the size of the number being searched.

There is an important difference between these two files: You still need to prove the primes in the pfgw.log file so after running the new base, do the following to prove the PRP's that are in the pfgw.log file prime:

1. Rename the pfgw.log files and pfgw.out files to something of your choosing. pfgw.out is the results file. I like to call them 'prime-sierp-base16.txt' and 'results-sierp-base16.txt' for Base 16 Sierp so I know exactly what they are if I look at them 6 months from now.

2. For Sierpinski PRP's, run PFGW again using the -f0, -t, and -l parameters with your renamed pfgw.log file from #1 as input to it and that has the PRP's in it. The command is "PFGW (file name from #1) -f0 -t -l". For Riesel PRP's, just change the -t parameter to -tp.

This primality proving step is the same thing you need to do if you are running LLR for bases other than 4 or 16 or if you're running PFGW on any search without the -t or -tp parameters originally.

Clearly, you can avoid all of this hassle of proving primes by using PFGW with the -t or -tp and the -f0 parameters set on for ALL searches in this effort. But your searches will be slower. To me, the extra hoops to do this is worth saving the extra CPU cycles. But more importantly to me, it helped me learn the process of what the software programs do.


-- 2 --

When running LLR to search for primes, there is no way to make it stop searching k's when primes are found like PFGW can. Once again like in #1, you can choose to run PFGW for all of your searches. This may be more palatable for some people. The script that I showed in the the first post of this thread contains the parameter to make PFGW stop searching a k when a prime is found for it.

If you choose to run LLR, you will probably want to manually eliminate k's from your sieved file from time to time to avoid a lot of duplicate testing.

For those of you haven't used the srfile software, this is where it comes in very handy. Srfile will eliminate specific sequences (k's) from a sieved file. What you'll need to do is copy your sieved file into the same directory as your srfile software. Then go to the command prompt and for each k where a prime was found, type the following command:
srfile -G -d "1234*56^n+1" sieve-input.txt -o sieve-output.txt".

Obviously the form is the k and base that you want to delete. It will now remove all n's for the particular k that you specified. Now do the same thing for each k that you want to remove but be sure and use the sieve-output.txt as input for the 2nd run with sieve-output2.txt as output, etc. You'll then need to stop LLR, copy in your new sieved file, determine what line is in the new file to start it at, key that line into the LLR menu and continue seaching where you left off.

Because of the hassle involved with this, it is highly recommended that PFGW be used for all bases that are not powers of 2. For bases that are powers of 2, the CPU time savings is likely worth the added hassle of having to occassionaly manually remove k's from time to time.

In a nutshell for general prime searching after doing your sieving or on an already sieved file, you can choose to run LLR or PFGW for any base but below is the fastest currently known methods for doing so:

For minimum hassle on all bases and the fastest for bases that are NOT a power of 2:

1. Change the first line of the sieved file, i.e. the "XXXXXXXX:1:P:24:257" line to "ABC $a*24^$b+1 // {number_primes,$a,1}". Do not change the $a and $b variables. The only thing that will vary will be the base (24 in this case) and obviously the plus sign will change to a minus if searching Riesel's. In effect, your sieved file will 'contain' your script for input to PFGW at the beginning of it.

2. Run PFGW with the -f0, -t (Sierp) or -tp (Riesel), and -l paramaters at the command line. IMPORTANT NOTE: The -l is a small case -L, not a big case -(eye). I can't remember if these are case-specific for PFGW but they are for the sr(n)sieve series of programs.


That is it. The pfgw-prime.log file will contain primes and the pfgw.out file will be your results file.


For a little more hassle on all bases but the fastest for bases that ARE powers of 2:

1. Run LLR with your sieved file as input. No changes to the file or special parameters are needed.

2. Every few hours/days/primes, check the output for primes. If there's 3-5 of them or more (can vary, if at a high n, I'd to it for every prime, if many around n=5K than maybe 10-15) stop LLR and run your sieve file through srfile to eliminate k's where primes have been found. Keep in mind that the primes file may have more than one prime for a k.

3. Restart LLR with the sieved file that has the eliminated k's. IMPORTANT...be sure and change the input line #. Otherwise it will start LLRing much later in the file and you'll miss searching many candidates.

4. Repeat #2 and #3 as many times as needed until LLR is done.

5. If running a base that is not a power of 2, use the output PRP (probable primes) file as input to PFGW to do the proof (determinstic) test with the -t or -tp parameters as in step #2 for PFGW above.


There you have it...two ways to do most of the searches for this effort.


Gary

mdettweiler 2007-12-16 21:13

[quote=gd_barnes;120751]This thread is for software downloads and instructions as well as a forum for any related questions on how to run software related to the effort.

Here is a link to all of the latest software that should be needed: [URL]http://gbarnes017.googlepages.com/conjectureprogs.zip[/URL]. The programs are LLR, NewPGen, PFGW, Sr1sieve, Sr2sieve, Srfile, and Srsieve.
...[/quote]
I noticed that the LLR version included in the archive is a little old--it's 3.7.0, whereas the newest version is 3.7.1c, available [URL="http://www.mersenne.org/gimps/llr371c.zip"]here[/URL] for Windows and [URL="http://www.mersenne.org/gimps/llr371clinux.zip"]here[/URL] for Linux. There weren't any major changes, at least for the types of numbers we're working with, between 3.7.1b and 3.7.1c, so if anyone's still using 3.7.1b, they don't have to upgrade (i.e. it's not like they'll get a speed bonus by doing so). However, I don't know if there were any differences in speed between 3.7.0 and 3.7.1b, so to play it safe I'd go with 3.7.1b or later.

I'm glad you included NewPGen in the archive, though, as for quite a while the download link on the Prime Pages web site has been broken. I got my copy from another forum member attached to a message. :smile:

Everything else in the archive seems up to date, though. :tu:

You might want to make a version of the archive for Linux, also. I'd be glad to put it together for you if you want (I've already got the latest versions of most of the programs listed in there downloaded). The only one I'd be missing would be NewPGen, for which the Linux download link is broken too. (The zip file appears to download OK, but then when you try to open it it turns out to be not a zip file--maybe it was an HTML error page saved as the zip file by accident.) If anyone has a Linux copy of NewPGen sitting around, please PM me and I'll give you my email address so you can send it to me.

gd_barnes 2007-12-17 03:48

[quote=Anonymous;120879]I noticed that the LLR version included in the archive is a little old--it's 3.7.0, whereas the newest version is 3.7.1c, available [URL="http://www.mersenne.org/gimps/llr371c.zip"]here[/URL] for Windows and [URL="http://www.mersenne.org/gimps/llr371clinux.zip"]here[/URL] for Linux. There weren't any major changes, at least for the types of numbers we're working with, between 3.7.1b and 3.7.1c, so if anyone's still using 3.7.1b, they don't have to upgrade (i.e. it's not like they'll get a speed bonus by doing so). However, I don't know if there were any differences in speed between 3.7.0 and 3.7.1b, so to play it safe I'd go with 3.7.1b or later.

I'm glad you included NewPGen in the archive, though, as for quite a while the download link on the Prime Pages web site has been broken. I got my copy from another forum member attached to a message. :smile:

Everything else in the archive seems up to date, though. :tu:

You might want to make a version of the archive for Linux, also. I'd be glad to put it together for you if you want (I've already got the latest versions of most of the programs listed in there downloaded). The only one I'd be missing would be NewPGen, for which the Linux download link is broken too. (The zip file appears to download OK, but then when you try to open it it turns out to be not a zip file--maybe it was an HTML error page saved as the zip file by accident.) If anyone has a Linux copy of NewPGen sitting around, please PM me and I'll give you my email address so you can send it to me.[/quote]


Oops, my bad on LLR. I downloaded all new versions of everything and put them on most of my machines before posting but I thought I had the latest version of LLR already and didn't check for a new one. Thanks for catching that!

So if anyone reads this, use Anon's version of LLR instead of the one I included in the link at the top of this thread.

That would be great if you could put up link(s) to the Linux versions of the programs. I'm not familiar with Linux and so had completely forgotten there are two different versions of everything.

Thanks!


Gary

axn 2007-12-17 03:57

AFAIK, there has been no speed improvement to LLR (re: base 2) since 3.6. So it doesn't really matter if you don't have the latest-and-greatest version.

mdettweiler 2007-12-17 04:37

[quote=axn1;120893]AFAIK, there has been no speed improvement to LLR (re: base 2) since 3.6. So it doesn't really matter if you don't have the latest-and-greatest version.[/quote]
I didn't know for sure, I just figured I'd play it safe. Thanks for letting us know, though. :smile:

mdettweiler 2007-12-17 04:43

[quote=gd_barnes;120892]...
That would be great if you could put up link(s) to the Linux versions of the programs. I'm not familiar with Linux and so had completely forgotten there are two different versions of everything.
...
[/quote]
I have everything I need to put it together into an archive right now, except for NewPGen. I've already got the Windows version of NewPGen (I'm on a dual-boot system, XP and Ubuntu, though I'm using Ubuntu mostly now) [URL="http://www.mersenneforum.org/showpost.php?p=119396&postcount=20"]thanks to axn1[/URL], but I still don't have the Linux version yet. Anyone out there got it? Please PM me and I'll send you my email so you can mail it to me. (Or, even better, just zip it up--or, if you rather, make it into a tarball [the Unix/Linux equivalent of a .zip file for those who don't know]--and attach it to a post here so anyone can grab it.) :smile:

Edit: I forgot to mention that I don't have PFGW either. Does anyone know where to get it?

axn 2007-12-17 05:07

You are unable to download the linux version from [URL="http://primes.utm.edu/programs/NewPGen/"]here[/URL]? Then post here, and I'll repeat the procedure :)

You can download PFGW from primeform yahoo group, but first you must join up (easy to do if you have a yahoo mail id). The you can download the Windows or linux version from the "Files" section there. [URL="http://tech.groups.yahoo.com/group/primeform/"]The group[/URL]

mdettweiler 2007-12-17 05:15

[quote=axn1;120903]You are unable to download the linux version from [URL="http://primes.utm.edu/programs/NewPGen/"]here[/URL]? Then post here, and I'll repeat the procedure :)[/quote]
Oh, I guess it worked this time. :smile: The link must have been fixed since I last checked. I should have checked again before saying that it was still down. :blush:
[quote]You can download PFGW from primeform yahoo group, but first you must join up (easy to do if you have a yahoo mail id). The you can download the Windows or linux version from the "Files" section there. [URL="http://tech.groups.yahoo.com/group/primeform/"]The group[/URL][/quote]I don't have a Yahoo account, maybe it would be easier for someone to simply email me their copy (if it's not too much of a bother)?

Edit: I wonder why one of the higher ranked members of that group doesn't just use the free Geocities web space that comes with every Yahoo account (if they're part of the group, they obviously already have one) and post it there so that people don't have to join the group to get the program?

gd_barnes 2007-12-22 00:40

I have updated the zipped file of software at the top of this thread to include the latest Window's version of LLR.

It appears there was no change between version 3.7.0 that I had and version and 3.7.1b that I just now downloaded, which is why I thought I already had the latest version. The date was the same, the size was the same, and it still says version 3.7.0 in the program help. But the llrguide and readme files now show version 3.7.1.

Jean or anyone, can you let me know that [URL="http://pagesperso-orange.fr/jean.penne/index2.html"]this link[/URL] under category "LLR Version 3.7.1b for MS Windows" is the correct place to get the latest Windows version of LLR?


Thanks,
Gary


All times are UTC. The time now is 05:37.

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