# Computing

This is a highly optimizing C (icc) and C++ (icpc) compiler.

Availability:

All managed Linux workstations, but use is logged and groups using the compiler are asked for a contribution towards the cost of renewing the licence each year. This is usually fairly modest. Contact support@ch.cam.ac.uk if you would like to see the most recent prices.

Instructions for users:

If you are using the modules environment then you just need to load the appropriate module. It may be loaded for you already. The name of the C compiler program (and of the module) is icc. This program will compile either C or C++. Loading the module also gives access to icpc which is the C++ only compiler.

There are usually multiple versions of the compiler installed on any given machine, as Intel release a new one fairly often. The modules allow you to easily switch between different versions (see the modules documentation).

You should never need to fiddle with the licence settings, because all versions of the compiler use the same licence server, and this is set up by the system login scripts. However for reference, the way to point the compiler at its licence server is to set INTEL_LICENSE_FILE to be 28518@flexlm.ch.cam.ac.uk.

Licence Details:

This is commercial licence-managed software. Intel allows students to register for a free single-user single-machine licence but this cannot cover everyone in the department; for example post docs are excluded. The department has therefore purchased an academic network licence. This allows anyone to use the compiler provided the licence server is available and has a free licence. You do not need the licence in order to run the binaries that the compiler produces, only to compile. You may redistribute the binaries produced, and you may also redistribute with them certain runtime libraries from the compiler suite. A full list of redistributable files may be found in the licenses/credist.txt file in the compiler's install directory.

Documentation:

The compiler comes with manpages. You may need to load the module to make the manpage available. However most of the documentation is in HTML and PDF form in the doc subdirectory of the compiler's install directory. You will have to use a web browser or PDF reader to view it. A good place to start is the file ccompindex.html.

Source:

The compiler is downloadable from  https://software.intel.com/en-us/c-compilers .

### Version 11.1 and up

See ifort instructions for how to install this.

### Version 11.0

The way the compiler was distributed changed with version 11.0, which has changed the install location and the way we install.

1. Download the full install package, containing the compiler for both 32 and 64-bit machines
2. On a standard Linux workstation throw away the /usr/local/shared symlink and create a /usr/local/shared/intel directory. make it writable by your ordinary user account.
3. Make sure you have LM_LICENSE_FILE set to point to our licence server (if in doubt, load an icc module)
4. Unpack the compiler and run install.sh as your regular user account.
5. Select the option to ' Install as current user to limit access to user level'
6. Read and accept the licence
7. When prompted to select a licence, pick the option 'Use existing license'
8. Pick 'Custom install'
9. When offered the choice of Full or Custom install, pick Custom again
10. You will be offered a whole list of products to install. Select the 32 and 64-bit compilers and debuiggers, but deselect the Math Kernel Library, Threading Building Blocks, and Performance Primitives
11. When asked for a location give /usr/local/shared/intel/Compiler/11.0/074 (replacing the numbers with the appropriate ones for the compiler release)
12. If you are installing on OpenSuSE the prerequisite check will fail; select the 'Skip missing optional pre-requisites' option.
13. When the compiler has installed, install the Fortran compiler that goes with it and then run the /usr/local/shared/sbin/install-intel-11-compiler.sh script to fix up the compiler wrappers for both compilers.
14. Test the compiler with /usr/local/shared/sbin/testcompilers.sh
15. Copy the compiler up to the NFS server and remove the workstation copy; put the symlink back
16. Make modules for the compiler. You need to link them to the icc-11 and ifort-11 basefiles, not the icc and ifort ones
17. The debugger comes as part of the compiler and we don't install it separately so there is no need to make a debugger module. You do need to check the debugger works- it is quite likely not to as the Java JRE on the 64-bit workstations is a 32-bit binary (to go with the 32-bit Firefox to go with the 32-bit Flash player). In that case edit the idb script and add /usr/local/shared/java/x86_64/jre1.6.0_11/bin to the PATH variable. On the 32-bit clusters there is not a new enough JRE, so you also need to edit the 32-bit idb script and insert /usr/local/shared/java/i386/jre1.6.0_11/bin at the start of the PATH. I have fixed up the above installer script ot do this now.

### Versions below 11.0

The Intel compiler comes as RPMs. It also comes with an installer script. You cannot just install the RPMs because the installer script fixes up a few things that the RPMs should do but don't. It also checks that your licence is valid before installing (but has been known to get this completely wrong when using a network licence) and uninstalls the previous version of the compiler. All in all it is better not to use the install script but to read it through and do the various steps by hand. Here's how I do it currently, but the install script changes every so often so it pays to check what it's doing:

• Unpack the Intel tarball in a temporary directory, and then select the appropriate compiler RPM. Ones with 'icc' in the name are 32-bit, and 'icce' are 64-bit. Unpack it with
 # rpm2cpio filename.rpm | cpio -i --make-directories

This unpacks the compiler relative to the current working directory. It usually goes into opt/intel/cc/10.0.XX. Do the same with the appropriate intel-isubh and intel-icc_ide rpms. The isubh package has a file clash with the icc package and gives a harmless error message. Move the 10.0.XX directory to /usr/local/shared/intel/cc/.

• On SuSE 9.3 workstation and clusters:
• Edit the icc, icpc, iccvars.sh, iccvars.csh, icc.cfg, icpc.cfg files in /usr/local/intel_cc_version/bin to have the correct installation directory where they currently have INSTALLDIR.
• Edit icc.cfg and icpc.cfg to set rpath for the compiler appropriately, to avoid the need for LD_LIBRARY_PATH.
• On systems with modules add a test in the icc and icpc compiler scripts for the MKLPATH environment variable. If it is is set you need to add the MKLPATH to rpath and the appropriate -L option to the compiler command. You also need a -I for the include files, which are in MKLINCLUDE. Also make a module for the new compiler. See the modules documentation.
• Find the package ID from the compiler install script by grepping it for PACKAGEID. Insert this string into the doc/csupport file in the appropriate place.
• On SuSE 10.X workstations:
• run the /usr/local/shared/sbin/install-intel-compiler.sh script. It takes two arguments: the root of the installation and the packageid, found as described for SuSE 9.3 above.
• Make a module for the compiler.
• Test it works with /usr/local/shared/sbin/testcompilers.sh

### System status

System monitoring page

## Can't find what you're looking for?

Then you might find our A-Z site index useful. Or, you can search the site using the box at the top of the page, or by clicking here.