mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2021-09-09, 08:29   #1
Cybertronic
 
Cybertronic's Avatar
 
Jan 2007
Germany

2×191 Posts
Default MISSING A FEATURE IN PFGW

Hello PFGW programmers !


Is it possible to create a special PFGW for me ?
I need a feature, that PFGW write only numbers in pfgw.log, if ALL conditions are 3-PRP !
Example:
ABC $a+0 & $a+2 & $a+6 & $a+12 & $a+14 & $a+20 & $a+24 & $a+26
281809744377742937
280807944730632017
276808166894198957

....

pfgw.log Output-File

276808166894198957
I need it so urgent :-)
regards
Norman
Cybertronic is offline   Reply With Quote
Old 2021-09-09, 11:39   #2
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3·1,291 Posts
Default

That syntax would clash with:

Quote:
you can also search for an expression only if all the previous expressions
were prime (again a chain of up to 20 expressions (now 250 expressions) may be tested):

ABC $a*$b^$c+1 & $a*$b^$c-1
1 2 5000
1079 2 4567
2842 3 3210
612 2 4321
48207 2 400
You could always write a GMP program to do this, or even PARI/GP
paulunderwood is offline   Reply With Quote
Old 2021-09-09, 11:59   #3
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

32×52×13 Posts
Default

Use awk (gawk for WIN):

create file list.awk with code:
Code:
BEGIN {line=$0}
{
  if (index($0,"Complete Set"))
      print substr(line,1,index(line,"+")-1)
  line=$0
}
and call this with
Code:
gawk -f list.awk pfgw.out
processing the PFGW output file with this script.

Your example will output only one line with 276808166894198957.

PS: For redirecting the output call
Code:
gawk -f list.awk pfgw.out >out.txt
in a separate file.

Last fiddled with by kar_bon on 2021-09-09 at 12:01 Reason: redirect
kar_bon is offline   Reply With Quote
Old 2021-09-09, 12:27   #4
Cybertronic
 
Cybertronic's Avatar
 
Jan 2007
Germany

2×191 Posts
Default

@kar_bon
This is what I do, but PFGW should be only write a minimum to pfgw.log...only $a's for passing all conditions.


(Also das mache ich ja , aber PFGW schreibt zu viel bei kleinen Zahlen auf die Festplatte, soll aber nur dann in die pfgw.log schreiben, wenn alle Bedingungen erf├╝llt sind.)
Cybertronic is offline   Reply With Quote
Old 2021-09-09, 14:19   #5
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

31×191 Posts
Default

This would be a nice feature but far from necessary as there are workarounds. If I recall correctly the code implementing this sort of thing is a mess in PFGW and rogue has avoided playing with it much.


I personally just grep for the last form. If you wanted to avoid the large output you could write a pfgw script.

Last fiddled with by rogue on 2021-09-09 at 15:22
henryzz is offline   Reply With Quote
Old 2021-09-09, 15:25   #6
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·3,217 Posts
Default

The pfgw code is messy. It uses (and abuses) many C++ features. My intent is to rewrite it in the future so that it is easier for me to support. Whether or not I ever get around to it is a separate question as it will require a lot of planning.
rogue is online now   Reply With Quote
Old 2021-09-09, 16:15   #7
Cybertronic
 
Cybertronic's Avatar
 
Jan 2007
Germany

2×191 Posts
Default

Can I hope for it ?


Maybe with "pfgw64 -N -f0 -oac input.txt" or so. oac = only all conditions
Cybertronic is offline   Reply With Quote
Old 2021-09-09, 17:18   #8
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

144428 Posts
Default

Quote:
Originally Posted by Cybertronic View Post
Can I hope for it ?


Maybe with "pfgw64 -N -f0 -oac input.txt" or so. oac = only all conditions
Not in the near future.
rogue is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Am I missing something Youjaes Forum Feedback 18 2021-03-04 14:21
Missing top 10? R.D. Silverman GMP-ECM 3 2011-03-18 21:35
PFGW 3.3.6 or PFGW 3.4.2 Please update now! Joe O Sierpinski/Riesel Base 5 5 2010-09-30 14:07
Missing from Stats? ColdFury NFSNET Discussion 1 2005-02-18 09:27
missing? tha Data 6 2003-09-14 21:36

All times are UTC. The time now is 02:32.


Mon Oct 25 02:32:09 UTC 2021 up 93 days, 21:01, 0 users, load averages: 1.45, 1.37, 1.42

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.