Ching-Chuan Chen's Blogger

Statistics, Machine Learning and Programming

0%

Compile Julia on CentOS 7 with Intel MKL and Intel C++

這篇主要是紀錄在CentOS 7編譯Julia

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
# clone source code
git clone https://github.com/JuliaLang/julia.git
git checkout v1.0.0
# create make info
tee Make.user << EOF
USE_INTEL_MKL = 1
MKLROOT = /opt/intel/mkl
EOF
# install needed components
yum install gcc gcc-c++ libatomic gcc-gfortran wget m4 bzip2 -y
wget https://cmake.org/files/v3.11/cmake-3.11.4.tar.gz
tar xzvf cmake-3.11.4.tar.gz
cd cmake-3.11.4
./bootstrap --prefix=/usr
gmake
make install

# 把so複製過來
MKLROOT=/opt/intel/mkl
mkdir -p usr/bin
cp "$MKLROOT/lib/intel64/libiomp5md.dll" usr/bin/
cp $MKLROOT/lib/intel64/lib* usr/bin
cp /opt/intel/compilers_and_libraries/linux/lib/intel64/libiomp5* usr/bin

# 開始編譯
make -j 15