summaryrefslogtreecommitdiff
path: root/exp_script/run_parsec_from_ckpt.sh
blob: 0b60ef4d9f3cf45b2492dc10ed6d0ae95c06182f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash

# PARSEC benchmarks

#Need to export GEM5_PATH
if [ -z ${GEM5_PATH+x} ];
then
    echo "GEM5_PATH is unset";
    exit
else
    echo "GEM5_PATH is set to '$GEM5_PATH'";
fi


#Need to export M5_PATH
if [ -z ${M5_PATH+x} ];
then
    echo "M5_PATH is unset. M5_PATH is the path the full disk image.";
    exit
else
    echo "M5_PATH is set to '$M5_PATH'";
fi


WORKLOAD=blackscholes
INPUT_SIZE=test
#simmedium
SCHEME=FuturisticSafeInvisibleSpec
#FuturisticSafeFence
CORE_NUM=4
ISA=arm


CKPT_OUT_DIR=$GEM5_PATH/../gem5_ckpt/$WORKLOAD-$CORE_NUM-$INPUT_SIZE-$ISA
OUT_DIR=$GEM5_PATH/output/$WORKLOAD-$CORE_NUM-$INPUT_SIZE-$ISA-$SCHEME

CONFIG_FILE=$GEM5_PATH/configs/example/fs.py 

echo "scirpt file: " $SCRIPT_FILE
echo "checkpoint direcotory: " $CKPT_OUT_DIR
echo "output directory: " $OUT_DIR

echo "clean up old files"
if [ -d "$OUT_DIR" ]
then
    rm -r $OUT_DIR
fi

echo "create output directory"
mkdir -p $OUT_DIR

    echo "run arm simulator"
    # always use opt to test simulator locally, otherwise messages may not print
    $GEM5_PATH/build/ARM_MESI_Two_Level/gem5.opt \
        --outdir=$OUT_DIR     $CONFIG_FILE \
        --checkpoint-dir=$CKPT_OUT_DIR \
        --script=$SCRIPT_FILE \
        --machine-type=VExpress_EMM64 \
        --kernel=$M5_PATH/binaries/vmlinux.aarch64.20140821 \
        --dtb-file=$M5_PATH/binaries/vexpress.aarch64.20140821.dtb \
        --disk-image=$M5_PATH/disks/aarch64-ubuntu-trusty-headless.img \
        --num-cpus=$CORE_NUM --mem-size=2GB --num-l2caches=$CORE_NUM \
        --num-dirs=$CORE_NUM --network=simple --topology=Mesh_XY --mesh-rows=4 \
        --l1d_assoc=8 --l2_assoc=16 --l1i_assoc=4 \
        --checkpoint-restore=1 --ruby --cpu-type=DerivO3CPU  \
        --needsTSO=0 --scheme=$SCHEME &> $OUT_DIR/log.txt &