-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathREADME.virtualbox
More file actions
executable file
·87 lines (67 loc) · 3.67 KB
/
README.virtualbox
File metadata and controls
executable file
·87 lines (67 loc) · 3.67 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
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
# These are instructions to setup an Ubuntu virtual machine for the examples in
# this chapter. The first part of the instructions must be done manually. The
# last half can be done by executing this file as a script as instructed.
# Download VirtualBox and install
# Download Ubuntu desktop install and save on local disk [ubuntu-20.04-desktop-amd64.iso]
# Download VBoxGuestAdditions.iso
# On Mac already at /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
# Setup new machine
# See the README.autovirtualbox script for directions for setting up base virtual machine
# sign in
# click through whats new
# select dots at bottom left and start up a terminal
# Reboot to get cut and paste and screen size fixed
# Add user to sudo list if needed
# su
# visudo
# add %vboxsf ALL=(ALL) ALL
# exit
# sudo apt-get install -y git
# Need script on guest to execute
# git clone --recursive https://github.com/essentialsofparallelcomputing/Chapter6.git
# Run the script Chapter6/README.virtualbox
sudo apt-get update && DEBIAN_FRONTEND=noninteractive \
sudo apt-get install -y cmake git vim gcc g++ gfortran software-properties-common wget gnupg-agent gnupg2
# likwid installed manually in container because msr is not accessible
# Installing latest GCC compiler (version 10) for best vectorization
sudo apt-get 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
# Installing Intel compilers since they give the best vectorization among compiler vendors
# Also installing Intel Advisor to look at vectorization performance
wget -q https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo rm -f GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo echo "deb https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneAPI.list
sudo echo "deb [trusted=yes arch=amd64] https://repositories.intel.com/graphics/ubuntu bionic main" > /etc/apt/sources.list.d/intel-graphics.list
sudo apt-get -qq update && \
sudo apt-get -qq install -y \
intel-hpckit-getting-started \
intel-oneapi-common-vars \
intel-oneapi-common-licensing \
intel-oneapi-dev-utilities \
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \
intel-oneapi-ifort \
intel-oneapi-advisor
# Needed libraries for Intel Advisor graphics user interface
sudo apt-get -qq update && \
sudo apt-get -qq install -y libgtk2.0-0 libxxf86vm1 libsm6 libnss3 libnss3 libx11-xcb1 libxtst6 \
libasound2 libatk-bridge2.0-0
sudo wget http://ftp.fau.de/pub/likwid/likwid-5.0.1.tar.gz && tar -xzvf likwid-5.0.1.tar.gz && \
cd likwid-5.0.1 && sed -i -e '/ACCESSMODE/s!accessdaemon!perf_event!' \
-e '/PREFIX/s!/usr/local!/usr!' -e '/BUILDFREQ/s/true/false/' config.mk && \
make && make install && cd .. && rm -rf likwid-5.0.1
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
# If Software updater prompts, install updated software --> wait ....
echo "Add source /opt/intel/oneapi/setvars.sh to dotfile"
source /opt/intel/oneapi/setvars.sh
cd Chapter6; #make