-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-morrigan-macos.sh
executable file
·86 lines (66 loc) · 1.98 KB
/
install-morrigan-macos.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
set -euo pipefail
MORRIGAN_ENV_FILE=morrigan-env.sh
. $MORRIGAN_ENV_FILE
MORRIGAN_DEBUG=""
if [ -z ${MORRIGAN_HOME+x} ];
then
echo "ERROR: MORRIGAN_HOME is unset";
exit
fi
LOGFILE=$MORRIGAN_LOGS/configure-morrigan.out
mkdir -p $MORRIGAN_LOGS
rm -f $LOGFILE
touch $LOGFILE
SST_CORE_HOME=$MORRIGAN_HOME/install
####################
# Install SST Core #
####################
cd sst-core
./autogen.sh
mkdir -p build
cd build
../configure CPPFLAGS="-fno-omit-frame-pointer" $MORRIGAN_DEBUG --prefix=$SST_CORE_HOME --disable-mpi
make all -j8
make install
cd $MORRIGAN_HOME
echo "export SST_CORE_HOME=$SST_CORE_HOME" >> $MORRIGAN_ENV_FILE
echo
echo "MORRIGAN: sst-core has been configured." | tee -a $LOGFILE
echo
wait
####################
# Install DRAMsim3 #
####################
cd DRAMsim3
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .
make -j8
MORRIGAN_DRAMDIR=$PWD
cd $MORRIGAN_HOME
echo "export MORRIGAN_DRAMDIR=$MORRIGAN_DRAMDIR" >> $MORRIGAN_ENV_FILE
echo
echo "MORRIGAN: DRAMsim3 has been configured." | tee -a $LOGFILE
echo
wait
########################
# Install SST Elements #
########################
#TODO: Check the output of elements config to make sure it built ariel and detected dramsim3
SST_ELEMENTS_HOME=$MORRIGAN_HOME/install
SST_ELEMENTS_ROOT="sst-elements"
echo export SST_ELEMENTS_HOME=$SST_ELEMENTS_HOME >> $MORRIGAN_ENV_FILE
echo export SST_ELEMENTS_ROOT=$SST_ELEMENTS_ROOT >> $MORRIGAN_ENV_FILE
cd sst-elements
# Remove Werror
find . -name Makefile.am -exec sed -i "" -e s'/-Werror//g' {} \;
./autogen.sh
# Don't build elements listed in disabled-elements.txt
while read p;
do
sed -i "" -e "/ac_config_files.*$p/s/^/#/" configure
sed -i "" -e "/active_element_libraries.*$p/s/^/#/" configure
done < $MORRIGAN_HOME/disabled-elements.txt
./configure CPPFLAGS="-fno-omit-frame-pointer" $MORRIGAN_DEBUG --prefix=$SST_ELEMENTS_HOME --with-sst-core=$SST_CORE_HOME --with-pin=$MORRIGAN_PIN_HOME --with-dramsim3=$MORRIGAN_DRAMDIR
make all -j8
make install
cd $MORRIGAN_HOME
echo "Done"