Deprecated: please see new documentation site.


Contents


The following shows the basic and most frequently used compiler options available in the IBM XL Fortran, C and C++ compilers. Most of these options work for both Fortran and C/C++ compilers. Each option presented below comes with a short description. Detailed information about them can be found in the IBM documentation.

Control Options

-I

 Specify an additional search path for includes files whose absolute path is not specified in the 
 code. This option needs to be specified once for each additional path if there are more than one.
 Example:
  -I/usr/local/packages/petsc-2.3.2/include/
 

-o

 Specify a name for the output object or executable. The default is 'a.out'.

-c

 Compile only. A .o object file will be generated for each source file but no executable will be
 generated.

-q32

 Compile the code in 32-bit mode.

-q64

 Compile the code in 64 bit mode.

For Fortran only:

-qfixed

 Indicate the soucre program is in fixed form (f77).

-qfree=f90

 Indicate the source program is in free form (f90).

Debugging Options

Almost all the options in this section can slow execution, so you might want to restrict their use to debugging purpose only.

-p

 Prepare the program for profiling.

-pg

 Prepare the program for profiling. This option produces more extensive statistics than -p.

-g

 Generate debugging information for debugging tools.

-qcheck

 Check each reference to an array element, array section and character substring for correctness.

-qflttrap

 Detect and determine run-time floating-point exceptions such as overflow and divided by zero.
           

-qextchk

 Verifies the consistency of procedure definitions and references at compile time and verifies 
 that actual arguments agree in type, shape and class with the corresponding dummy arguments at 
 link time.

Optimization Options

-qhot

 'HOT' stands for 'High Order Transformation', which targets to improve the performance of loops
 and array languages. What this option may do include 1) scalar replacement; 2) interchange, fusion
 and unrolling of loops and; 3) reducing the generation of temporary arrays.

-qarch

 Instruct the compiler to generate codes that have additional performance improvements on the 
 specified architecture.

-qcache

 Specify the cache configuration for a specific excution machine.

-qtune

 Instruct the compiler to tune instruction selection, scheduling and other implementation
 -dependent performance enhancement for a specific implementation of a hardwar architecture.

-O[level]

 Specify the optimization level (0,2,3,4 or 5).

-qstrict

 Ensure that the compiler does not change the semantics of the code when trying to optimize, 
 which is only an issue when -O3 or higher is specified.

-qipa

 Inter-procedure analysis. You might want to consider this option when you code consists of 
 a great of separate files.

-qinline

 Inline subroutines that are frequently called to reduce the overheading.

Other Options

-qsmp

 Parallel the code automatically. See the compiler documentation for details on how this works.

-qsmp=omp

 Compile OpenMP codes. The compiler must be thread-safe when using this option.

Documentations

Manuals and detailed information on XL compilers can be found at:

IBM compiler information center: [1]

LSU HPC website: [2]


Users may direct questions to sys-help@loni.org.

Powered by MediaWiki