Development/Intel Compiler: Difference between revisions
m (→Loading) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{| width=600px class="wikitable" |
|||
<!--{| align="right" {{Table|width=40%}} --> |
|||
{|{{Softwarebox}} |
|||
|- |
|- |
||
! Description !! Content |
|||
! colspan="2" style="text-align:center" | Intel Compiler |
|||
|- |
|- |
||
| module load |
| module load |
||
| compiler/intel |
| compiler/intel |
||
|- |
|||
| Availability |
|||
| [[bwUniCluster]] | [[BwForCluster_Chemistry]] |
|||
|- |
|- |
||
| License |
| License |
||
| |
| |
||
|- |
|- |
||
|Citing |
|Citing |
||
| |
| n/a |
||
|- |
|- |
||
| Links |
| Links |
||
| [https://software.intel.com/en-us/c-compilers Homepage] |
| [https://software.intel.com/en-us/c-compilers Intel C-Compiler Homepage] |
||
| |
|||
|- |
|- |
||
| Graphical Interface |
| Graphical Interface |
||
| No |
| No |
||
|- |
|- |
||
| Included |
| Included modules |
||
| icc |
| icc | icpc | ifort | idb |
||
|} |
|} |
||
<br> |
|||
= Introduction = |
|||
The '''Intel Compiler''' of the '''Intel Composer XE Suite''' consists of tools to compile and debug C, C++ and Fortran programs: |
The '''Intel Compiler''' of the '''Intel Composer XE Suite''' consists of tools to compile and debug C, C++ and Fortran programs: |
||
{| width=400px class="wikitable" |
|||
{| border="1" style="margin:5px;border-collapse:collapse" |
|||
|- |
|- |
||
|style="padding:3px"| icc |
|style="padding:3px"| icc |
||
|style="padding:3px"| Intel C compiler |
|style="padding:3px"| Intel C compiler |
||
|- |
|- |
||
|style="padding:3px"| icpc |
|style="padding:3px"| icpc |
||
Line 42: | Line 44: | ||
|style="padding:3px"| Intel debugger in console mode |
|style="padding:3px"| Intel debugger in console mode |
||
|} |
|} |
||
<br> |
|||
Aside from that the suite also includes the TBB (Threading Building Blocks) and IPP (Integrated Performance Primitives) libraries. |
Aside from that the suite also includes the TBB (Threading Building Blocks) and IPP (Integrated Performance Primitives) libraries. |
||
<br> |
|||
= Versions and Availability = |
|||
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the |
|||
<br> |
|||
<big> |
|||
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS] |
|||
== Loading == |
|||
There are different versions of the Intel compilers installed. To get a list of these installations execute the following command: |
|||
<pre>$ module avail compiler/intel</pre> |
|||
There is a default version which will be loaded when no version is explicitly specified, so the command |
|||
<pre>$ module load compiler/intel</pre> |
|||
will load the default version. |
|||
</big> |
|||
A current list of the versions available on the bwUniCluster and bwForClusters can be obtained from the [https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System] or here:{{#widget:Iframe |
|||
{{#widget:Iframe |
|||
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel |
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel |
||
|width=99% |
|width=99% |
||
|height= |
|height=480 |
||
|border=0 |
|||
}} |
}} |
||
On the command line interface of any bwHPC cluster you'll get a list of available versions |
|||
by using the command 'module avail compiler/intel'. |
|||
<pre> |
|||
$ : bwUniCluster |
|||
$ module avail compiler/intel |
|||
------------------------ /opt/bwhpc/common/modulefiles ------------------------- |
|||
compiler/intel/12.1 compiler/intel/14.0 |
|||
compiler/intel/13.1 compiler/intel/15.0(default) |
|||
</pre> |
|||
<br> |
|||
== Loading the module == |
|||
=== Default Version === |
|||
You can load the default version of the Intel Compiler with the command |
|||
'module load compiler/intel'. |
|||
<pre> |
|||
$ module avail compiler/intel |
|||
------------------------ /opt/bwhpc/common/modulefiles ------------------------- |
|||
compiler/intel/12.1 compiler/intel/14.0 |
|||
compiler/intel/13.1 compiler/intel/15.0(default) |
|||
$ module load compiler/intel |
|||
$ module list |
|||
Currently Loaded Modulefiles: |
|||
1) compiler/intel/15.0(default) |
|||
</pre> |
|||
Here, we got the "default" version 15.0 (example). |
|||
<br> |
|||
The module will try to load modules it needs to function. |
|||
If loading the module fails, check if you have already loaded the module |
|||
with 'module list'. |
|||
<br> |
|||
=== Specific (newer or older) Version === |
|||
If you wish to load a specific (older or newer) version (if available), you can do so using e.g. |
|||
'module load compiler/intel/version' to load the version you desires. |
|||
<pre> |
|||
$ module avail compiler/intel |
|||
------------------------ /opt/bwhpc/common/modulefiles ------------------------- |
|||
compiler/intel/12.1 compiler/intel/14.0 |
|||
compiler/intel/13.1 compiler/intel/15.0(default) |
|||
$ module load compiler/intel/14.0 |
|||
$ module list |
|||
Currently Loaded Modulefiles: |
|||
1) compiler/intel/14.0 |
|||
</pre> |
|||
Intel C-Compiler "version 14.0" is loaded now (example). |
|||
<br> |
|||
<br> |
|||
= Intel C-Compiler-Specific Environments = |
|||
To see a list of all Intel C-Compiler environments set by the 'module load'-command use |
|||
'env | grep INTEL'. |
|||
<br> |
|||
Or use the command 'module show compiler/intel'. |
|||
<br> |
|||
Example (excerpt, default version) |
|||
<pre> |
|||
$ module show compiler/intel # output is revised |
|||
------------------------------------------------------------------- |
|||
/opt/bwhpc/common/modulefiles/compiler/intel/15.0: |
|||
[...] |
|||
INTEL_VERSION = 15.0.3 |
|||
INTEL_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 |
|||
INTEL_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 |
|||
INTEL_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 |
|||
INTEL_LIB_MIC = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic |
|||
INTEL_LIB_MICMPI = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic |
|||
INTEL_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include |
|||
INTEL_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US |
|||
INTEL_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US |
|||
GDB_VERSION = 15.0.3 |
|||
GDB_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64 |
|||
GDB_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/bin |
|||
GDB_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/libipt/intel64/lib |
|||
GDB_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/include |
|||
GDB_INF_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/info |
|||
GDB_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/man |
|||
ICC_VERSION = 15.0.3 |
|||
ICC_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 |
|||
ICC_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 |
|||
ICC_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 |
|||
ICC_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include |
|||
ICC_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US |
|||
ICC_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US |
|||
IFORT_VERSION = 15.0.3 |
|||
IFORT_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 |
|||
IFORT_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 |
|||
IFORT_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 |
|||
IFORT_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include |
|||
IFORT_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US |
|||
IFORT_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US |
|||
LANGUAGE_TERRITORY = en_US |
|||
PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64:$PATH |
|||
LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187:$LD_LIBRARY_PATH/composer_xe_2015.3.187/compiler/lib/intel64 |
|||
LD_RUN_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64:$LD_RUN_PATH |
|||
MIC_LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic:$MIC_LD_LIBRARY_PATH |
|||
MIC_LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic:$MIC_LD_LIBRARY_PATH |
|||
MIC_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic:$MIC_LIBRARY_PATH |
|||
MIC_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic:$MIC_LIBRARY_PATH |
|||
LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64:$LIBRARY_PATH |
|||
MANPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US:$MANPATH |
|||
NLSPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64/locale/%l_%t/%N:$NLSPATH |
|||
INTEL_PYTHONHOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/python/intel64:$INTEL_PYTHONHOME |
|||
PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/bin:$PATH |
|||
LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/libipt/intel64/lib:$LD_LIBRARY_PATH |
|||
MANPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/man:$MANPATH |
|||
INFOPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/info:$INFOPATH |
|||
NLSPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/locale/%l_%t/%N:$NLSPATH |
|||
INTEL_LICENSE_FILE = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/licenses |
|||
CC = icc |
|||
CXX = icpc |
|||
F77 = ifort |
|||
FC = ifort |
|||
F90 = ifort |
|||
TEST_MODULE_SCRIPT = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/install-doc/test-compiler-intel.sh |
|||
TEST_MODULE_NAME = compiler/intel/15.0 |
|||
[...] |
|||
</pre> |
|||
<br> |
|||
= Documentation = |
|||
== Online documentation == |
== Online documentation == |
||
http://software.intel.com/en-us/articles/intel-c-composer-xe-documentation |
[http://software.intel.com/en-us/articles/intel-c-composer-xe-documentation Intel C-Compiler Documentation] |
||
== Local documentation == |
== Local documentation == |
||
For version specific documentation see the help page of the module. For example |
For version specific documentation see the help page of the module. For example |
||
'module help compiler/intel' will show the information for the default version. |
|||
<pre>$ module help compiler/intel</pre> |
<pre>$ module help compiler/intel</pre> |
||
== Manual Pages == |
|||
will show the information for the default version. |
|||
For detailed lists of the different program options consult the particular man page |
For detailed lists of the different program options consult the particular man page |
||
<pre> |
<pre> |
||
$ man icc |
$ man icc |
||
Line 73: | Line 191: | ||
$ man idb |
$ man idb |
||
</pre> |
</pre> |
||
<br> |
|||
= Optimizations = |
|||
You can turn on various optimization options to enhance the performance of your program. Which options are the best depends on the specific program and can be determined by benchmarking your code. A command which gives good performance and a decent file size is |
You can turn on various optimization options to enhance the performance of your program. Which options are the best depends on the specific program and can be determined by benchmarking your code. A command which gives good performance and a decent file size is |
||
'''icc -xHost -O2 ex.c'''. |
|||
<br> |
|||
There are more aggressive optimization flags and levels (e.g. -O3 or -fast and implied options) but the compiled programs can get quite large due to inlining. Additionally the compilation process will probably take longer. Moreover it may happen that the compiled program is even slower -- or may require installation of additional statically-linked libraries. Such a command would be for example: |
There are more aggressive optimization flags and levels (e.g. -O3 or -fast and implied options) but the compiled programs can get quite large due to inlining. Additionally the compilation process will probably take longer. Moreover it may happen that the compiled program is even slower -- or may require installation of additional statically-linked libraries. Such a command would be for example: |
||
'''icc -fast ex.c''' |
|||
<br> |
|||
= Profiling = |
|||
Profiling an application means augmenting the compiled binary with information on execution counts per source-line (and basic blocks) -- e.g. one may see how many times an if-statement has been evaluated to true. To do so, compile your code with the profile flag: |
Profiling an application means augmenting the compiled binary with information on execution counts per source-line (and basic blocks) -- e.g. one may see how many times an if-statement has been evaluated to true. To do so, compile your code with the profile flag: |
||
'''icc -p ex.c -o ex'''. |
|||
<br> |
|||
Using the gprof tool, one may manually inspect execution count of each executed line of source code. |
Using the gprof tool, one may manually inspect execution count of each executed line of source code. |
||
<br> |
|||
For compiler optimization, recompile Your source using |
For compiler optimization, recompile Your source using |
||
'''icc -prof-gen ex.c -o ex''' |
|||
then execute the most common and typical use-case of |
then execute the most common and typical use-case of your application, and then recompile using the generated profile count (and using optimization): |
||
'''icc -prof-use -O2 ex.c -o ex'''. |
|||
<br> |
|||
== Further literature == |
== Further literature == |
||
A tutorial on optimization can be found at https://software.intel.com/sites/default/files/managed/c1/61/compiler-essentials.1.pdf |
A tutorial on optimization can be found at https://software.intel.com/sites/default/files/managed/c1/61/compiler-essentials.1.pdf |
||
and to get the different optimization options execute |
and to get the different optimization options execute |
||
'''icc -help opt''' |
|||
<pre> |
|||
'''icc -help advanced''' |
|||
<br> |
|||
$ icc -help advanced |
|||
or the previously described catch-all option '''''-v --help'''''. |
|||
</pre> |
|||
or the previously described catch-all option '''-v --help'''. |
|||
<!-- |
|||
[[Category:Compiler_software]][[Category:bwUniCluster]] |
[[Category:Compiler_software]][[Category:bwUniCluster]] |
||
--> |
Revision as of 10:59, 14 December 2015
Description | Content |
---|---|
module load | compiler/intel |
Availability | bwUniCluster | BwForCluster_Chemistry |
License | |
Citing | n/a |
Links | Intel C-Compiler Homepage |
Graphical Interface | No |
Included modules | icc | icpc | ifort | idb |
Introduction
The Intel Compiler of the Intel Composer XE Suite consists of tools to compile and debug C, C++ and Fortran programs:
icc | Intel C compiler |
icpc | Intel C++ compiler |
ifort | Intel Fortran compiler |
idb | Intel debugger in GUI mode |
idbc | Intel debugger in console mode |
Aside from that the suite also includes the TBB (Threading Building Blocks) and IPP (Integrated Performance Primitives) libraries.
Versions and Availability
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the
Cluster Information System CIS
{{#widget:Iframe |url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel |width=99% |height=480 }} On the command line interface of any bwHPC cluster you'll get a list of available versions by using the command 'module avail compiler/intel'.
$ : bwUniCluster $ module avail compiler/intel ------------------------ /opt/bwhpc/common/modulefiles ------------------------- compiler/intel/12.1 compiler/intel/14.0 compiler/intel/13.1 compiler/intel/15.0(default)
Loading the module
Default Version
You can load the default version of the Intel Compiler with the command 'module load compiler/intel'.
$ module avail compiler/intel ------------------------ /opt/bwhpc/common/modulefiles ------------------------- compiler/intel/12.1 compiler/intel/14.0 compiler/intel/13.1 compiler/intel/15.0(default) $ module load compiler/intel $ module list Currently Loaded Modulefiles: 1) compiler/intel/15.0(default)
Here, we got the "default" version 15.0 (example).
The module will try to load modules it needs to function.
If loading the module fails, check if you have already loaded the module
with 'module list'.
Specific (newer or older) Version
If you wish to load a specific (older or newer) version (if available), you can do so using e.g. 'module load compiler/intel/version' to load the version you desires.
$ module avail compiler/intel ------------------------ /opt/bwhpc/common/modulefiles ------------------------- compiler/intel/12.1 compiler/intel/14.0 compiler/intel/13.1 compiler/intel/15.0(default) $ module load compiler/intel/14.0 $ module list Currently Loaded Modulefiles: 1) compiler/intel/14.0
Intel C-Compiler "version 14.0" is loaded now (example).
Intel C-Compiler-Specific Environments
To see a list of all Intel C-Compiler environments set by the 'module load'-command use
'env | grep INTEL'.
Or use the command 'module show compiler/intel'.
Example (excerpt, default version)
$ module show compiler/intel # output is revised ------------------------------------------------------------------- /opt/bwhpc/common/modulefiles/compiler/intel/15.0: [...] INTEL_VERSION = 15.0.3 INTEL_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 INTEL_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 INTEL_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 INTEL_LIB_MIC = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic INTEL_LIB_MICMPI = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic INTEL_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include INTEL_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US INTEL_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US GDB_VERSION = 15.0.3 GDB_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64 GDB_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/bin GDB_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/libipt/intel64/lib GDB_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/include GDB_INF_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/info GDB_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/man ICC_VERSION = 15.0.3 ICC_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 ICC_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 ICC_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 ICC_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include ICC_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US ICC_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US IFORT_VERSION = 15.0.3 IFORT_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 IFORT_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 IFORT_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 IFORT_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include IFORT_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US IFORT_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US LANGUAGE_TERRITORY = en_US PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64:$PATH LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187:$LD_LIBRARY_PATH/composer_xe_2015.3.187/compiler/lib/intel64 LD_RUN_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64:$LD_RUN_PATH MIC_LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic:$MIC_LD_LIBRARY_PATH MIC_LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic:$MIC_LD_LIBRARY_PATH MIC_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic:$MIC_LIBRARY_PATH MIC_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic:$MIC_LIBRARY_PATH LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64:$LIBRARY_PATH MANPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US:$MANPATH NLSPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64/locale/%l_%t/%N:$NLSPATH INTEL_PYTHONHOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/python/intel64:$INTEL_PYTHONHOME PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/bin:$PATH LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/libipt/intel64/lib:$LD_LIBRARY_PATH MANPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/man:$MANPATH INFOPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/info:$INFOPATH NLSPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/locale/%l_%t/%N:$NLSPATH INTEL_LICENSE_FILE = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/licenses CC = icc CXX = icpc F77 = ifort FC = ifort F90 = ifort TEST_MODULE_SCRIPT = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/install-doc/test-compiler-intel.sh TEST_MODULE_NAME = compiler/intel/15.0 [...]
Documentation
Online documentation
Intel C-Compiler Documentation
Local documentation
For version specific documentation see the help page of the module. For example 'module help compiler/intel' will show the information for the default version.
$ module help compiler/intel
Manual Pages
For detailed lists of the different program options consult the particular man page
$ man icc $ man icpc $ man ifort $ man idb
Optimizations
You can turn on various optimization options to enhance the performance of your program. Which options are the best depends on the specific program and can be determined by benchmarking your code. A command which gives good performance and a decent file size is
icc -xHost -O2 ex.c.
There are more aggressive optimization flags and levels (e.g. -O3 or -fast and implied options) but the compiled programs can get quite large due to inlining. Additionally the compilation process will probably take longer. Moreover it may happen that the compiled program is even slower -- or may require installation of additional statically-linked libraries. Such a command would be for example:
icc -fast ex.c
Profiling
Profiling an application means augmenting the compiled binary with information on execution counts per source-line (and basic blocks) -- e.g. one may see how many times an if-statement has been evaluated to true. To do so, compile your code with the profile flag:
icc -p ex.c -o ex.
Using the gprof tool, one may manually inspect execution count of each executed line of source code.
For compiler optimization, recompile Your source using
icc -prof-gen ex.c -o ex
then execute the most common and typical use-case of your application, and then recompile using the generated profile count (and using optimization):
icc -prof-use -O2 ex.c -o ex.
Further literature
A tutorial on optimization can be found at https://software.intel.com/sites/default/files/managed/c1/61/compiler-essentials.1.pdf
and to get the different optimization options execute
icc -help opt
icc -help advanced
or the previously described catch-all option -v --help.