Ada: Commands for the compilation system

The compilation commands in Fortran, C and C++ are the following:

Languages Command Source file suffixes
Fortran ifort .f90: free format .F90: free format, pre-compiled by fpp .f, .for, or .ftn: free format .fpp, .F, .FOR, .FTN, or .FPP: free, pre-compiled by fpp
C icc .c, .i
C++ icpc icc .c, .i, .C, .cxx, .c++, .cc, .cp, .cpp .C, .cxx, .c++, .cc, .cp, .cpp

Examples of created executable files:

    $ ifort prog.f95 -o prog
    $ icc prog.c -o prog
    $ icc prog.C -o prog

Notes about the Fortran source code format

The Intel compilers determine the source code format according to the file name suffix, by default. However, the code source format can be defined explicitly by using the option -free (free format) or -nofree (fixed format). It should be noted, however, that since the Fortran 95 was established, the fixed format has been considered as obsolete.

Examples:

  • If prog.f90 contains a code source written in free format: ada : ifort prog.f90 -o prog
  • If prog.f90 contains a code source written in fixed format: ada : ifort -nofree prog.f90 -o prog
  • If prog.f contains a code source written in fixed format: ada : ifort prog.f -o prog
  • If prog.f contains a code written in free format: ada : ifort -free prog.f -o prog

Compilation in batch

In interactive, the compilation of certain codes can go beyond the time limit. To have enough resources for larger codes, there is a batch class dedicated to these compilations called ?compil? with a maximum clock time of 20 hours.

The LoadLeveler directive to add is:

# @ class = compil