Files output during an optimization include:
- optimize.info: This is the main output file from SNOPT. It contains detailed information about the optimization run. The default output includes information at each design iteration, including information on the major and minor iterations. Additional information can be requested with the input variable jtstrm%snopt_major_print_level and jtstrm%snopt_minor_print_level. A useful setting is jtstrm%snopt_major_print_level = 111011 and jtstrm%snopt_minor_print_level = 10. This will output the values of the nonlinear constraints, the value of each design variable, and the nonlinear gradient entries for each design variable. This is useful for diagnosing unexpected optimizer behaviour. Upon exit from SNOPT, additional information is printed, including the status of variables and constraints. See the SNOPT manual for a detailed description of everything included in this file.
- optimize.his: A shorter summary of the optimization than the optimize.his file. This will be your first point of reference for monitoring optimization convergence. The main entries are described here:
- Major: Major iterations. These are the design iterations.
- Minors: Iterations required to solve the quadratic subproblem.
- Step: The normalized step size. If the optimization is proceeding well, this should be 1.0. A number of consecutive iterations with step < 1 is a sign the optimization may be struggling. Steps of O(10^-3) or smaller are signs of trouble.
- nCon: The number of the last call to usrfun, i.e. function evaluation. Each ncon will correspond to a call to a new geometry, with calls to the flow solver, gradient evaluation, etc. This number will correspond to the suffix of surfCPs_XXX.dat, or the entry in results.ohis. (The exception to this is if an SNOPT cheap test is performed, in which case ncon will lag the number of function calls by 1 due to the additional call required to perform the finite difference test.)
- Feasible: This is the maximum nonlinear constraint violation. If this number is in brackets it indicates that the violation is less than that specified by jtstrm%feas_tol and the nonlinear constraints can be considered satisfied.
- Optimal: Loosly speaking, a measure of the constrained problem Lagrangian gradient. See the SNOPT manual for a more rigorous description. Ideally, this should be driven as low as possible. In reality, for all but the simplest problems, a reduction of more than two orders of magnitude from the starting value is rarely achieved.
- MeritFunction: The value of the problem Lagrangian, i.e. the sum of the objective and constraint violations. When nonlinear constraints are satisfied, this reduces to the value of the objective function.
- nS: The number of super basic variables at each iteration.
- Penalty: Norm of the vector of Lagrangian penalty variables.
- Letter codes: The end of each line sometimes has letter codes indicating certain events at each iteration. See the manual for a list of all codes, but the most common include:
- D: A reduction in the step length was required. This is often, but not always, due to a failure to evaluate the functions at a new iteration. I.e., the mesh movement or flow solver failed on a new shape so the optimizer was forced to backtrack to find an evaluatable point.
- r/R: A Hessian reset occurred.
- m/M: An extra function evaluation was required to obtain Hessian information.
- results.ohis: A useful summary of the aerodynamic coefficients evaluated at each function evaluation (ncon) of the optimization.
- results.djdx: Gradient, dJdX, for all flow-dependent gradients computed (if requested).
- movegrid.info: Mesh movement convergence info. If the mesh movement fails, information may get written here telling you why. If the B-spline mesh becomes inverted (negative Jacobian) or runs out of iterations, that information will be written here. If the mesh movement is solved, but invalid CFD cells are found upon evaluation of the new mesh, that information will be printed to std IO (i.e. screen).
- movegrid_XXX.g: The B-spline mapping at each mesh movement increment, XXX. This is a PLOT3D binary file. View in the same way you would a grid file. Useful for visualizing what may have caused mesh movement failures. These are overwritten at each function call, so only the most recent is available.
- surfCPs_XXX.g: The B-spline surface (control points and surface patches), and if applicable, the FFD volume and axials. A Tecplot format file. Useful for visualizing the shape at each iteration, XXX.
- axialDVs_XXX.dat: Contains the value of the axial pnt and xsec varialbes. Only written if doing an axial-based optimization. Contains all the necessary information to specify a geometry when using axial-based control (assuming the initial fit, etc. is consistent). Is useful for setting a starting geometry for an optimization with jtstrm%setAxialDVs = .true. and jtstrm%setAxialDVs_file = 'NameOfAxialDVsFile', for example where NameOfAxialDVsFile may be an axialDVS.dat file from the end of a previous optimization.
- optimize.geo: If using Axial Control, this file includes the values calculated for the linear constraints (whether the constraints are active or not). See this page for an explanation of how these values are calculated.
- optimize.nsvd and optimize.rstrt: These are optimization restart files. At each function call the values of the nonlinear functions and gradients are written in optimize.rstrt. When an optimization restart is done, the optimization starts fresh (thus avoiding any path dependency due to warmstarting) and reads the optimize.rstrt files to get the functions and gradients until that file is exhausted, at which point the optimization continues as usual.