Toolserver:Intel compilers

From mediawiki.org

This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it to a normal title and leave a redirect.

Getting started
Note: nightshade will be converted to Solaris on January 3rd, 2011, after which the Intel compilers will no longer be available.

This page describes how to use the Intel C, C++ and FORTRAN compilers on the toolserver (on nightshade).

License[edit]

The Intel compilers require a license to use. You can get a free license if you are using it for non-commercial purposes (this includes most toolserver users).

  1. Go to http://www.intel.com/cd/software/products/asmo-na/eng/340679.htm
  2. Click "IntelÂŽ C++ Compiler Professional Edition for Linux"
  3. Fill in the form and submit it.
  4. You will be taken to a download page. Don't download anything.
  5. Intel will send you mail with the license file (named *.lic) attached. Create a directory $HOME/intel/licenses/ on nightshade, and copy the file there. The compiler should now work.

Environment setup[edit]

For Bourne shell users (bash, ksh, zsh):

  • Add this line to your shell rc file (e.g. ~/.profile):
 . /opt/intel/cce/10.1.015/bin/iccvars.sh
 . /opt/intel/idbe/10.1.015/bin/idbvars.sh
 . /opt/intel/fce/10.1.015/bin/ifortvars.sh

For C shell users (csh, tcsh):

  • Add this line to your shell rc file (e.g. ~/.login):
 source /opt/intel/cce/10.1.015/bin/iccvars.csh
 source /opt/intel/idbe/10.1.015/bin/idbvars.csh
 source /opt/intel/fce/10.1.015/bin/ifortvars.csh

Login again, and test the compiler:

$ icc -V
Intel(R) C Compiler for applications running on Intel(R) 64, Version 10.1    Build 20080312 Package ID: l_cc_p_10.1.015

Compiling[edit]

The C compiler is icc:

$ icc myprogram.c -o myprogram

The C++ compiler is icpc:

$ icpc myprogram.cc -o myprogram

The FORTRAN compiler is ifort:

$ ifort myprogram.f90 -o myprogram

Category:Documentation