[Avida-SVN] r1963 - branches/uml/source/main
hjg at myxo.css.msu.edu
hjg at myxo.css.msu.edu
Sun Aug 19 21:11:13 PDT 2007
Author: hjg
Date: 2007-08-20 00:11:13 -0400 (Mon, 20 Aug 2007)
New Revision: 1963
Modified:
branches/uml/source/main/cTaskLib.cc
Log:
Added the -a option for pan back in.
Modified: branches/uml/source/main/cTaskLib.cc
===================================================================
--- branches/uml/source/main/cTaskLib.cc 2007-08-19 19:06:00 UTC (rev 1962)
+++ branches/uml/source/main/cTaskLib.cc 2007-08-20 04:11:13 UTC (rev 1963)
@@ -3089,8 +3089,7 @@
if(system(cmd.c_str())!=0) return 0.0;
if(system("/usr/bin/gcc -DMEMLIM=512 pan.c -o pan &> /dev/null")!=0) return 0.0;
-// if(system("./pan -a &> ./pan.out")!=0) return 0.0;
- if(system("./pan &> ./pan.out")!=0) return 0.0;
+ if(system("./pan -a &> ./pan.out")!=0) return 0.0;
if(system("cat pan.out | perl -e 'while(<STDIN>) { if(/errors:\\s(\\d+)/) {exit($1);}}'")!=0) return 0.0;
// if(system("cat pan.out | perl -e 'while(<STDIN>) { if(/unreached/) {exit(1);}}'")!=0) return 0.2;
@@ -3105,7 +3104,7 @@
}
double cTaskLib::SpinWitnessCoprocess(cTaskContext& ctx, const std::string& neverclaimFile) const {
-// int num_witness = 0;
+ int num_witness = 0;
// const int max_witness = 1;
std::string cmd = "cp tmp.pr tmp-witness.pr" ;
@@ -3115,12 +3114,11 @@
if(system(cmd.c_str())!=0) return 0.0;
if(system("/usr/bin/gcc -DMEMLIM=512 pan.c -o pan &> /dev/null")!=0) return 0.0;
-// Eliminated -a option on 8/16/ it was causing weird errors.
-// if(system("./pan -e -n -a -w19 -m100000 -c1 &> ./pan.out")!=0) return 0.0;
- if(system("./pan -e -n -w19 -m100000 -c1 &> ./pan.out")!=0) return 0.0;
-// num_witness = (system("cat pan.out | perl -e 'while(<STDIN>) { if(/errors:\\s(\\d+)/) {exit($1);}}'"));
+ if(system("./pan -e -n -a -w19 -m100000 -c1 &> ./pan.out")!=0) return 0.0;
+ num_witness = (system("cat pan.out | perl -e 'while(<STDIN>) { if(/errors:\\s(\\d+)/) {exit($1);}}'"));
- return !(system("cat pan.out | perl -e 'while(<STDIN>) { if(/errors:\\s(\\d+)/) {exit($1);}}'"));
+ return num_witness;
+ //(system("cat pan.out | perl -e 'while(<STDIN>) { if(/errors:\\s(\\d+)/) {exit($1);}}'"));
}
double cTaskLib::Task_SpinN1(cTaskContext& ctx) const {
More information about the Avida-cvs
mailing list