到intel https://software.intel.com/en-us/performance-libraries
填写邮件等信息后
下载免费的安装包
https://registrationcenter.intel.com/en/products/postregistration/?sn=33RM-SJ952567&EmailID=huangwenwenlili%40126.com&Sequence=2025512
下载完成后根据这个网页安装
https://software.intel.com/en-us/articles/using-intel-compilers-for-linux-with-ubuntu、
http://blog.chinaunix.net/uid-29530577-id-4201554.html
COMPATIBLE Intel Compiler Versions: In order to use Intel? Compilers (C++ or Fortran) under the lastest release of Ubuntu, you will need newer versions of the Intel compiler(s). Do NOT try to install older Intel Compilers such as 12.0, 11.x, 10.x, 9.x or 8.x under Ubuntu 12.xx or newer: they will not install easily and probably will not work - and they are NOT supported. If you need an older Intel Compiler version, please read their ReleaseNotes and obtain an older, supported distribution (read this): http://software.intel.com/en-us/articles/older-version-product
Ubuntu 11.04 through Ubuntu 12.10 :
apt-get install build-essential
apt-get install gcc-multilib
apt-get install rpm
apt-get install ia32-libs (only needed if you install the 32bit compiler)
apt-get install openjdk-6-jre-headless
UMASK before you install: If you will install as root or use sudo for the installation, check the umask setting for your root user:
# umask
or
sudo bash ; umask
the value should be 0022. If not, set it to 0022 so that the files you install are readable by non-root users:
umask 0022
INSTALLATION:
untar the package tarball in a scratch directory such as /tmp. tar -zxvf l_fcompxe_2013.x.yyy[_intel64 | _ia32].tgz
cd into the extracted directory
./install.sh and follow the instructions.
during the install, you can ignore any warnings about the missing Java prerequisite - it may not recognize openjdk-6-jre-headless.
5、 cd 到l_cprof_p_11.1.072_ia32.tgz 文件所在的目录,然后解压。
!注:终端下可用命令:
tar -zxvf l_cprof_p_11.1.072_ia32.tgz 解压。
6、进入解压后的文件夹,运行:
sudo ./install.sh
7、选择1,typical安装
8、一路enter下去,有yes or no就输入yes,有accept or rejecet就输入accept
9、选择默认的安装路径即可,一路enter下去
10、若安装正常,应会提示安装成功;
11、将语句
安装之后,默认安装路径为 /opt/intel, 找到 /opt/intel/composer_xe_2013_sp1.0.080/mkl/bin/intel64 (如果你的cup是64位的话, 如果不是选择ia32, 懒得选择,执行bin下面的mklvars.sh 也可以).
在写好链接代码的脚本后,这时候调用intel库还是会出问题,会提示mkl cannot open shared object file no such file or directory,需要在系统PATH路径中加入代码
1: 获得root权限, $ su
2: $ gedit /etc/profile
3: 在末尾处加入代码:
export PATH=":/opt/intel/bin:$PATH"
export LD_LIBRARY_PATH=$LD_LIBRARY_LIB:/opt/intel/lib/intel64:/opt/intel/mkl/lib/intel64
4: $ source /etc/profile 如果没有报错,则path生效