L-BFGS-B  3.0
Large-scale Bound-constrained Optimization
prn2lb.f
Go to the documentation of this file.
1 c> \file prn2lb.f
2 
3 c> \brief This subroutine prints out new information after a successful
4 c> line search.
5 c>
6 c> This subroutine prints out new information after a successful
7 c> line search.
8 c>
9 c> @param n On entry n is the number of variables.<br/>
10 c> On exit n is unchanged.
11 c>
12 c> @param x On entry x is an approximation to the solution.<br/>
13 c> On exit x is the current approximation.
14 c>
15 c> @param f On first entry f is unspecified.<br/>
16 c> On final exit f is the value of the function at x.
17 c>
18 c> @param g On first entry g is unspecified.<br/>
19 c> On final exit g is the value of the gradient at x.
20 c>
21 c> @param iprint It controls the frequency and type of output generated:<ul>
22 c> <li>iprint<0 no output is generated;</li>
23 c> <li>iprint=0 print only one line at the last iteration;</li>
24 c> <li>0<iprint<99 print also f and |proj g| every iprint iterations;</li>
25 c> <li>iprint=99 print details of every iteration except n-vectors;</li>
26 c> <li>iprint=100 print also the changes of active set and final x;</li>
27 c> <li>iprint>100 print details of every iteration including x and g;</li></ul>
28 c> When iprint > 0, the file iterate.dat will be created to
29 c> summarize the iteration.
30 c>
31 c> @param itfile unit number of iterate.dat file
32 c>
33 c> @param iter TODO
34 c> @param nfgv TODO
35 c> @param nact TODO
36 c> @param sbgnrm TODO
37 c> @param nseg TODO
38 c> @param word TODO
39 c> @param iword TODO
40 c> @param iback TODO
41 c> @param stp TODO
42 c> @param xstep TODO
43  subroutine prn2lb(n, x, f, g, iprint, itfile, iter, nfgv, nact,
44  + sbgnrm, nseg, word, iword, iback, stp, xstep)
45 
46  character*3 word
47  integer n, iprint, itfile, iter, nfgv, nact, nseg,
48  + iword, iback
49  double precision f, sbgnrm, stp, xstep, x(n), g(n)
50 
51 c ************
52 c
53 c NEOS, November 1994. (Latest revision June 1996.)
54 c Optimization Technology Center.
55 c Argonne National Laboratory and Northwestern University.
56 c Written by
57 c Ciyou Zhu
58 c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal.
59 c
60 c
61 c ************
62 
63  integer i,imod
64 
65 c 'word' records the status of subspace solutions.
66  if (iword .eq. 0) then
67 c the subspace minimization converged.
68  word = 'con'
69  else if (iword .eq. 1) then
70 c the subspace minimization stopped at a bound.
71  word = 'bnd'
72  else if (iword .eq. 5) then
73 c the truncated Newton step has been used.
74  word = 'TNT'
75  else
76  word = '---'
77  endif
78  if (iprint .ge. 99) then
79  write (6,*) 'LINE SEARCH',iback,' times; norm of step = ',xstep
80  write (6,2001) iter,f,sbgnrm
81  if (iprint .gt. 100) then
82  write (6,1004) 'X =',(x(i), i = 1, n)
83  write (6,1004) 'G =',(g(i), i = 1, n)
84  endif
85  else if (iprint .gt. 0) then
86  imod = mod(iter,iprint)
87  if (imod .eq. 0) write (6,2001) iter,f,sbgnrm
88  endif
89  if (iprint .ge. 1) write (itfile,3001)
90  + iter,nfgv,nseg,nact,word,iback,stp,xstep,sbgnrm,f
91 
92  1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))
93  2001 format
94  + (/,'At iterate',i5,4x,'f= ',1p,d12.5,4x,'|proj g|= ',1p,d12.5)
95  3001 format(2(1x,i4),2(1x,i5),2x,a3,1x,i4,1p,2(2x,d7.1),1p,2(1x,d10.3))
96 
97  return
98 
99  end
subroutine prn2lb(n, x, f, g, iprint, itfile, iter, nfgv, nact, sbgnrm, nseg, word, iword, iback, stp, xstep)
This subroutine prints out new information after a successful line search.
Definition: prn2lb.f:45