Intel Compilers

The Intel compilers for both C/C++ and FORTRAN.

Availability and Restrictions

The versions currently available at OSC are:

Version Oakley Ruby owens notes
12.1.4.319 X     Default version on Oakley prior to 09/15/2015
13.1.3.192 X      
14.0.0.080 X      
14.0.3   X    
15.0.0   X   Default version on Ruby prior to 09/15/2015
15.0.1   X    
15.0.3 X* X*    
16.0.3     X*  
* : Current Default Version

You can use module avail intel  to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.

Access

The Intel Compilers are available to all OSC users without restriction.

Usage

Usage on Oakley

Set-up on Oakley

After you ssh to Oakley, the default version of Intel compilers will be loaded for you automatically. To configure your environment for a particular Intel compilers version, use  module swap intel/12.1.4.39 intel/version . For example, use  module swap intel/12.1.4.39 intel/14.0.0.080  to load Intel  compilers 14.0.0.080 on Oakley.

Using the Intel Compilers

Once the intel compiler module has been loaded, the compilers are available for your use. The following table lists common compiler options available in all languages.

Compiler option Purpose
-c Compile only; do not link
-DMACRO[=value] Defines preprocessor macro MACRO with optional value (default value is 1)
-g Enables debugging; disables optimization
-I/directory/name Add /directory/name to the list of directories to be searched for #include files
-L/directory/name Adds /directory/name to the list of directories to be searched for library files
-lname Adds the library libname.a or libname.so to the list of libraries to be linked
-o outfile Names the resulting executable outfile instead of a.out
-UMACRO Removes definition of MACRO from preprocessor
-O0 Disable optimization
-O1 Light optimization
-O2 Heavy optimization (default)
-O3 Aggressive optimization; may change numerical results
-ipo Inline function expansion for calls to procedures defined in separate files
-funroll-loops Loop unrolling
-parallel Automatic parallelization
-openmp Enables translation of OpenMP directives

The following table lists some options specific to C/C++

-strict-ansi Enforces strict ANSI C/C++ compliance
-ansi Enforces loose ANSI C/C++ compliance

The following table lists some options specific to Fortran

-convert big_endian Use unformatted I/O compatible with Sun and SGI systems
-convert cray Use unformatted I/O compatible with Cray systems
-i8 Makes 8-byte INTEGERs the default
-module /dir/name Adds /dir/name to the list of directories searched for Fortran 90 modules
-r8 Makes 8-byte REALs the default
-fp-model strict Disables optimizations that can change the results of floating point calculations

Some parts of the C++11 standard are available by default in various versions of the Intel compilers; others require you to load an extra module. 

With the Intel 14 or 15 compilers:

module load cxx11

See our compilation guide for suggestions on how to compile your software on our systems.

Batch Usage on Oakley

When you log into oakley.osc.edu you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your job to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info.  Batch jobs run on the compute nodes of the system and not on the login node. It is desirable for big problems since more resources can be used.

Interactive Batch Session
For an interactive batch session on Oakley, one can run the following command:
qsub -I -l nodes=1:ppn=12 -l walltime=1:00:00
which gives you 12 cores ( -l nodes=1:ppn=12 ) with 1 hour ( -l walltime=1:00:00 ). You may adjust the numbers per your need.
Non-interactive Batch Job (Serial Run)
A batch script can be created and submitted for a serial or parallel run. You can create the batch script using any text editor you like in a working directory on the system of your choice. The following example batch script file will use the input file named hello.c  and the output file named hello_results . Below is the example batch script ( job.txt ) for a serial run:
#PBS -l walltime=1:00:00
#PBS -l nodes=1:ppn=12
#PBS -N jobname
#PBS -j oe
cd $PBS_O_WORKDIR
module load intel
cp hello.c $TMPDIR
cd $TMPDIR
icc -O2 hello.c -o hello
./hello > hello_results
cp hello_results $PBS_O_WORKDIR

In order to run it via the batch system, submit the job.txt  file with the following command:

