第3课 安装基础软件
1.安装编译器(ftrang)
编译器就是将“一种语言(通常为高级语言)”翻译为“另一种语言(通常为低级语言)”的程序。一个现代编译器的主要工作流程:源代码 (source code) → 预处理器 (preprocessor) → 编译器(compiler) → 目标代码 (object code) → 链接器 (Linker) → 可执行程序 (executables)
(1)安装Intel编译器
(2)设置环境变量
(3)检验编译器是否装好
Intel Parallel Studio XE这个编译器包含Fortran、C++及C三种语言与三种语言相关的多种库。支持window、linux和os x操作系统。商业版本只有30天的免费试用期,而学生可以申请Non-Commercial License链接如下https://software.intel.com/en-us/qualify-for-free-software/student。下面仅介绍Linux系统下IntelParallel Studio XE的安装过程。
You have registered Intel® Parallel Studio XE Cluster Edition for Linux* for non-commercial use. You will receive an email with the serial number listed below and the download location for future reference.
Serial number : *******
2.安装MPI库 (并行多节点多cup计算的工具)
OpenMPI,MPICH,MVAPICH等
(1)编译安装OpenMPI (基于源代码的安装方式)
解压缩:
tar -xzvf openmpi-1.6.5.tar.gz --no-same-owner --no-same-permissions
cd openmpi-1.6.5
./configure --prefix=/opt/openmpi/1.6.5/intel CC=icc CXX=icpc FC=ifort F77=ifort --disable-vt
make
make install
(2)设置环境变量
将以下内容加入到 ~/.bashrc 中
OPENMPI=/opt/openmpi/1.6.5/intel
export PATH= O