搭建高性能计算环境(三)、安装intel编译器和mpi

转自 搭建高性能计算环境(三)、安装intel编译器和mpi - iDove - 博客园

搭建高性能计算环境(三)、安装intel编译器和mpi

很多计算软件都是要从源代码编译的,并且运行也需要mpi的支持,本节我们来安装intel编译器和openmpi。

1、 Intel编译器的安装

需要的软件包:parallel_studio_xe_2013_update2_intel64.tgz、License文件

1)首先将软件包上传的Linux系统,可以使用上节介绍的ssh工具。

2)进入上传的目录,解压缩

tar xvf parallel_studio_xe_2013_update2_intel64.tgz

3)进去解压出来的目录

cd parallel_studio_xe_2013_update2_intel64

4)开始安装

./install

5)欢迎界面

Step no: 1 of 7 | Welcome

--------------------------------------------------------------------------------

Welcome to the Intel(R) Parallel Studio XE 2013 Update 2 for Linux* installation

program.

--------------------------------------------------------------------------------

You will complete the steps below during this installation:

Step 1 : Welcome

Step 2 : License

Step 3 : Activation

Step 4 : Intel(R) Software Improvement Program

Step 5 : Options

Step 6 : Installation

Step 7 : Complete

--------------------------------------------------------------------------------

Press "Enter" key to continue or "q" to quit:

6)CentOS操作系统会提示不支持,跳过。

Step no: 1 of 7 | Options > Missing Optional Pre-requisite(s)

--------------------------------------------------------------------------------

There are one or more optional unresolved issues. It is highly recommended to

resolve them all before you continue the installation. You can fix them without

exiting from the installation and re-check. Or you can quit from the

installation, fix them and run the installation again.

--------------------------------------------------------------------------------

Missing optional pre-requisites

-- Intel(R) Composer XE 2013 Update 2 for Linux*: unsupported OS

--------------------------------------------------------------------------------

1. Skip missing optional pre-requisites [default]

2. Show the detailed info about issue(s)

3. Re-check the pre-requisites

h. Help

b. Back to the previous menu

q. Quit

--------------------------------------------------------------------------------

Please type a selection or press "Enter" to accept default choice [1]:

7)接受license,输入accept

8)选择激活方式,此处使用文件激活,选择3

Step no: 3 of 7 | Activation

--------------------------------------------------------------------------------

If you have purchased this product and have the serial number and a connection

to the internet you can choose to activate the product at this time. Activation

is a secure and anonymous one-time process that verifies your software licensing

rights to use the product. Alternatively, you can choose to evaluate the

product or defer activation by choosing the evaluate option. Evaluation software

will time out in about one month. Also you can use license file, license

manager, or remote activation if the system you are installing on does not

have internet access activation options.

--------------------------------------------------------------------------------

1. I want to activate my product using a serial number [default]

2. I want to evaluate my product or activate later

3. I want to activate either remotely, or by using a license file, or by using a

license manager

h. Help

b. Back to the previous menu

q. Quit

--------------------------------------------------------------------------------

Please type a selection or press "Enter" to accept default choice [1]:

9)指定license文件

Step no: 3 of 7 | Activation > Advanced activation

--------------------------------------------------------------------------------

You can use license file, license manager, or the system you are installing on

does not have internet access activation options.

--------------------------------------------------------------------------------

1. Use a different computer with internet access [default]

2. Use a license file

3. Use a license server

h. Help

b. Back to the previous menu

q. Quit

--------------------------------------------------------------------------------

Please type a selection or press "Enter" to accept default choice [1]: 2

Note: Press "Enter" key to back to the previous menu.

Please type the full path to your license file(s): /root/NCOM_L___NT4V-6MS554NC.lic

--------------------------------------------------------------------------------

Activation completed successfully.

--------------------------------------------------------------------------------

Press "Enter" key to continue:

10)是否加入改进,选2就行了。

Step no: 4 of 7 | Intel(R) Software Improvement Program

--------------------------------------------------------------------------------

Help improve your experience with Intel(R) software

Participate in the design of future Intel software. Select 'Yes' to give us

permission to learn about how you use your Intel software and we will do the rest.

- No Personal contact information is collected

- There are no surveys or additional follow-up emails by opting in

- You can stop participating at any time

Learn more about Intel(R) Software Improvement Program

http://software.intel.com/en-us/articles/software-improvement-program

