mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2003-11-15, 01:08   #1
GP2
 
GP2's Avatar
 
Sep 2003

2·5·7·37 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:

-------------------------------
Code:
#!/usr/bin/perl

$file = shift || die;

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

read(FILE,$temp,6);

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

print "$type $counter\n";

close (FILE);
-------------------------------

Call it read_checkpoint.pl and give the name of the checkpoint file as the only argument:

read_checkpoint.pl 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
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Source file could not be read MacMcF Information & Answers 6 2012-02-18 02:42
Perl scripts for result file conversion nuggetprime No Prime Left Behind 5 2009-01-02 19:44
Iterations between results file output? edorajh Software 8 2003-11-20 02:28
A bit of Perl code to read a checkpoint file and tell how many iterations it's at GP2 Data 0 2003-11-15 01:07
chance of finding a factor?......Read me read me read me :) Firedog18 Software 9 2003-07-25 17:10

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

Sun May 16 11:47:25 UTC 2021 up 38 days, 6:28, 0 users, load averages: 1.36, 1.38, 1.39

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.