[Swift-commit] r5586 - SwiftApps/SciColSim

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Sat Feb 11 13:11:50 CST 2012


Author: ketan
Date: 2012-02-11 13:11:50 -0600 (Sat, 11 Feb 2012)
New Revision: 5586

Added:
   SwiftApps/SciColSim/extract4plots
   SwiftApps/SciColSim/plotit
Removed:
   SwiftApps/SciColSim/extract_scs_results
   SwiftApps/SciColSim/plot_active.plt
   SwiftApps/SciColSim/plot_cumulative.plt
   SwiftApps/SciColSim/plot_cumulative_openmp.plt
   SwiftApps/SciColSim/plot_ready.plt
   SwiftApps/SciColSim/plot_scs.plt
   SwiftApps/SciColSim/swiftoutput2plot
Modified:
   SwiftApps/SciColSim/README
Log:
Added plotting scripts and updated readme for plotting

Modified: SwiftApps/SciColSim/README
===================================================================
--- SwiftApps/SciColSim/README	2012-02-11 18:23:16 UTC (rev 5585)
+++ SwiftApps/SciColSim/README	2012-02-11 19:11:50 UTC (rev 5586)
@@ -303,3 +303,14 @@
 # d)        5 repeats (1 per param, serial) of multi_loss:
 # e)          1000 to 10000 annealing_repeats (parallel) == multi_loss
 # f)            evolve()
+
+Plots
+=====
+
+In order to generate plots from the swift stdout/stderr file, do the following
+
+./extract4plots <swift.out>
+gnuplot plotit
+
+gnuplot must be installed and should be in PATH.
+

Added: SwiftApps/SciColSim/extract4plots
===================================================================
--- SwiftApps/SciColSim/extract4plots	                        (rev 0)
+++ SwiftApps/SciColSim/extract4plots	2012-02-11 19:11:50 UTC (rev 5586)
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+#usage: ./swiftoutput2plot <swift.outfile>
+
+SWIFTOUTFILE=$1
+
+#extract start time
+TMPDATE=`grep -i progress $SWIFTOUTFILE | head -n 1 | cut -f4-9 -d ' '`
+START_TIME=`date +%s -d "$TMPDATE"`
+
+#extract end time
+TMPDATE=`grep -i progress $SWIFTOUTFILE | tail -n 1 | cut -f4-9 -d ' '`
+END_TIME=`date +%s -d "$TMPDATE"`
+
+#duration
+DIFFTIME=$((END_TIME - START_TIME))
+
+#extract active runs in a file
+grep -o -i "Active:[0-9]*" $SWIFTOUTFILE | awk -F: '{print $2}' > active.txt
+
+#extract successful completions in a file
+grep -o -i "Successfully:[0-9]*" $SWIFTOUTFILE | awk -F: '{print $2}' > cumulative.txt
+
+#prepare tics
+activelines=`wc -l active.txt | awk '{print $1}'`
+cumulines=`wc -l cumulative.txt | awk '{print $1}'`
+
+activelinespertic=`echo "scale=5 ; $DIFFTIME / $activelines" | bc`
+seq 0 $activelinespertic $DIFFTIME > activetics.txt
+
+cumulinespertic=`echo "scale=5 ; $DIFFTIME / $cumulines" | bc`
+seq 0 $cumulinespertic $DIFFTIME > cumultics.txt
+
+#final plot data
+paste activetics.txt active.txt > plot_active.txt
+paste cumultics.txt cumulative.txt > plot_cumulative.txt
+
+grep  "T =" $SWIFTOUTFILE | awk '{print $6}' | cut -c8- | sed 's/....$//' > T.data
+
+grep multi_annealing $SWIFTOUTFILE | grep "1;30" | awk '{print $3}' | cut -c11- | sed 's/....$//' > anneal.data
+
+grep returning $SWIFTOUTFILE | awk '{print $3, $4, $5, $6}' | sed -e 's/'ci='//' -e 's/'cj='//' -e 's/'r.loss='//' -e 's/'r.sdev='//' | sort -t' ' -k 1,2n > multiloss.txt


