There are currently 4 versions of gnu gcc (which includes g++ and gfortran) installed on the system. The default compiler is version 4.4.7 which comes with the Centos 6.4 distribution. Use the modules command to load the other compilers (version 4.7.1, 4.9.3 and 5.2.0)
- module avail ->lists available modules on the system
- module listing ->lists the modules a user currently has loaded
- module load gcc/4.9.3 ->load the gcc package
The Intel Compiler suites offer industry-leading C/C++ and Fortran compilers, Intel Math Kernel Library (MKL), and optimization features and multithreading capabilities. The Intel compilers cannot be installed from root for all users without purchasing a site license, but if the user has purchased the license or the user qualifies for the non-commercial free license, the user may follow this article to install the Intel compiler in user’s own account.
1. Go to Intel non-commercial software development website and review the license agreement. If you meet the requirements for Intel non-commercial software development, you may click any product you want to install. Otherwise, you may have to obtain a paid license and go to step 3.
If you only need Intel Fortran, you may install ‘Intel Fortran Composer XE 2013 for Linux’ to save storage space. If you need both Intel Fortran and C++, you may install ‘Intel Parallel Studio XE 2013 for Linux’. This article explains the installation of the parallel studio which will consume up to 8GB space. The download size of the installation package is around 3.5GB. Therefore, you are recommended to have at least 12 GB free storage space and should install in your /data/username directory.
2. Register yourself and download the installation package.
The file name is similar to ‘parallel_studio_xe_2013_sp1_update2.tgz’. Assume your logon name is ‘username’ and your affiliation is ‘mtech’, and your home directory is ‘/home/mtech/username/’. Upload the installation package to your home directory. We recommend you to use wget command to download the package directly from the HPC side to save time. Now the installation package is located at /home/mtech/username/parallel_studio_xe_2013_sp1_update2.tgz
3. Extract the installation package
Go to your /data directory. cd /data/username
Extract the package tar zxvf parallel_studio_xe_2013_sp1_update2.tgz
Once the extraction is done, you may choose to delete the installation package to free some space.
Now, there should be a new folder called ‘parallel_studio_xe_2013_sp1_update2’. Go to that folder.
Execute the installation script. ./install.sh
Follow the prompt on the screen.
On the following screen, type ‘3’ and press ENTER.
Please make your selection by entering an option. Root access is recommended for evaluation.
1. Run as a root for system wide access for all users [default] 2. Run using sudo privileges and password for system wide access for all users 3. Run as current user to limit access to user level
h. Help q. Quit
Please type a selection :
The User may choose to use the default selections for all the remaining steps. The required serial number is provided in the email.
5. Environment variable setting
Go to your home directory cd ~
Edit the .bashrc file nano .bashrc (You may use any other text editor such as vi)
At the end of the .bashrc file, add the following three lines. You need to change ‘/data/username/’ to your username in the following three lines. You may also need to change ‘composer_xe_2013_sp1.2.144’ to the proper folder name of your installed version.
- /data/username/intel/bin/compilervars.sh intel64
- export PATH=$PATH:/data/username/intel/bin
- export LD_LIBRARY_PATH=/data/username/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/:$LD_LIBRARY_PATH
6. Clean up You may want to delete the installation folder created in step 3 to save storage space.
- rm -rf parallel_studio_xe_2013_sp1_update2
7. Log off the terminal and log on again. You are all set.
8.Uninstallation Simply delete the installed intel folder
- cd /data/username
- rm -rf intel