The PARALLEL environment variable controls the maximum number of processors available to the program. The following example shows how to set it:
demo% setenv PARALLEL 4 C shell -or- demo$ PARALLEL=4 Bourne/Korn shell demo$ export PARALLEL
In this example, setting PARALLEL to four enables the execution of a program using at most four threads. If the target machine has four processors available, the threads will map to independent processors. If there are fewer than four processors available, some threads could run on the same processor as others, possibly degrading performance.
The SunOS command psrinfo(1M) displays a list of the processors available on a system:
demo% psrinfo 0 on-line since 03/18/96 15:51:03 1 on-line since 03/18/96 15:51:03 2 on-line since 03/18/96 15:51:03 3 on-line since 03/18/96 15:51:03