[關鍵字]: R, Installation, MKL
[重點摘要]:
在Ubuntu 14.04上利用Intel Compiler編譯R, 並設定後讓在Rstudio中使用。
1. 安裝Intel Compiler, MKL, ... 到 /opt/intel
2. 下載R Source並解壓縮到某個資料夾,以下代稱<R HOME>
3. 在bash下執行以下指令:
```sh
# install tiff and cairo, or plot in rstudio will crash
sudo apt-get install libcairo2-dev libtiff5-dev
source /opt/intel/composerxe/bin/compilervars.sh intel6
export CC="icc"
export CXX="icpc"
export AR="xiar"
export LD="xild"
export CFLAGS="-O3 -ipo -openmp -xHost"
export CXXFLAGS="-O3 -ipo -openmp -xHost"
MKL="-lmkl_gf_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread"
echo $MKL
export MAIN_LDFLAGS='-openmp'
./configure