-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_dramsim3_simulation.sh
More file actions
47 lines (41 loc) · 1.17 KB
/
Copy pathrun_dramsim3_simulation.sh
File metadata and controls
47 lines (41 loc) · 1.17 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
PROJECT_DIR=$( cd "$(dirname "${BASH_SOURCE[0]}")" && pwd );
# build dynamic library of cnpy
cd ${PROJECT_DIR}/dramsim3_simulation/ext/cnpy
cnpy_folder=${PROJECT_DIR}/dramsim3_simulation/ext/cnpy/install
if [ -d "$cnpy_folder" ]; then
echo "cnpy has already been built"
else
mkdir build
mkdir install
cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ../
make
make install
fi
# generate graph partitions
ogb_folder=${PROJECT_DIR}/dramsim3_simulation/graph_partition/Amazon/;
pyg_folder=${PROJECT_DIR}/dramsim3_simulation/graph_partition/Reddit/;
cd ${PROJECT_DIR}/dramsim3_simulation/graph_partition
if [ -d "$ogb_folder" ]; then
echo "Amazon data has already generated"
else
python ogb_partition.py --dataset_root_path ${PROJECT_DIR}/dataset/
fi
if [ -d "$pyg_folder" ]; then
echo "Reddit data has already generated"
else
python pyg_partition.py --dataset_root_path ${PROJECT_DIR}/dataset/
fi
# build main projects
cd ${PROJECT_DIR}/dramsim3_simulation/
mkdir -p build
cd build
cmake ..
make -j4
mv dramsim3main ../
# run main program
cd ${PROJECT_DIR}/dramsim3_simulation/
./dramsim3main
mv ./results/* ../results
rm -rf results