搭建高性能計算環境(三)、安裝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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM