![]() |
|
|
#34 | |
|
A Sunny Moo
Aug 2007
USA (GMT-5)
3×2,083 Posts |
Quote:
When I eventually get around to cleaning up my results-processing suite and integrating it into one software package for public release, I'll probably end up re-doing much of it.
Last fiddled with by mdettweiler on 2010-03-21 at 22:42 |
|
|
|
|
|
|
#35 |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17×251 Posts |
It's not in an entirely finished state (only works right with purely composite results; a prime will probably have a composite-like output but with PRIME as the residue), but here's a script I wrote to recreate (as best as possible with drawing only from the CandidateTest table; the only thing wrong is that the timestamps show the reservation date, not the finishing date) the completed_tests.log file from the DB. To use it, first export the wanted results (an example SQL query is given that does it for all results in the DB, but you might want to add other limitations e.g. "candidatename like '%*192^%'") to a tab-separated file (MySQL's default) containing, in this order:
CandidateName,TestID,PRPingProgram,Residue,EmailID,UserID,ClientID Then, assuming the script is saved as recover-results.pl and the DB data is in DB-out.txt and you want the output in completed_tests.log, run this: Code:
perl recover-results.pl DB-out.txt > completed_tests.log Code:
# select CandidateName,TestID,PRPingProgram,Residue,EmailID,UserID,ClientID
# from CandidateTest where residue != 'null' order by TestID into outfile 'completed_tests.log';
use POSIX qw(strftime);
while (<>) {
chomp;
($num, $timestamp, $prog, $res, $email, $user, $client) = split(/\t/);
@time = gmtime($timestamp);
$timestr = strftime("%Y-%m-%d %H:%M:%S", @time);
print "[$timestr GMT] $num received by Email: $email User: $user Client: $client Program: $prog Residue: $res \n";
}
Last fiddled with by Mini-Geek on 2010-04-11 at 14:25 |
|
|
|
|
|
#36 | |
|
"Mark"
Apr 2003
Between here and the
24·397 Posts |
Quote:
|
|
|
|
|
|
|
#37 |
|
Nov 2008
2×33×43 Posts |
There is a bug in remove_ks.pl: when the prime file is large, egrep gives the error "Regular expression too big", and the script then wipes the sieve file and the file with ks remaining. This has caused me a big problem on Riesel base 51 because I didn't back up the file of ks remaining. The effort to solve that problem is being "coordinated" in the Bases 33-100 thread.
|
|
|
|
|
|
#38 | |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
10000101010112 Posts |
http://www.mersenneforum.org/showthr...311#post233311
Quote:
|
|
|
|
|
|
|
#39 | |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
10AB16 Posts |
Quote:
http://www.mersenneforum.org/showthr...690#post248690 And the script here (also linked up there): http://www.mersenneforum.org/showthr...045#post209045 Last fiddled with by Mini-Geek on 2011-01-23 at 17:05 |
|
|
|
|
|
|
#40 | |
|
Jun 2009
68410 Posts |
Quote:
Thanks! EDIT: is this made for linux? /usr/bin/perl does not sound like windows. EDIT2: srsieve gives warnings for algebraic factors for k=324, 900, 1296, 4356, 5184, 5776, 9409, 11449, 14884. Does that mean I should remove these k's from the sieve file? Last fiddled with by Puzzle-Peter on 2011-01-23 at 17:21 |
|
|
|
|
|
|
#41 | ||
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17·251 Posts |
Quote:
Quote:
Last fiddled with by Mini-Geek on 2011-01-23 at 18:39 |
||
|
|
|
|
|
#42 |
|
Jun 2009
22·32·19 Posts |
I downloaded and installed strawberryperl for windows. I try to start the script with
hiddenPowers.pl pl_remain.txt sr_228.pfgw and I get Use of uninitialized value in open at C:\...\hiddenPowers.pl line 8 readline() on closed filehandle IN at C:\...\hiddenPowers.pl line 11 What's wrong? |
|
|
|
|
|
#43 | |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17·251 Posts |
Quote:
If a solution isn't apparent soon, you can just ignore it like gd_barnes said, since it doesn't make a huge difference, especially when working with small numbers. Last fiddled with by Mini-Geek on 2011-01-23 at 20:00 |
|
|
|
|
|
|
#44 | |
|
Jun 2009
22·32·19 Posts |
Quote:
My perl version is 5.12.2.0 and I'm running WinXP 32bit. EDIT: I just changed the second and third code line to open(IN, "pl_remain.txt"); $file = "sr_228.pfgw"; and it started working, but every output line telling me which k is worked on is followed by "Removed 0 line(s)" and two "Syntax error" messages. Is abc a valid format for the script? I tried switching to NewPGen format using srfile -g, but I ended up with one file for each k... |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scripts thread | bsquared | YAFU | 4 | 2012-10-21 19:45 |
| Escape sequences in bash scripts? | CRGreathouse | Software | 16 | 2009-03-26 08:42 |
| Perl scripts for result file conversion | nuggetprime | No Prime Left Behind | 5 | 2009-01-02 19:44 |
| Tracking GIMPS progress with scripts | jasong | jasong | 21 | 2008-03-25 00:47 |
| DPGraph 2D/3D scripts | nibble4bits | Lounge | 0 | 2008-01-16 17:05 |