With your permission, Intel may automatically receive anonymous information

about how you use your current and future Intel software.

--------------------------------------------------------------------------------

1. Yes, I am willing to participate and improve Intel software. (Recommended)

2. No, I don't want to participate in the Intel(R) Software Improvement Program at this time.

b. Back to the previous menu

q. Quit

--------------------------------------------------------------------------------

Please type a selection:

11)此处可以修改安装目录和要安装的组件,默认安装到/opt/intel目录下

Step no: 5 of 7 | Options

--------------------------------------------------------------------------------

You are now ready to begin installation. You can use all default installation

settings by simply choosing the "Start installation Now" option or you can

customize these settings by selecting any of the change options given below

first. You can view a summary of the settings by selecting

"Show pre-install summary".

--------------------------------------------------------------------------------

1. Start installation Now

2. Change install directory [ /opt/intel ]

3. Change components to install [ All ]

4. Change advanced options

5. Show pre-install summary

h. Help

b. Back to the previous menu

q. Quit

--------------------------------------------------------------------------------

Please type a selection or press "Enter" to accept default choice [1]:

WARNING: Destination directory already exists.

Would you like to overwrite this directory? ( Yes/No ) [ Yes ] :

12)提示我的虚拟机不支持此功能,跳过即可。

Step no: 5 of 7 | Options > Missing Optional Pre-requisite(s)

--------------------------------------------------------------------------------

There are one or more optional unresolved issues. It is highly recommended to

resolve them all before you continue the installation. You can fix them without

exiting from the installation and re-check. Or you can quit from the

installation, fix them and run the installation again.

--------------------------------------------------------------------------------

Missing optional pre-requisites

-- Intel(R) VTune(TM) Amplifier XE 2013 Update 4: Power analysis is not enabled

--------------------------------------------------------------------------------

1. Skip missing optional pre-requisites [default]

2. Show the detailed info about issue(s)

3. Re-check the pre-requisites

h. Help

b. Back to the previous menu

q. Quit

--------------------------------------------------------------------------------

Please type a selection or press "Enter" to accept default choice [1]:

12)开始安装

Step no: 6 of 7 | Installation

--------------------------------------------------------------------------------

Each component will be installed individually. If you cancel the installation,

components that have been completely installed will remain on your system. This

installation may take several minutes, depending on your system and the options

you selected.

--------------------------------------------------------------------------------

Installing Amplifier XE Command line interface component... done

--------------------------------------------------------------------------------

Installing Amplifier XE Sampling driver kit component...

WARNING: NMI watchdog timer is enabled.

Suggestion: turn off the nmi_watchdog timer before running sampling.

--------------------------------------------------------------------------------

Installing Amplifier XE Power driver kit component... done

--------------------------------------------------------------------------------

Installing Amplifier XE Graphical user interface component... done

--------------------------------------------------------------------------------

Installing Inspector XE Command line interface component... done

--------------------------------------------------------------------------------

Installing Inspector XE Graphical user interface component... done

--------------------------------------------------------------------------------

Installing Advisor XE Command line interface component... done

--------------------------------------------------------------------------------

Installing Advisor XE Graphical user interface component... done

--------------------------------------------------------------------------------

Installing Intel Fortran Compiler XE 13.1 on Intel(R) 64 component... done

--------------------------------------------------------------------------------

Installing Intel C++ Compiler XE 13.1 on Intel(R) 64 component... done

--------------------------------------------------------------------------------

Installing Intel Debugger 13.0 on Intel(R) 64 component... done

--------------------------------------------------------------------------------

Installing Intel Math Kernel Library 11.0 Update 2 on Intel(R) 64 component... done

--------------------------------------------------------------------------------

Installing Intel Integrated Performance Primitives 7.1 Update 1 on Intel(R) 64 component... done

--------------------------------------------------------------------------------

Installing Intel Threading Building Blocks 4.1 Update 2 core files and examples component... done

--------------------------------------------------------------------------------

Finalizing installation... done

Step no: 7 of 7 | Complete

--------------------------------------------------------------------------------

Thank you for installing and using the

Intel(R) Parallel Studio XE 2013 Update 2 for Linux*

Reminder: Intel(R) VTune(TM) Amplifier XE users must be members of the "vtune"

permissions group in order to use Event-based Sampling.

To register your product purchase, visit

https://registrationcenter.intel.com/RegCenter/registerexpress.aspx?media=5G9

