Using shared-memory parallelism (SMP)

Some IBM pSeries(R) machines are capable of shared-memory parallel processing. You can compile with -qsmp to generate the threaded code needed to exploit this capability. The option implies an optimization level of at least -O2.

The following table lists the most commonly used suboptions. Descriptions and syntax of all the suboptions are provided in -qsmp. An overview of automatic parallelization, as well as of OpenMP directives is provided in Parallelizing your programs.

Table 13. Commonly used -qsmp suboptions
suboption Behavior
auto Instructs the compiler to automatically generate parallel code where possible without user assistance. Any SMP programming constructs in the source code, including OpenMP directives, are also recognized. This is the default setting if you do not specify any -qsmp suboptions, and it also implies the opt suboption.
omp Instructs the compiler to enforce strict conformance to the OpenMP API for specifying explicit parallelism. Only language constructs that conform to the OpenMP standard are recognized. Note that -qsmp=omp is currently incompatible with -qsmp=auto.
opt Instructs the compiler to optimize as well as parallelize. The optimization is equivalent to -O2 -qhot in the absence of other optimization options.
fine_tuning Other values for the suboption provide control over thread scheduling, nested parallelism, locking, etc.