-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-bitmap-index-cim.sh
More file actions
executable file
·31 lines (27 loc) · 1.09 KB
/
run-bitmap-index-cim.sh
File metadata and controls
executable file
·31 lines (27 loc) · 1.09 KB
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
#!/bin/bash
# Function to extract the third column of the last row
extract_last_column() {
local trace_file=$1
tail -n 1 "$trace_file" | awk '{print $3}'
}
# Base directory for the trace files
base_dir="/home/sonlm/workplace/DRAM-CIM/Ours/sniper/test/bitmap-index-cim"
# Array of configurations
configs=("DDR4_8Gb_x8_1866.ini" "DDR4_8Gb_x8_2400.ini" "DDR4_8Gb_x8_3200.ini")
cases=("8-2" "8-3" "8-4" "16-2" "16-3" "16-4")
#FIXMEpim=("ambit" "pipf" "roc" "elp2im" "ours")
pim=("ours")
# Loop through each configuration, case, and PIM
for config in "${configs[@]}"; do
# Extract the frequency from the config file name
freq=$(echo "$config" | grep -oP '\d+(?=\.ini)')
for c in "${cases[@]}"; do
for p in "${pim[@]}"; do
trace_file="$base_dir/out-main-cim-$c-$p-ddr4-$freq/dramsim3.trace"
last_column=$(extract_last_column "$trace_file")
output_dir="out/bitmap-index-cim-$c-$p-$config"
mkdir -p "$output_dir"
./build/dramsim3main "configs/$config" -c "$last_column" -t "$trace_file" -o "$output_dir"
done
done
done