Hprc banner tamu.png

Difference between revisions of "Ada:Compile:Intro"

From TAMU HPRC
Jump to: navigation, search
(Created page with "== 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/if...")
 
(Getting Started)
Line 8: Line 8:
 
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:
 
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:
  
<pre>   man icc
+
<pre>  
 +
    man icc
 
     man icpc
 
     man icpc
     man ifort</pre>
+
     man ifort
 +
</pre>
 +
 
 
will provide information on the C, the C++ and the Fortran compilers, respectively.
 
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. The default output file name is a.out but can be changed using compiler flags. See table below for valid extensions for each language.
 
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. The default output file name is a.out but can be changed using compiler flags. See table below for valid extensions for each language.
  
 
+
{|
 
+
! Extension
Extension
+
! Compiler
 
+
! Description
Compiler
+
|-
 
+
| .c
Description
+
| icc
 
+
| C source code passed to the compiler.
.c
+
|-
 
+
| .C, .CC, .cc, .cpp, .cxx
icc
+
| icpc
 
+
| C++ source code passed to the compiler.
C source code passed to the compiler.
+
|-
 
+
| .f, .for, .ftn
.C, .CC, .cc, .cpp, .cxx
+
| ifort
 
+
| fixed form Fortran source code passd to the compiler.
icpc
+
|-
 
+
| .fpp
C++ source code passed to the compiler.
+
| ifort
 
+
| Fortran fixed form source code that can be preprocessed by the Intel Fortran preprocessor fpp.
.f, .for, .ftn
+
|-
 
+
| .f90
ifort
+
| ifort
 
+
| free form Fortran 90/95 source code passed to the compiler.
fixed form Fortran source code passd to the compiler.
+
|-
 
+
| .F
.fpp
+
| ifort
 
+
| Fortran fixed form source code, will be passed to preprocessor (fpp) and then passed to the Fortran compiler.
ifort
+
|-
 
+
| .o
Fortran fixed form source code that can be preprocessed by the Intel Fortran preprocessor fpp.
+
| icc/icpc/ifort
 
+
| compiled object file--generated with the -c option--passed to the linker.
.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.
 
  
 
* [[scalar.php|Serial/Scalar Programs]]
 
* [[scalar.php|Serial/Scalar Programs]]
 
* [[openmp.php|OpenMP Programs]]
 
* [[openmp.php|OpenMP Programs]]
 
* [[mpi.php|MPI Programs]]
 
* [[mpi.php|MPI Programs]]

Revision as of 16:40, 3 October 2014

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. Use the following command to load the ictce module:

    module load icte

This will set up the environment for the most recent ictce version. For more information about the module system on ada, please visit 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. The default output file name is a.out but can be changed using compiler flags. 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.