Threaded Processing

In certain cases, the OPTMODEL procedure can take advantage of the multiple CPUs that are available on many computers. PROC OPTMODEL can automatically distribute the evaluation of Hessian matrices for nonlinear solvers across threads of execution on multiple CPUs. Threading can decrease the amount of clock time required to perform an optimization, although the total CPU time required might increase.

Threading in the OPTMODEL procedure is controlled by the following SAS system options:

CPUCOUNT=

specifies the maximum number of CPUs that can be used.

THREADS | NOTHREADS

enables or disables the use of threading.

Good performance is usually obtained with the default option settings, THREADS and CPUCOUNT=ACTUAL. See the option descriptions in SAS System Options: Reference for more details.

The number of threads actually used by PROC OPTMODEL depends on the SAS System options and on the characteristics of the model being solved. In particular, threading is not used when numeric derivatives are required or when the problem is simple enough that threading gives no advantage.