Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphikoehn <pkoehn@inf.ed.ac.uk>2012-04-13 01:07:26 +0400
committerphikoehn <pkoehn@inf.ed.ac.uk>2012-04-13 01:07:26 +0400
commit1a6e8dc6fd850e182aba67a03aa833aa7d65a9ba (patch)
tree169d5d3e4d37eb9c164a4c01d5aeca40630637e6 /scripts/ems
parentf80aefa8e9a3ad0590a634b9b30dbb5aec14454d (diff)
bug fix
Diffstat (limited to 'scripts/ems')
-rwxr-xr-xscripts/ems/experiment.perl3
-rwxr-xr-xscripts/ems/fix-info.perl33
2 files changed, 33 insertions, 3 deletions
diff --git a/scripts/ems/experiment.perl b/scripts/ems/experiment.perl
index d2fc484d4..5e62c0c28 100755
--- a/scripts/ems/experiment.perl
+++ b/scripts/ems/experiment.perl
@@ -5,7 +5,6 @@
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($Bin);
-$SIG{CHLD} = "IGNORE"; # no zombies
my $host = `hostname`; chop($host);
print STDERR "STARTING UP AS PROCESS $$ ON $host AT ".`date`;
@@ -125,9 +124,7 @@ sub init_agenda_graph() {
."showpage\n";
close(PS);
- $SIG{CHLD} = undef;
`convert -alpha off $graph_file.ps $graph_file.png`;
- $SIG{CHLD} = "IGNORE"; # no zombies
if (!$NO_GRAPH && !fork) {
# use ghostview by default, it it is installed
diff --git a/scripts/ems/fix-info.perl b/scripts/ems/fix-info.perl
new file mode 100755
index 000000000..924a1a990
--- /dev/null
+++ b/scripts/ems/fix-info.perl
@@ -0,0 +1,33 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+my ($file,$step) = @ARGV;
+$step = "*" unless defined($step);
+
+die("fix-info.perl file [step]") unless defined($file);
+die("file not found") unless -e $file;
+die("full path!") unless $file =~ /^\//;
+my @filestat = stat($file);
+my $newtime = $filestat[9];
+
+open(LS,"ls steps/$step/*INFO|") || die;
+while(my $info = <LS>) {
+ chop($info);
+ my @INFO = `cat $info`;
+ my $changed = 0;
+ foreach (@INFO) {
+ if (/$file .*\[/) {
+ $changed++;
+ s/($file) (.*\[)\d+/$1 $2$newtime/g;
+ }
+ }
+ if ($changed) {
+ print "updating $info\n";
+ open(INFO,">$info");
+ foreach (@INFO) { print INFO $_; }
+ close(INFO);
+ }
+}
+close(LS);
+