Since the derivatives of the target function can not be calculated directly, finite differences are used to approximate them. This makes it necessary that during the gradient calculation the optimizer requests n independent model evaluations of different parameter vectors. Evaluating these requests sequentially would slow down the optimization process.
The finite differences evaluations needed for the gradient calculation are independent from each other thus can be parallelized. The framework [55], which executes these evaluations, is capable of simulating several simulation flows in parallel.
Optimizer algorithms are usually coded with the assumption that the calculation of the target function is performed in a short procedure linked to the optimizer (see Figure 4.5). In this case an evaluation of the target function may only take milliseconds. This is the reason why no effort is taken to start evaluations in parallel. On the other hand for microelectronics applications the target function usually depends on the results of a series of simulations.
For the parallelization of the evaluation needed for the gradient calculation an asynchronous event handling has to be added to the optimizer. Figure 4.7 shows the mechanism by which this parallelization can be implemented.
Figure 4.7: Structure of the code for parallel execution.
for i = 1 to n p = set_parameter_vector (); id = next_id (); trigger_evaluation (p, id); end do wait_for_result (); y = get_result (); id = get_result_id (); ... until missing_results ();
In the first loop of Figure 4.7 the gradient calculation is started by requesting n finite difference evaluations. Each evaluation has a unique identification number (id) assigned. The results of each finished evaluation, including the given identification, are returned to the optimizer. This is done in the second loop of Figure 4.7 until all results are collected. After that the gradient is calculated using the finite-difference approximation (4.12)
The evaluations needed for the gradient calculation have basicly the same control parameters with only small variations. This property can be used in some cases to speed up these gradient evaluations.
The results of individual model evaluations with nearly the same input parameters will be very similar. The simulation can be speeded up by using the result of a similar simulation as the initial guess. In Figure 4.8 the grey boxes symbolize the evaluations of the model function. Each iteration during the optimization process requires a gradient calculation where n parallel evaluations are performed and a series of sequential evaluations during the adjustment of the step for the following iteration. The last evaluation before a gradient request is the point where the finite difference approximation for the first derivatives is performed; here only small changes in the parameter vector occur.
The device simulator MINIMOS-NT is able to use an initial guess, like a previous result, in the initialization phase. In the rare case that the simulator does not converge using this initial guess the repeat level can be used to continue the optimization process. Every time a program has to be requeued and executed again the repeat level is increased by the framework. The repeat level is used by MINIMOS-NT to disable the initialization with the previous result or switch to a direct solver which is slower but more stable.