Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /benchmarks/scripts/run-one_sh.in
ViewVC logotype

Diff of /benchmarks/scripts/run-one_sh.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1655, Tue Nov 22 18:29:29 2011 UTC revision 1656, Tue Nov 22 18:31:51 2011 UTC
# Line 3  Line 3 
3  # A script for running a single Diderot benchmark test  # A script for running a single Diderot benchmark test
4  #  #
5  # usage:  # usage:
6  #       scripts/run-one.sh bmark nruns nprocs [diderotc-flags] [-- runtime-flags]  #       scripts/run-one.sh bmark nruns nprocs nworkers [diderotc-flags] [-- runtime-flags]
7  # where  # where
8  #       bmark   name of benchmark  #       bmark   name of benchmark
9  #       nruns   number of runs per benchmark version  #       nruns   number of runs per benchmark version
10  #       nprocs  number of processors for parallel version (0 means no parallel run)  #       nprocs    max number of processors for parallel version (0 means no parallel run)
11    #       nworkers  max number of workers/CU for GPU version (0 means no GPU run)
12  #  #
13  # @configure_input@  # @configure_input@
14  #  #
15    
16  function usage {  function usage {
17    echo "usage:"    echo "usage:"
18    echo "  scripts/run-one.sh bmark nruns nprocs [diderotc-flags] [-- runtime-flags]"    echo "  scripts/run-one.sh bmark nruns nprocs nworkers [diderotc-flags] [-- runtime-flags]"
19    exit $1    exit 1
20  }  }
21    
22  # this script should be run from the rtest directory  # this script should be run from the rtest directory
# Line 28  Line 29 
29    
30  # get the name of the benchmark, number of runs, and max number of processors  # get the name of the benchmark, number of runs, and max number of processors
31  #  #
32  if (( $# >= 3 )) ; then  if (( $# >= 4 )) ; then
33    BMARK=$1; shift    BMARK=$1; shift
34    NRUNS=$1; shift    NRUNS=$1; shift
35    MAXNP=$1; shift    MAXNP=$1; shift
36      MAXNW=$1; shift
37    if [ ! -d programs/$BMARK ] ; then    if [ ! -d programs/$BMARK ] ; then
38      echo "$BMARK is not a valid benchmark name"      echo "$BMARK is not a valid benchmark name"
39      exit 1      exit 1
# Line 56  Line 58 
58    shift    shift
59  done  done
60  # get runtime flags  # get runtime flags
61  while [ $# -ne 0 ] ; do  if [ $# -gt 0 ] ; do
62    case $1 in    RUNTIME_FLAGS="$*"
63      -*) RUNTIME_FLAGS="$RUNTIME_FLAGS $1" ;;  else
64      *) echo "unrecognized argument"    RUNTIME_FLAGS=""
65        usage 1  fi
     ;;  
   esac  
   shift  
 done  
66    
67  HOSTNAME=$( hostname -s )  HOSTNAME=$( hostname -s )
68  DATE=$( date +"%F-%H-%M-%S" )  DATE=$( date +"%F-%H-%M-%S" )
# Line 92  Line 90 
90    echo "# host: $HOSTNAME" >> $REPORT    echo "# host: $HOSTNAME" >> $REPORT
91    echo "# nruns: $NRUNS" >> $REPORT    echo "# nruns: $NRUNS" >> $REPORT
92    echo "# nprocs: $MAXNP" >> $REPORT    echo "# nprocs: $MAXNP" >> $REPORT
93      echo "# nworkers: $MAXNW" >> $REPORT
94    echo "# date: $DATE" >> $REPORT    echo "# date: $DATE" >> $REPORT
95    if [ x"$DIDEROTC_FLAGS" != x ] ; then    if [ x"$DIDEROTC_FLAGS" != x ] ; then
96      echo "# DIDEROTC_FLAGS: $DIDEROTC_FLAGS" >> $REPORT      echo "# DIDEROTC_FLAGS: $DIDEROTC_FLAGS" >> $REPORT
# Line 119  Line 118 
118        ./bmark-par -timing -np $np >> $REPORT        ./bmark-par -timing -np $np >> $REPORT
119      done      done
120    done    done
121      for ((nw=1; $nw <= $MAXNW;  nw++)) ; do
122        print -n "\nbmark-cl-$nw "
123        echo "# $BMARK-cl-$nw:" >> $REPORT
124        for ((i=0; $i < $NRUNS;  i++)) ; do
125          print -n "."
126          ./bmark-cl -timing -np $nw >> $REPORT
127        done
128      done
129    print ""    print ""
130  else  else
131    echo "build failed" >> $REPORT    echo "build failed" >> $REPORT

Legend:
Removed from v.1655  
changed lines
  Added in v.1656

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0