qsub job.txt
Non-interactive Batch Job (Parallel Run)
Below is the example batch script ( job.txt ) for a parallel run:
#PBS -l walltime=1:00:00
#PBS -l nodes=2:ppn=12
#PBS -N jobname
#PBS -j oe
cd $PBS_O_WORKDIR
module load intel
mpicc -O2 hello.c -o hello
pbsdcp hello $TMPDIR
cd $TMPDIR
mpiexec hello > hello_results
pbsdcp -g hello_results $PBS_O_WORKDIR

Usage on Ruby

Set-up on Ruby

After you ssh to Ruby, the default version of Intel compilers will be loaded for you automatically. To configure your environment for a particular Intel compilers version, use module swap intel/15.0.0 intel/version . For example, use  module swap intel/15.0.0 intel/15.0.1  to load Intel  compilers 15.0.1 on Ruby.

Using the Intel Compilers

Once the intel compiler module has been loaded, the compilers are available for your use. The following table lists common compiler options available in all languages.

Compiler option Purpose
-c Compile only; do not link
-DMACRO[=value] Defines preprocessor macro MACRO with optional value (default value is 1)
-g Enables debugging; disables optimization
-I/directory/name Add /directory/name to the list of directories to be searched for #include files
-L/directory/name Adds /directory/name to the list of directories to be searched for library files
-lname Adds the library libname.a or libname.so to the list of libraries to be linked
-o outfile Names the resulting executable outfile instead of a.out
-UMACRO Removes definition of MACRO from preprocessor
-O0 Disable optimization
-O1 Light optimization
-O2 Heavy optimization (default)
-O3 Aggressive optimization; may change numerical results
-ipo Inline function expansion for calls to procedures defined in separate files
-funroll-loops Loop unrolling
-parallel Automatic parallelization
-openmp Enables translation of OpenMP directives

The following table lists some options specific to C/C++

-strict-ansi Enforces strict ANSI C/C++ compliance
-ansi Enforces loose ANSI C/C++ compliance

The following table lists some options specific to Fortran

-convert big_endian Use unformatted I/O compatible with Sun and SGI systems
-convert cray Use unformatted I/O compatible with Cray systems
-i8 Makes 8-byte INTEGERs the default
-module /dir/name Adds /dir/name to the list of directories searched for Fortran 90 modules
-r8 Makes 8-byte REALs the default
-fp-model strict Disables optimizations that can change the results of floating point calculations

Some parts of the C++11 standard are available by default in various versions of the Intel compilers; others require you to load an extra module. 

With the Intel 14 or 15 compilers:

module load cxx11

See our compilation guide for suggestions on how to compile your software on our systems.

Batch Usage on Ruby

When you log into ruby.osc.edu you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your job to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info. 

Interactive Batch Session
For an interactive batch session on Ruby, one can run the following command:
qsub -I -l nodes=1:ppn=20 -l walltime=1:00:00
which gives you 20 cores ( -l nodes=1:ppn=20 ) with 1 hour ( -l walltime=1:00:00 ). You may adjust the numbers per your need.
Non-interactive Batch Job (Serial Run)
batch script can be created and submitted for a serial or parallel run. You can create the batch script using any text editor you like in a working directory on the system of your choice. The following example batch script file will use the input file named  hello.c  and the output file named  hello_results . Below is the example batch script ( job.txt ) for a serial run:
#PBS -l walltime=1:00:00
#PBS -l nodes=1:ppn=20
#PBS -N jobname
#PBS -j oe
cd $PBS_O_WORKDIR
module load intel
cp hello.c $TMPDIR
cd $TMPDIR
icc -O2 hello.c -o hello
./hello > hello_results
cp hello_results $PBS_O_WORKDIR

In order to run it via the batch system, submit the job.txt  file with the following command:

