Sun WorkShop Compiler C 5.0 User's Guide

Environment Variable

If multiprocessor execution is desired, the PARALLEL environment variable needs to be set. It specifies the number of processors available to the program:

% setenv PARALLEL 2

This will enable the execution of the program on two threads. If the target machine has multiple processors, the threads can map to independent processors.

% example

Running the program will lead to creation of two threads that will execute the parallelized portions of the program.