Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r931 - trunk/fox/afr_demo/StandAlone
- Date: Sat, 11 Feb 2006 16:00:44 -0700 (MST)
Author: abe
Date: Sat Feb 11 16:00:42 2006
New Revision: 931
Added:
trunk/fox/afr_demo/StandAlone/afr_bench.sh (contents, props changed)
Modified:
trunk/fox/afr_demo/StandAlone/combinestats.cpp
Log:
Added afr benchmark sh script.
AM fox/afr_demo/StandAlone/afr_bench.sh
Added afr performance output analysis program
M fox/afr_demo/StandAlone/combinestats.cpp
Added: trunk/fox/afr_demo/StandAlone/afr_bench.sh
==============================================================================
--- (empty file)
+++ trunk/fox/afr_demo/StandAlone/afr_bench.sh Sat Feb 11 16:00:42 2006
@@ -0,0 +1,96 @@
+#!/bin/sh
+
+# AFR Performance benchmark script.
+
+v3c1_file=$1;
+path_file=$2;
+
+combine_stats=bin/combinestats
+afr=bin/afr
+
+if ! test $# -eq 2
+then
+ echo "Incorrect number of args $#"
+ echo "Usage: $0 <v3c1_file> <path_file>"
+ echo "v3c1 file and path missing"
+ exit
+fi
+
+if ! test -f $v3c1_file
+then
+ echo "Usage: $0 <v3c1_file> <path_file>"
+ echo "v3c1 file missing"
+ exit
+fi
+
+if ! test -f $path_file
+then
+ echo "Usage: $0 <v3c1_file> <path_file>"
+ echo "path file missing"
+ exit
+fi
+
+echo "Using $v3c1_file and $path_file"
+
+for np in 12
+do
+ groups=`expr $np / 4`
+ if [ $groups -eq "0" ]
+ then
+ groups=1
+ fi
+ echo
"--------------------------------------------------------------------------"
+ echo "Running: np=$np groups=$groups..."
+ # Form the command..
+ echo "$afr \
+ -np $np \
+ -imagetraverser \"gstafrnew(-exempt -stats -groups $groups)\" \
+ -scene \"lib/libscene_boeing777.so( -file $v3c1_file -np $np )\" \
+ -camera \"pinhole( -eye -3.856720 -16.749600 4.031050 \
+ -lookat -3.761141 -15.755978 4.090879 \
+ -up 0.000000 0.000000 1.00000 -fov 60 )\" \
+ -ui \"camerapath( -file $path_file -behavior exit -sync 1 -quiet )\"
\
+ -imagedisplay null"
+
+
+ $afr \
+ -np $np \
+ -imagetraverser "gstafrnew(-exempt -stats -groups $groups)" \
+ -scene "lib/libscene_boeing777.so( -file $v3c1_file -np $np )" \
+ -camera "pinhole( -eye -3.856720 -16.749600 4.031050 \
+ -lookat -3.761141 -15.755978 4.090879 \
+ -up 0.000000 0.000000 1.00000 -fov 60 )" \
+ -ui "camerapath( -file $path_file -behavior exit -sync 1 -quiet )" \
+ -imagedisplay null
+
+
+
+ # Run the command.
+
+ command_exit=$?
+ if ! test $command_exit -eq 140
+ then
+ echo "RENDER COMMAND EXITED $command_exit Terminating"
+ exit
+ fi
+
+ # Run combine stats.
+ echo "Combine Stats..."
+ statspath=defender_gstnew_$np
+
+ echo "Creating directory $statspath"
+ mkdir $statspath
+ mv gstnew_stats* $statspath
+ $combine_stats $np $statspath/gstnew_stats
+
+ command_exit=$?
+ if test ! $command_exit -eq 0
+ then
+ echo "COMBINE STATS COMMAND EXITED $command_exit Terminating"
+ exit
+ fi
+
+ mv $statspath/gstnew_stats_combined.txt
$statspath/gstnew_combined-np$np.txt
+ echo "Copied to $statspath/gstnew_stats_combined-np$np.txt"
+done
+
Modified: trunk/fox/afr_demo/StandAlone/combinestats.cpp
==============================================================================
--- trunk/fox/afr_demo/StandAlone/combinestats.cpp (original)
+++ trunk/fox/afr_demo/StandAlone/combinestats.cpp Sat Feb 11 16:00:42
2006
@@ -10,7 +10,7 @@
if(argc!=3)
{
cout << "syntax: combinestats <numfiles> <prefix> " << endl;
- return 0;
+ return 1;
}
int numFiles = atoi(argv[1]);
cout << "number of files = " << numFiles << endl;
@@ -23,7 +23,7 @@
if((fp[i]=fopen(fname,"r"))==NULL)
{
cout << "error: cant open file for reading: " << fname << endl;
- return 0;
+ return 1;
}
}
sprintf(fname,"%s_combined.txt",argv[2]);
@@ -80,7 +80,7 @@
// check for done condition
cout << "done combining" << endl;
fclose(op);
- return 1;
+ return 0;
}
currenttime += temptime;
}
- [MANTA] r931 - trunk/fox/afr_demo/StandAlone, abe, 02/11/2006
Archive powered by MHonArc 2.6.16.