forked from UVA-LavaLab/PIMeval-PIMbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathae.sh
executable file
·53 lines (44 loc) · 1.26 KB
/
ae.sh
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
#!/bin/bash
# Perform make clean and make in the current directory
echo "Running 'make clean'..."
make clean
echo "Running 'make'..."
make -j PIM_SIM_TARGET=PIM_DEVICE_FULCRUM
# Check if make was successful
if [ $? -ne 0 ]; then
echo "'make' failed. Exiting."
exit 1
fi
echo "Entering PIMbench directory"
cd PIMbench
# Iterate through each subdirectory in PIMbench and execute the benchmark
for dir in */; do
if [ -d "$dir/PIM" ]; then
# Change into the PIM directory
cd "$dir/PIM"
# Run the benchmark executable
echo "Running benchmark in $dir"
if [ -f *.out ]; then
./*.out
# Check if the benchmark ran successfully
if [ $? -ne 0 ]; then
echo "Benchmark execution failed in $dir/PIM. Exiting."
exit 1
fi
else
echo "No executable found in $dir/PIM. Skipping."
fi
# Go back to the PIMbench directory
cd ../../
else
echo "Running benchmark in $dir"
cd "$dir/"
./*.out
cd ../
fi
done
echo "All benchmarks with small input completed!"
echo "Running vector add with large input:"
cd cpp-vec-add/PIM
./vec-add.out -l 1035544320
echo "Vector add with large input completed!"