Property changes on: SwiftApps/SciColSim/extract4plots
___________________________________________________________________
Added: svn:executable
   + *

Deleted: SwiftApps/SciColSim/extract_scs_results
===================================================================
--- SwiftApps/SciColSim/extract_scs_results	2012-02-11 18:23:16 UTC (rev 5585)
+++ SwiftApps/SciColSim/extract_scs_results	2012-02-11 19:11:50 UTC (rev 5586)
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-OUTFILE=$1
-
-grep  "T =" $OUTFILE | awk '{print $6}' | cut -c8- | sed 's/....$//' > T.data
-
-grep multi_annealing $OUTFILE | grep "1;30" | awk '{print $3}' | cut -c11- | sed 's/....$//' > anneal.data

Deleted: SwiftApps/SciColSim/plot_active.plt
===================================================================
--- SwiftApps/SciColSim/plot_active.plt	2012-02-11 18:23:16 UTC (rev 5585)
+++ SwiftApps/SciColSim/plot_active.plt	2012-02-11 19:11:50 UTC (rev 5586)
@@ -1,7 +0,0 @@
-set terminal png enhanced
-set output "activeplot.png"
-set nokey
-set xlabel "Time in sec"
-set ylabel "number of active jobs"
-set title "Active jobs"
-plot "plot_active.txt" using 1:2 with line

Deleted: SwiftApps/SciColSim/plot_cumulative.plt
===================================================================
--- SwiftApps/SciColSim/plot_cumulative.plt	2012-02-11 18:23:16 UTC (rev 5585)
+++ SwiftApps/SciColSim/plot_cumulative.plt	2012-02-11 19:11:50 UTC (rev 5586)
@@ -1,8 +0,0 @@
-set terminal png enhanced
-#set term postscript eps enhanced 
-set output "cumulativeplot.png"
-set nokey
-set xlabel "Time in seconds"
-set ylabel "number of completed jobs"
-set title "Cumulative jobs"
-plot "plot_cumulative.txt" using 1:2 with lines

Deleted: SwiftApps/SciColSim/plot_cumulative_openmp.plt
===================================================================
--- SwiftApps/SciColSim/plot_cumulative_openmp.plt	2012-02-11 18:23:16 UTC (rev 5585)
+++ SwiftApps/SciColSim/plot_cumulative_openmp.plt	2012-02-11 19:11:50 UTC (rev 5586)
@@ -1,8 +0,0 @@
-set terminal png enhanced
-#set term postscript eps enhanced 
-set output "cumulativeplot-openmp.png"
-set nokey
-set xlabel "Time in seconds"
-set ylabel "number of completed jobs"
-set title "Cumulative SciColSim-openMP jobs"
-plot "plot_cumulative.txt" using 1:3 with lines

Deleted: SwiftApps/SciColSim/plot_ready.plt
===================================================================
--- SwiftApps/SciColSim/plot_ready.plt	2012-02-11 18:23:16 UTC (rev 5585)
+++ SwiftApps/SciColSim/plot_ready.plt	2012-02-11 19:11:50 UTC (rev 5586)
@@ -1,9 +0,0 @@
-set terminal png enhanced
-#set term postscript eps enhanced 
-set output "readyplot.png"
-set nokey
-set xlabel "Time"
-set ylabel "number of ready jobs"
-set xrange [3400:3800]
-set title "Init+Active+Sub+Stageinout jobs"
-plot "plot_ready_jobs.txt" using 1 with lines

Deleted: SwiftApps/SciColSim/plot_scs.plt
===================================================================
--- SwiftApps/SciColSim/plot_scs.plt	2012-02-11 18:23:16 UTC (rev 5585)
+++ SwiftApps/SciColSim/plot_scs.plt	2012-02-11 19:11:50 UTC (rev 5586)
@@ -1,15 +0,0 @@
-#set terminal png enhanced large
-set terminal svg enhanced size 1000 1000
-set style line 1 lc rgb "blue"
-set output "scs.svg"
-set nokey
-set xlabel "Evolution"
-set ylabel "Value of T"
-set title "SciColSim evolution Results"
-plot "T.data" using 1 with line lc rgb "green"
-
-set output "scs_loss.svg"
-set title "SciColSim evolution loss Results"
-set ylabel "Value of loss(AR)"
-set xrange [1500:2000]
-plot "anneal.data" using 1 with line lc rgb "green"