To get started using Intel(R) VTune(TM) Amplifier XE 2013 Update 4:

- To set your environment variables: source

/opt/intel/vtune_amplifier_xe_2013/amplxe-vars.sh

- To start the graphical user interface: amplxe-gui

- To use the command-line interface: amplxe-cl

- For more getting started resources: /opt/intel/vtune_amplifier_xe_2013/

documentation/en/welcomepage/get_started.html.

To get started using Intel(R) Inspector XE 2013 Update 4:

- To set your environment variables: source

/opt/intel/inspector_xe_2013/inspxe-vars.sh

- To start the graphical user interface: inspxe-gui

- To use the command-line interface: inspxe-cl

- For more getting started resources: /opt/intel/inspector_xe_2013/

documentation/en/welcomepage/get_started.html.

To get started using Intel(R) Advisor XE 2013 Update 2:

- To set your environment variables: source

/opt/intel/advisor_xe_2013/advixe-vars.sh

- To start the graphical user interface: advixe-gui

- To use the command-line interface: advixe-cl

- For more getting started resources: /opt/intel/advisor_xe_2013/

documentation/en/welcomepage/get_started.html.

To get started using Intel(R) Composer XE 2013 Update 2 for Linux*:

- Set the environment variables for a terminal window using one of the

following (replace "intel64" with "ia32" if you are using a 32-bit

platform).

For csh/tcsh:

$ source /opt/intel/bin/compilervars.csh intel64

For bash:

$ source /opt/intel/bin/compilervars.sh intel64

To invoke the installed compilers:

For C++: icpc

For C: icc

For Fortran: ifort

To get help, append the -help option or precede with the man command.

- For more getting started resources:

/opt/intel/composer_xe_2013/Documentation/en_US/get_started_lc.htm.

/opt/intel/composer_xe_2013/Documentation/en_US/get_started_lf.htm.

To view movies and additional training, visit

http://www.intel.com/software/products.

--------------------------------------------------------------------------------

q. Quit [default]

--------------------------------------------------------------------------------

Please type a selection or press "Enter" to accept default choice [q]: q

[root@hpc parallel_studio_xe_2013_update2_intel64]#

13)安装完成后设置环境变量

在/etc/profile文件的末尾加入如下命令,重新登录后生效。

source /opt/intel/bin/compilervars.sh intel64

14)确认安装成功

[root@hpc ~]# icc -v

icc version 13.1.0 (gcc version 4.4.6 compatibility)

2、安装openmpi

1)上传安装文件openmpi-1.6.5.tar.bz2,解压缩并进入安装目录

tar xvf openmpi-1.6.5.tar.bz2

cd openmpi-1.6.5

2)使用configure配置,prefix指定安装目录,后面的CC、CXX、FC、F77指定使用intel编译器作为接口

./configure --prefix=/opt/openmpi-165 CC=icc CXX=icpc FC=ifort F77=ifort

3)开始编译,可以使用-j后面跟数字进行多核编译,能减少编译时间。

make –j4

4)编译完成后,使用make install安装到指定的目录

make install

5)设置环境变量

      在/etc/profile文件末尾加入如下行,重新登录后生效。

      export MPI_HOME=/opt/openmpi-165
      export PATH=$MPI_HOME/bin:$PATH
      export LD_LIBRARY_PATH=$MPI_HOME/lib:$LD_LIBRARY_PATH

6)确认安装成功

      [root@hpc ~]# which mpicc
      /opt/openmpi-165/bin/mpicc
      [root@hpc ~]# mpicc -v
      icc version 13.1.0 (gcc version 4.4.6 compatibility)

3、intelmpi

1)上传安装程序l_mpi_p_4.1.0.024.tgz和license,可使用ssh工具传输。

2)解压缩安装程序并进入程序目录

tar xvf l_mpi_p_4.1.0.024.tgz

cd l_mpi_p_4.1.0.024

3)开始安装、欢迎界面

./install

Step no: 1 of 6 | Welcome

--------------------------------------------------------------------------------

Welcome to the Intel(R) MPI Library for Linux* OS version 4.1.

--------------------------------------------------------------------------------

You will complete the steps below during this installation:

Step 1 : Welcome

Step 2 : License

Step 3 : Activation

Step 4 : Options

Step 5 : Installation

Step 6 : Complete

--------------------------------------------------------------------------------

Press "Enter" key to continue or "q" to quit:

