Parallelizing your programs

The compiler offers you three methods of implementing shared memory program parallelization. These are:

All methods of program parallelization are enabled when the -qsmp compiler option is in effect without the omp suboption. You can enable strict OpenMP compliance with the -qsmp=omp compiler option, but doing so will disable automatic parallelization.

Note: The -qsmp option must only be used together with thread-safe compiler invocation modes (those that contain the _r suffix).

Parallel regions of program code are executed by multiple threads, possibly running on multiple processors. The number of threads created is determined by environment variables and calls to library functions. Work is distributed among available threads according to scheduling algorithms specified by the environment variables. For any of the methods of parallelization, you can use the XLSMPOPTS environment variable and its suboptions to control thread scheduling; for more information on this environment variable, see "XLSMPOPTS environment variable suboptions for parallel processing". If you are using OpenMP constructs, you can use the OpenMP environment variables to control thread scheduling; for information on OpenMP environment variables, see "OpenMP environment variables for parallel processing". For more information on both IBM SMP and OpenMP built-in functions, see "Built-in functions for parallel processing".

For a complete discussion on how threads are created and utilized, refer to the OpenMP Application Program Interface Language Specification, available at www.openmp.org.

Related information