-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
executable file
·148 lines (136 loc) · 4.53 KB
/
setup.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#!/usr/bin/env bash
while [ -n "$1" ]; do
case "$1" in
-c) run_csmpi="True"; shift ;;
-sc) scheduler=$2; shift; shift ;;
esac
done
# Clean up previous installations
rm -rf ./submodules/*
run_csmpi="${run_csmpi:="False"}"
n_columns=$(stty size | awk '{print $2}')
progress_delimiter=""
for i in `seq 1 ${n_columns}`;
do
progress_delimiter+="-"
done
# First, get all relevant submodules
echo
echo ${progress_delimiter}
echo "Fetching submodules..."
echo ${progress_delimiter}
echo
git submodule update --init --recursive
echo
echo ${progress_delimiter}
echo "Done fetching submodules."
echo ${progress_delimiter}
echo
# Build tracing infrastructure (DUMPI, CSMPI, NINJA, PnMPI)
echo
echo ${progress_delimiter}
echo "Building SST-DUMPI..."
echo ${progress_delimiter}
echo
./install/install_dumpi.sh
echo
echo ${progress_delimiter}
echo "Done building SST-DUMPI."
echo ${progress_delimiter}
echo
echo
echo ${progress_delimiter}
echo "Building Pluto..."
echo ${progress_delimiter}
echo
./install/install_pluto.sh
echo
echo ${progress_delimiter}
echo "Done building Pluto."
echo ${progress_delimiter}
echo
if [ "${run_csmpi}" == "True" ]; then
echo
echo ${progress_delimiter}
echo "Building CSMPI..."
echo ${progress_delimiter}
echo
./install/install_csmpi.sh
echo
echo ${progress_delimiter}
echo "Done building CSMPI."
echo ${progress_delimiter}
echo
fi
echo
echo ${progress_delimiter}
echo "Building PnMPI..."
echo ${progress_delimiter}
echo
./install/install_pnmpi.sh
echo
echo ${progress_delimiter}
echo "Done building PnMPI."
echo ${progress_delimiter}
echo
# Patch tracing libraries for use with PnMPI
echo
echo ${progress_delimiter}
echo "Patching tracing libraries for use with PnMPI..."
echo ${progress_delimiter}
echo
./submodules/PnMPI/build/bin/pnmpi-patch ./submodules/sst-dumpi/build/lib/libdumpi.so ./anacin-x/pnmpi/patched_libs/libdumpi.so
./submodules/PnMPI/build/bin/pnmpi-patch ./submodules/Pluto/build/libpluto.so ./anacin-x/pnmpi/patched_libs/libpluto.so
if [ "${run_csmpi}" == "True" ]; then
./submodules/PnMPI/build/bin/pnmpi-patch ./submodules/CSMPI/build/libcsmpi.so ./anacin-x/pnmpi/patched_libs/libcsmpi.so
fi
echo
echo ${progress_delimiter}
echo "Done patching tracing libraries for use with PnMPI..."
echo ${progress_delimiter}
echo
# Build dumpi_to_graph
echo
echo ${progress_delimiter}
echo "Building graph constructor..."
echo ${progress_delimiter}
echo
./install/install_dumpi_to_graph.sh
echo
echo ${progress_delimiter}
echo "Done building graph constructor."
echo ${progress_delimiter}
echo
# Build Comm Pattern Generator
echo
echo ${progress_delimiter}
echo "Building Comm Pattern Generator..."
echo ${progress_delimiter}
echo
./install/install_comm_pattern_generator.sh
echo
echo ${progress_delimiter}
echo "Done Building Comm Pattern Generator."
echo ${progress_delimiter}
echo
# Set vars for job script infrastructure
anacin_x_root=$(pwd)
#sed -i "s#anacin_x_root= #anacin_x_root=${anacin_x_root}#" ./apps/comm_pattern_generator/comm_pattern_config.config
sed -i "s#anacin_x_root= #anacin_x_root=${anacin_x_root}#" ./anacin-x/config/anacin_paths.config
sed -i "s#scheduler= #scheduler=${scheduler}#" ./anacin-x/config/anacin_paths.config
#sed -i "s#anacin_x_root= #anacin_x_root=${anacin_x_root}#" ./apps/comm_pattern_generator/unscheduled/example_paths_unscheduled.config
#sed -i "s#anacin_x_root= #anacin_x_root=${anacin_x_root}#" ./apps/comm_pattern_generator/slurm/example_paths_slurm.config
#sed -i "s#anacin_x_root= #anacin_x_root=${anacin_x_root}#" ./apps/comm_pattern_generator/lsf/example_paths_lsf.config
if [ "${run_csmpi}" == "True" ]; then
sed -i "s#run_csmpi= #run_csmpi=${run_csmpi}#" ./anacin-x/config/anacin_paths.config
sed -i "s#csmpi_conf= #csmpi_conf=${anacin_x_root}/submodules/CSMPI/config/#" ./anacin-x/config/anacin_paths.config
sed -i "s#pnmpi_conf= #pnmpi_conf=${anacin_x_root}/anacin-x/pnmpi/configs/dumpi_pluto_csmpi.conf#" ./anacin-x/config/anacin_paths.config
sed -i "s#dumpi_to_graph_config= #dumpi_to_graph_config=${anacin_x_root}/submodules/dumpi_to_graph/config/dumpi_and_csmpi.json#" ./anacin-x/config/anacin_paths.config
else
sed -i "s#run_csmpi= #run_csmpi=${run_csmpi}#" ./anacin-x/config/anacin_paths.config
sed -i "s#pnmpi_conf= #pnmpi_conf=${anacin_x_root}/anacin-x/pnmpi/configs/dumpi_pluto.conf#" ./anacin-x/config/anacin_paths.config
sed -i "s#dumpi_to_graph_config= #dumpi_to_graph_config=${anacin_x_root}/submodules/dumpi_to_graph/config/dumpi_only.json#" ./anacin-x/config/anacin_paths.config
fi
## Set up conda environment
#conda env create -f ./install/anacin-x-environment.yml
#source ./install/activate_environment.sh