


Next: 9. Model Uses
Up: 8.4 The line search
Previous: 8.4.2 The online vs.
Contents
Subsections
 itmax: controls the max. number of iterations
 nfunc: controls the max. number of simulations
within one iteration
From one iteration to the next the descent direction changes.
Within one iteration more than one forward and adjoint
run may be performed.
The updated control used as input for these simulations uses the same
descent direction, but different step sizes.
From one iteration to the next the descent direction dd changes using
the result for the adjoint vector gg of the previous iteration.
In lsline the updated control
serves as input for
a forward and adjoint model run yielding a new gg(i,1).
In general, the new solution passes the 1st and 2nd Wolfe tests
so xdiff(i,1) represents the solution sought:
If one of the two tests fails,
an inter or extrapolation is invoked to determine
a new step size tact(i1,2).
If more than one function call is permitted,
the new step size is used together
with the "old" descent direction dd(i1)
(i.e. dd is not updated using the new gg(i)),
to compute a new
that serves as input
in a new forward and adjoint run, yielding gg(i,2).
If now, both Wolfe tests are successful,
the updated solution is given by
In order to save memory both the fields dd and xdiff
have a double usage.
 xdiff

 in lsopt_top: used as x(i)  x(i1) for Hessian update
 in lsline: intermediate result for control update
x = x + tact*dd
 dd

 in lsopt_top, lsline: descent vector, dd = gg
and hessupd
 in dgscale: intermediate result to compute new preconditioner
 NUPDATE
max. no. of update pairs (gg(i)gg(i1), xx(i)xx(i1))
to be stored in OPWARMD to estimate Hessian
[pair of current iter. is stored in
(2*jmax+2, 2*jmax+3)
jmax must be > 0 to access these entries]
Presently NUPDATE must be > 0
(i.e. iteration without reference to previous
iterations through OPWARMD has not been tested)
 EPSX
relative precision on xx bellow which xx should not be improved
 EPSG
relative precision on gg below which optimization is
considered successful
 IPRINT
controls verbose (>=1) or nonverbose output
 NUMITER
max. number of iterations of optimisation;
NUMTER = 0: cold start only, no optimization
 ITER_NUM
index of new restart file to be created (not necessarily = NUMITER!)
 NFUNC
max. no. of simulations per iteration
(must be > 0);
is used if step size tact is inter/extrapolated;
in this case, if NFUNC > 1, a new simulation is performed with
same gradient but "improved" step size
 FMIN
first guess cost function value
(only used as long as first iteration not completed,
i.e. for jmax <= 0)
Two files retain values of previous iterations which are
used in latest iteration to update Hessian:
 OPWARMI: contains index settings and scalar variables
n = nn 
no. of control variables 
fc = ff 
cost value of last iteration 
isize 
no. of bytes per record in OPWARMD 
m = nupdate 
max. no. of updates for Hessian 
jmin, jmax 
pointer indices for OPWARMD file (cf. below) 
gnorm0 
norm of first (cold start) gradient gg 
iabsiter 
total number of iterations with respect to cold start

 OPWARMD: contains vectors (control and gradient)
entry 
name 
description 
1 
xx(i) 
control vector of latest iteration 
2 
gg(i) 
gradient of latest iteration 
3 
xdiff(i),diag 
preconditioning vector; (1,...,1)
for cold start 
2*jmax+2 
gold=g(i)g(i1) 
for last update (jmax) 
2*jmax+3 
xdiff=tact*d=xx(i)xx(i1) 
for last update (jmax)

Figure 8.1:
Examples of OPWARM file handling

Figure 8.2:
Flow chart (part 1 of 3)

Figure 8.3:
Flow chart (part 2 of 3)

Figure 8.4:
Flow chart (part 3 of 3)

Next: 9. Model Uses
Up: 8.4 The line search
Previous: 8.4.2 The online vs.
Contents
mitgcmsupport@dev.mitgcm.org
Copyright © 2002
Massachusetts Institute of Technology 

