View Single Post
Old 2003-11-15, 01:08   #1
GP2's Avatar
Sep 2003

50328 Posts
Default A bit of Perl code to read a checkpoint file and tell how many iterations it's at

Prime95 saves checkpoint files (usually named p.... and q.... for LL testing).

The following Perl code prints out how many iterations the checkpointed file is at:


$file = shift || die;

open (FILE,"<$file") || die;


($type, $counter) = unpack("sL",$temp);

print "$type $counter\n";

close (FILE);

Call it and give the name of the checkpoint file as the only argument: pA655011

I'm not the author; I don't know who is. I grabbed this code from the Mersenne mailing list quite some time ago.
GP2 is offline   Reply With Quote