forked from essentialsofparallelcomputing/Chapter2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSetup.Ubuntu20.04
executable file
·33 lines (28 loc) · 1.39 KB
/
Setup.Ubuntu20.04
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
#!/bin/sh
# Sets up Ubuntu 20.04 from bare-bones installation
# Comment out what you don't need or run line-by-line, manually
sudo apt-get -qq update && \
DEBIAN_FRONTEND=noninteractive \
sudo apt-get -qq install -y cmake make git vim gcc g++ gfortran wget gnupg-agent valgrind \
mpich libmpich-dev \
openmpi-bin openmpi-doc libopenmpi-dev
# Installing latest GCC compiler (version 10)
sudo apt-get -qq install -y gcc-10 g++-10 gfortran-10
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-9 80 \
--slave /usr/bin/g++ g++ /usr/bin/g++-9 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-9 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-9
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-10 90 \
--slave /usr/bin/g++ g++ /usr/bin/g++-10 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-10 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-10
sudo chmod u+s /usr/bin/update-alternatives
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
sudo wget -q http://ftp.math.utah.edu/pub/misc/ndiff-2.00.tar.gz && \
tar -xzf ndiff-2.00.tar.gz && cd ndiff-2.00 && \
sudo mkdir -p /usr/local/man/man1 && \
./configure && make && sudo make install && cd .. && rm -rf ndiff-2.00
#make clean
#make