Sun Studio 12: C++ User's Guide

A.2.131.1 Values

You must always specify -xjobs with a value. Otherwise an error diagnostic is issued and compilation aborts.

Generally, a safe value for n is 1.5 multiplied by the number of available processors. Using a value that is many times the number of available processors can degrade performance because of context switching overheads among spawned jobs. Also, using a very high number can exhaust the limits of system resources such as swap space.

Defaults

Multiple instances of -xjobs on the command line override each other until the right-most instance is reached.

Examples

The following example compiles more quickly on a system with two processors than the same command without the -xjobs option.


 example% CC -xipo -xO4 -xjobs=3 t1.cc t2.cc t3.cc