4)接受license

5)使用license文件激活

Step no: 3 of 6 | Activation

--------------------------------------------------------------------------------

If you have purchased this product and have the serial number and a connection

to the internet you can choose to activate the product at this time. Activation

is a secure and anonymous one-time process that verifies your software licensing

rights to use the product. Alternatively, you can choose to evaluate the

product or defer activation by choosing the evaluate option. Evaluation software

will time out in about one month. Also you can use license file, license

manager, or the system you are installing on does not have internet access

activation options.

--------------------------------------------------------------------------------

1. I want to activate my product using a serial number [default]

2. I want to evaluate my product or activate later

3. I want to activate either remotely, or by using a license file, or by using a license manager

h. Help

b. Back to the previous menu

q. Quit

--------------------------------------------------------------------------------

Please type a selection or press "Enter" to accept default choice [1]:

6)指定激活文件

Step no: 3 of 6 | Activation > Advanced activation

--------------------------------------------------------------------------------

You can use license file, license manager, or the system you are installing on

does not have internet access activation options.

--------------------------------------------------------------------------------

1. Use a different computer with internet access [default]

2. Use a license file

3. Use a license server

h. Help

b. Back to the previous menu

q. Quit

--------------------------------------------------------------------------------

Please type a selection or press "Enter" to accept default choice [1]: 2

Note: Press "Enter" key to back to the previous menu.

Please type the full path to your license file(s): /root/l_mpi_p_4.1.0.024/intel_mpi.lic

--------------------------------------------------------------------------------

Activation completed successfully.

--------------------------------------------------------------------------------

Press "Enter" key to continue:

7)选择安装目录和安装的组件,此处默认安装

Step no: 4 of 6 | Options

--------------------------------------------------------------------------------

You are now ready to begin installation. You can use all default installation

settings by simply choosing the "Start installation Now" option or you can

customize these settings by selecting any of the change options given below

first. You can view a summary of the settings by selecting

"Show pre-install summary".

--------------------------------------------------------------------------------

1. Start installation Now

2. Change install directory [ /opt/intel/impi/4.1.0.024 ]

3. Change advanced options [ Current node ]

4. Show pre-install summary

h. Help

b. Back to the previous menu

q. Quit

--------------------------------------------------------------------------------

Please type a selection or press "Enter" to accept default choice [1]:

Step no: 6 of 6 | Complete

--------------------------------------------------------------------------------

Thank you for installing and for using the Intel(R) MPI Library for Linux* OS

version 4.1.

Support services start from the time you install or activate your product. If

you have not already done so, please create your support account now to take

full advantage of your product purchase.

Your support account gives you access to free product updates and upgrades as

well as interactive technical support at Intel(R) Premier Support.

To create your support account, please visit the Subscription Services web site

https://registrationcenter.intel.com/RegCenter/registerexpress.aspx?media=L96.

--------------------------------------------------------------------------------

q. Quit [default]

--------------------------------------------------------------------------------

Please type a selection or press "Enter" to accept default choice [q]: q

[root@hpc l_mpi_p_4.1.0.024]#

8)设置环境变量

在/etc/profile文件末尾加入如下行,重新登录后生效。

source /opt/intel/impi/4.1.0/bin64/mpivars.sh

9)确认安装成功

      [root@hpc ~]# which mpiicc
      /opt/intel/impi/4.1.0.024/intel64/bin/mpiicc
      [root@hpc ~]# mpiicc -v
      mpiicc for the Intel(R) MPI Library 4.1 for Linux*
      Copyright(C) 2003-2012, Intel Corporation.  All rights reserved.
      icc version 13.1.0 (gcc version 4.4.6 compatibility)

一般我们配置自己熟悉的mpi为默认设置,所以可以再/etc/profile中注释掉不常用的mpi,打开常用的mpi,如有需要可以临时添加或者修改/etc/profile文件后重新登录,使用#注释,如下:

复制代码

      #setting for intel compiler and mpi
      source /opt/intel/bin/compilervars.sh intel64
      source /opt/intel/impi/4.1.0/bin64/mpivars.sh

      #setting for openmpi
      #export MPI_HOME=/opt/openmpi-165
      #export PATH=$MPI_HOME/bin:$PATH
      #export LD_LIBRARY_PATH=$MPI_HOME/lib:$LD_LIBRARY_PATH

复制代码​​​​​​​

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值