Actions

Difference between revisions of "Compilers"

From Montana Tech High Performance Computing

Line 1: Line 1:
 
[[Category:System]]
 
[[Category:System]]
We have installed some pre-packaged popular compilers, development tools and libraries provided by OpenHPC. Currently, there are three compilers installed:
+
Our HPC system features pre-installed, widely-used compilers, development tools, and libraries from OpenHPC. Presently, there are three primary compilers available:
 
* GNU9
 
* GNU9
 
* GNU12
 
* GNU12
 
* Intel
 
* Intel
There are multiple builds of the tools and libraries for each compiler. When you log on HPC, the default development environement loaded is GNU12+OPENMPI4.  
+
For each compiler, multiple builds of tools and libraries are provided. Upon logging in to the HPC system, the default development environment is set to GNU12 + OPENMPI4.
 +
To change to a different compiler, utilize the <code>module swap</code>command, for example:
 +
: <code>module swap gnu12 gnu9</code> ->switch from GNU12 to GNU9
 +
: <code>module swap gnu12 intel</code> ->switch from GNU12 to GNU9
  
There are currently 3 versions of gnu gcc (which includes g++ and gfortran) installed on the system. The default compiler is version 4.8.5 which comes with the Centos 7.3 distribution. Use the [[modules]] command to load the other compilers (version 5.4.0, 4.9.3 and 6.3.0)
+
In addition to the compilers, our HPC system also offers a variety of development tools and libraries to facilitate efficient and effective programming. These resources are designed to work seamlessly with the available compilers. You can use conveniently use the [[modules]] command to manage your development environment.
===Example Commands===
 
: <code>module avail</code> ->lists available modules on the system
 
: <code>module listing</code> ->lists the modules a user currently has loaded
 
: <code>module load gcc/4.9.3</code> ->load the gcc package
 
===Intel Compiler (Needs updating)===
 
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.
 
 
 
https://software.intel.com/en-us/non-commercial-software-development
 
 
 
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.
 
 
 
rm /data/username/parallel_studio_xe_2013_sp1_update2.tgz
 
 
 
 
 
Now, there should be a new folder called ‘parallel_studio_xe_2013_sp1_update2’. Go to that folder.
 
 
 
cd parallel_studio_xe_2013_sp1_update2
 
 
 
 
 
4. Installation
 
 
 
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 [1]:
 
 
 
----
 
 
 
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
 

Revision as of 11:26, 18 April 2023

Our HPC system features pre-installed, widely-used compilers, development tools, and libraries from OpenHPC. Presently, there are three primary compilers available:

  • GNU9
  • GNU12
  • Intel

For each compiler, multiple builds of tools and libraries are provided. Upon logging in to the HPC system, the default development environment is set to GNU12 + OPENMPI4. To change to a different compiler, utilize the module swapcommand, for example:

module swap gnu12 gnu9 ->switch from GNU12 to GNU9
module swap gnu12 intel ->switch from GNU12 to GNU9

In addition to the compilers, our HPC system also offers a variety of development tools and libraries to facilitate efficient and effective programming. These resources are designed to work seamlessly with the available compilers. You can use conveniently use the modules command to manage your development environment.