source: liacs/ca/opdr3/calculate.sh@ 6

Last change on this file since 6 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

  • Property svn:executable set to *
File size: 1.6 KB
RevLine 
[2]1#!/bin/sh
2
3#/* Author : Rick van der Zwet
4# * S-number : 0433373
5# * Version : $Id: memory.h 363 2007-12-03 06:07:31Z rick $
6# * Copyright : FreeBSD Licence
7# * Description : Generate results of 15 combinations
8# */
9
10DATAFILE=${1:-./data/lisp.002.din}
11DINERO='./data/dinero'
12BUS2='./grep-bus2'
13COMPU='./compu'
14RESULT_PRE="./res-"
15RESULT_SUFFIX=".txt"
16RESULT_BUS2="./bus2-"
17MEM_SETTINGS="1 2 3 4 5"
18CACHE_SETTINGS="a b c"
19
20DINERO_ARGS_a="-b1 -u1"
21DINERO_ARGS_b="-b128 -a1 -ww -An -u64k"
22DINERO_ARGS_c="-b128 -a1 -wc -Aw -u64k"
23
24if [ ! -x $DINERO ]; then
25 echo "$DINERO binary not found" 1>&2
26 echo "Please alter $0 to specifify right constants" 1>&2
27 exit 128;
28fi
29
30if [ ! -r $DATAFILE ]; then
31 echo "$DATAFILE file not found" 1>&2
32 echo "Please alter $0 to specifify right constants or" 1>&2
33 echo "Usage $0 <datafile>" 1>&2
34 exit 128;
35fi
36
37echo "Using datafile $DATAFILE" 1>&2
38for mem_setting in $MEM_SETTINGS
39do
40 for cache_setting in $CACHE_SETTINGS
41 do
42 (
43 eval DINERO_ARGS=\$DINERO_ARGS_$cache_setting
44 echo "==============================================="
45 echo "Generated : `date`"
46 echo "Input data : $DATAFILE"
47 echo "Memory setting : $mem_setting"
48 echo "Cache setting : $cache_setting"
49 echo "Dinero args : $DINERO_ARGS"
50 cat $DATAFILE | $DINERO -o2 $DINERO_ARGS |\
51 $BUS2 |\
52 tee -i $RESULT_BUS2$mem_setting$cache_setting$RESULT_SUFFIX |\
53 $COMPU $mem_setting
54 echo "==============================================="
55 ) | tee -i $RESULT_PRE$mem_setting$cache_setting$RESULT_SUFFIX 1>&2
56 done
57done
58
Note: See TracBrowser for help on using the repository browser.