Hprc banner tamu.png


Jump to: navigation, search

Serial Programs

Below are some of the most common compiler flags (these flags are accepted by all XL compilers with some notable exceptions):

Basic compiler flags

The next sections introduce some of the most common compiler flags. For a full description of all the compiler flags please consult the appropriate man pages.

Flag Description
-o <file> name of output file
-c only compile, skip linking
-L <dir> include <dir> in library search path
-l<name> searches file for libname.so or libname.a for linking
-q64 (-q32) instruct the compiler to generate 64- or 32-bit code

Optimization flags

Flag Description
-O[n] level of optimization; range from O0 to O5 (O5 highest level)
-qarch=auto specifies architecture for which the code will be generated
-qtune=auto specifies architecture for which the program is OPTIMIZED
-qsmp=auto enables automatic shared-memory parallelization (very conservative)
-qhot perform certain high-order transformations during optimization
-qessl use the intrinsics of ESSL library instead of Fortran's (FORTRAN ONLY)

Debugging flags

The table below shows some compiler flags that can be useful in debugging your program.

Flag Description
-g generate debugging info for use by a symbolic debugger
-qcheck add runtime checks for array bounds, initialized variables, etc