Added: SwiftApps/SciColSim/plotit
===================================================================
--- SwiftApps/SciColSim/plotit	                        (rev 0)
+++ SwiftApps/SciColSim/plotit	2012-02-11 19:11:50 UTC (rev 5586)
@@ -0,0 +1,42 @@
+#set terminal png enhanced size 1000 1000
+#set term postscript eps enhanced 
+set terminal svg enhanced size 1000 1000
+set style line 1 lc rgb "blue"
+set output "activeplot.svg"
+set nokey
+set xlabel "Time in sec"
+set ylabel "number of active jobs"
+set title "Active jobs"
+plot "plot_active.txt" using 1:2 with line
+
+set output "cumulativeplot-openmp.svg"
+set xlabel "Time in seconds"
+set ylabel "number of completed jobs"
+set title "Cumulative SciColSim-openMP jobs"
+plot "plot_cumulative.txt" using 1:($2*24) with lines
+
+set output "cumulativeplot.svg"
+set xlabel "Time in seconds"
+set ylabel "number of completed jobs"
+set title "Cumulative jobs"
+plot "plot_cumulative.txt" using 1:2 with lines
+
+set output "scs.svg"
+set xlabel "Evolution"
+set ylabel "Value of T"
+set title "SciColSim evolution Results"
+plot "T.data" using 1 with lines lc rgb "green"
+
+set output "scs_loss.svg"
+set title "SciColSim evolution loss Results"
+set xlabel "Evolution"
+set ylabel "Value of loss(AR)"
+plot "anneal.data" using 1 with lines lc rgb "green"
+
+set output "multiloss.svg"
+set title "SciColSim evolution loss Results"
+set key auto
+set yrange [0:200]
+set xlabel "Evolution"
+set ylabel "loss"
+plot "multiloss.txt" using 3 with lines title "multiloss mean val",  "multiloss.txt" using ($3+$4) with lines title "+stddev", "multiloss.txt" using ($3-$4) with lines title "-stddev"

Deleted: SwiftApps/SciColSim/swiftoutput2plot
===================================================================
--- SwiftApps/SciColSim/swiftoutput2plot	2012-02-11 18:23:16 UTC (rev 5585)
+++ SwiftApps/SciColSim/swiftoutput2plot	2012-02-11 19:11:50 UTC (rev 5586)
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-#usage: ./swiftoutput2plot <swift.outfile>
-
-OUTFILE=$1
-
-#extract start time
-TMPDATE=`grep -i progress $OUTFILE | head -n 1 | cut -f4-9 -d ' '`
-START_TIME=`date +%s -d "$TMPDATE"`
-
-#extract end time
-TMPDATE=`grep -i progress $OUTFILE | tail -n 1 | cut -f4-9 -d ' '`
-END_TIME=`date +%s -d "$TMPDATE"`
-
-#duration
-DIFFTIME=$((END_TIME - START_TIME))
-
-#extract active runs in a file
-grep -o -i "Active:[0-9]*" $OUTFILE | awk -F: '{print $2}' > active.txt
-
-#extract successful completions in a file
-grep -o -i "Successfully:[0-9]*" $OUTFILE | awk -F: '{print $2}' > cumulative.txt
-
-#prepare tics
-activelines=`wc -l active.txt | awk '{print $1}'`
-cumulines=`wc -l cumulative.txt | awk '{print $1}'`
-
-activelinespertic=`echo "scale=5 ; $DIFFTIME / $activelines" | bc`
-seq 0 $activelinespertic $DIFFTIME > activetics.txt
-
-cumulinespertic=`echo "scale=5 ; $DIFFTIME / $cumulines" | bc`
-seq 0 $cumulinespertic $DIFFTIME > cumultics.txt
-
-#final plot data
-paste activetics.txt active.txt > plot_active.txt
-paste cumultics.txt cumulative.txt > plot_cumulative.txt
-




More information about the Swift-commit mailing list