Hprc banner tamu.png


Revision as of 12:44, 27 October 2014 by J-perdue (talk | contribs) (More Details)
Jump to: navigation, search

Getting Started

For developing code on ada we recommend using the Intel Cluster Toolkit Compiler Edition (ictce).This toolkit includes the intel compilers (icc/icpc/ifort), intel Math Kernel Library (MKL), and intel MPI stack. Additionally, the Intel compilers are the only compilers able to compile programs for the Phi coprocessors. Use the following command to load the ictce module:

    module load ictce

This will set up the environment for the most recent ictce version. For more information about the module system on ada, please visit the modules page.

After initializing the compiler environment, you can use the "man" command to obtain a complete list of the available compilation options for the language you plan to use. For example:

    man icc
    man icpc
    man ifort

will provide information on the C, the C++ and the Fortran compilers, respectively.

Each compiler requires appropriate file name extensions. These extensions are meant to identify files with different programming language contents, thereby enabling the compiler script to hand these files to the appropriate compiling subsystem: preprocessor, compiler, linker, etc. See table below for valid extensions for each language.

Extension Compiler Description
.c icc C source code passed to the compiler.
.C, .CC, .cc, .cpp, .cxx icpc C++ source code passed to the compiler.
.f, .for, .ftn ifort fixed form Fortran source code passd to the compiler.
.fpp ifort Fortran fixed form source code that can be preprocessed by the Intel Fortran preprocessor fpp.
.f90 ifort free form Fortran 90/95 source code passed to the compiler.
.F ifort Fortran fixed form source code, will be passed to preprocessor (fpp) and then passed to the Fortran compiler.
.o icc/icpc/ifort compiled object file--generated with the -c option--passed to the linker.

NOTE: The icpc command ("C++" compiler) uses the same compiler options as the icc ("C" compiler) command. Invoking the compiler using icpc compiles '.c', and '.i' files as C++. Invoking the compiler using icc compiles '.c' and '.i' files as C. Using icpc always links in C++ libraries. Using icc only links in C++ libraries if C++ source is provided on the command line.