generated from gvodanovic/AdC2024-lab2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_simulation.sh
executable file
·21 lines (12 loc) · 1.1 KB
/
run_simulation.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
CONTAINER_NAME="adc2024_gem5"
IMAGE_NAME="gvodanovic/adc_gem5:latest"
RESULT_PATH="./se_results/"
# Definir el benchmark a correr, opciones: daxpy, simFisica, bubbleSort
BENCHMARK="daxpy"
# Definir el procesador a utilizar, opciones: in_order, out_of_order, etc.
PROCESSOR="in_order"
# docker build --platform linux/amd64 -t $IMAGE_NAME .
docker run -it --rm -v "$(pwd)":/local --privileged -v /tmp/.X11-unix:/tmp/.X11-unix -v "$HOME/.Xauthority:/root/.Xauthority:rw" --name $CONTAINER_NAME $IMAGE_NAME /bin/bash -c "aarch64-linux-gnu-gcc --static /local/benchmarks/$BENCHMARK.s -o /local/benchmarks/$BENCHMARK.img -I /opt/gem5/include -L /opt/gem5/util/m5/build/arm64/out/ -lm5 /opt/gem5/util/m5/build/arm64/out/libm5.a"
docker run -it --rm -v "$(pwd)":/local --privileged -v /tmp/.X11-unix:/tmp/.X11-unix -v "$HOME/.Xauthority:/root/.Xauthority:rw" --name $CONTAINER_NAME $IMAGE_NAME /bin/bash -c "/opt/gem5/build/ARM/gem5.opt -d $RESULT_PATH /local/scripts/se.py /local/scripts/cpu_config.toml $PROCESSOR /local/benchmarks/$BENCHMARK.img" > sim.log
python3 scripts/stat-collect.py se_results/stats.txt