qsub job.txt
Non-interactive Batch Job (Parallel Run)
Below is the example batch script (  job.txt   for a parallel run:
#PBS -l walltime=1:00:00
#PBS -l nodes=2:ppn=20
#PBS -N jobname
#PBS -j oe
cd $PBS_O_WORKDIR
module load intel
mpicc -O2 hello.c -o hello
cp hello $TMPDIR
cd $TMPDIR
mpiexec ./hello > hello_results
cp hello_results $PBS_O_WORKDIR​

Usage on Owens

Set-up on Owens

After you ssh to Owens, the default version of Intel compilers will be loaded for you automatically. 

Using the Intel Compilers

Once the intel compiler module has been loaded, the compilers are available for your use. The following table lists common compiler options available in all languages.

COMPILER OPTION PURPOSE
-c  Compile only; do not link
-DMACRO[=value]  Defines preprocessor macro MACRO with optional value (default value is 1)
-g  Enables debugging; disables optimization
-I/directory/name  Add /directory/name to the list of directories to be searched for #include files
-L/directory/name  Adds /directory/name to the list of directories to be searched for library files
-lname Adds the library libname.a or libname.so to the list of libraries to be linked
-o outfile  Names the resulting executable outfile instead of a.out
-UMACRO  Removes definition of MACRO from preprocessor
-O0  Disable optimization
-O1  Light optimization
-O2  Heavy optimization (default)
-O3  Aggressive optimization; may change numerical results
-ipo  Inline function expansion for calls to procedures defined in separate files
-funroll-loops  Loop unrolling
-parallel  Automatic parallelization
-openmp  Enables translation of OpenMP directives

The following table lists some options specific to C/C++

-strict-ansi  Enforces strict ANSI C/C++ compliance
-ansi  Enforces loose ANSI C/C++ compliance

The following table lists some options specific to Fortran

-convert big_endian  Use unformatted I/O compatible with Sun and SGI systems
-convert cray  Use unformatted I/O compatible with Cray systems
-i8  Makes 8-byte INTEGERs the default
-module /dir/name  Adds /dir/name to the list of directories searched for Fortran 90 modules
-r8  Makes 8-byte REALs the default
-fp-model strict  Disables optimizations that can change the results of floating point calculations

Some parts of the C++11 standard are available by default in various versions of the Intel compilers; others require you to load an extra module. 

With the Intel 14 or 15 compilers:

module load cxx11

See our compilation guide for suggestions on how to compile your software on our systems.

Batch Usage on Owens

When you log into owens.osc.edu you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your job to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info. 

Interactive Batch Session
For an interactive batch session on Owens, one can run the following command:
qsub -I -l nodes=1:ppn=28 -l walltime=1:00:00
which gives you 28 cores ( -l nodes=1:ppn=28 ) with 1 hour ( -l walltime=1:00:00 ). You may adjust the numbers per your need.
Non-interactive Batch Job (Serial Run)
batch script can be created and submitted for a serial or parallel run. You can create the batch script using any text editor you like in a working directory on the system of your choice. The following example batch script file will use the input file named  hello.c  and the output file named  hello_results . Below is the example batch script ( job.txt ) for a serial run:
#PBS -l walltime=1:00:00
#PBS -l nodes=1:ppn=28
#PBS -N jobname
#PBS -j oe
cd $PBS_O_WORKDIR
module load intel
cp hello.c $TMPDIR
cd $TMPDIR
icc -O2 hello.c -o hello
./hello > hello_results
cp hello_results $PBS_O_WORKDIR

In order to run it via the batch system, submit the job.txt  file with the following command:

qsub job.txt
Non-interactive Batch Job (Parallel Run)
Below is the example batch script (  job.txt   for a parallel run:
#PBS -l walltime=1:00:00
#PBS -l nodes=2:ppn=28
#PBS -N jobname
#PBS -j oe
cd $PBS_O_WORKDIR
module load intel
mpicc -O2 hello.c -o hello
cp hello $TMPDIR
cd $TMPDIR
mpiexec ./hello > hello_results
cp hello_results $PBS_O_WORKDIR​
 

Further Reading

See Also

Supercomputer: 
Service: 
Technologies: 
Fields of Science: