L-BFGS-B  3.0
Large-scale Bound-constrained Optimization
prn3lb.f
Go to the documentation of this file.
1 c> \file prn3lb.f
2 
3 c> \brief This subroutine prints out information when either a built-in
4 c> convergence test is satisfied or when an error message is
5 c> generated.
6 c>
7 c> This subroutine prints out information when either a built-in
8 c> convergence test is satisfied or when an error message is
9 c> generated.
10 c>
11 c> @param n On entry n is the number of variables.<br/>
12 c> On exit n is unchanged.
13 c>
14 c> @param x On entry x is an approximation to the solution.<br/>
15 c> On exit x is the current approximation.
16 c>
17 c> @param f On first entry f is unspecified.<br/>
18 c> On final exit f is the value of the function at x.
19 c>
20 c> @param task working string indicating
21 c> the current job when entering and leaving this subroutine.
22 c> @param iprint TODO
23 c> @param info TODO
24 c> @param itfile unit number of iterate.dat file
25 c> @param iter TODO
26 c> @param nfgv TODO
27 c> @param nintol TODO
28 c> @param nskip TODO
29 c> @param nact TODO
30 c> @param sbgnrm TODO
31 c> @param time TODO
32 c> @param nseg TODO
33 c> @param word TODO
34 c> @param iback TODO
35 c> @param stp TODO
36 c> @param xstep TODO
37 c> @param k TODO
38 c> @param cachyt TODO
39 c> @param sbtime TODO
40 c> @param lnscht TODO
41  subroutine prn3lb(n, x, f, task, iprint, info, itfile,
42  + iter, nfgv, nintol, nskip, nact, sbgnrm,
43  + time, nseg, word, iback, stp, xstep, k,
44  + cachyt, sbtime, lnscht)
45 
46  character*60 task
47  character*3 word
48  integer n, iprint, info, itfile, iter, nfgv, nintol,
49  + nskip, nact, nseg, iback, k
50  double precision f, sbgnrm, time, stp, xstep, cachyt, sbtime,
51  + lnscht, x(n)
52 
53 c ************
54 c
55 c NEOS, November 1994. (Latest revision June 1996.)
56 c Optimization Technology Center.
57 c Argonne National Laboratory and Northwestern University.
58 c Written by
59 c Ciyou Zhu
60 c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal.
61 c
62 c
63 c ************
64 
65  integer i
66 
67  if (task(1:5) .eq. 'ERROR') goto 999
68 
69  if (iprint .ge. 0) then
70  write (6,3003)
71  write (6,3004)
72  write(6,3005) n,iter,nfgv,nintol,nskip,nact,sbgnrm,f
73  if (iprint .ge. 100) then
74  write (6,1004) 'X =',(x(i),i = 1,n)
75  endif
76  if (iprint .ge. 1) write (6,*) ' F =',f
77  endif
78  999 continue
79  if (iprint .ge. 0) then
80  write (6,3009) task
81  if (info .ne. 0) then
82  if (info .eq. -1) write (6,9011)
83  if (info .eq. -2) write (6,9012)
84  if (info .eq. -3) write (6,9013)
85  if (info .eq. -4) write (6,9014)
86  if (info .eq. -5) write (6,9015)
87  if (info .eq. -6) write (6,*)' Input nbd(',k,') is invalid.'
88  if (info .eq. -7)
89  + write (6,*)' l(',k,') > u(',k,'). No feasible solution.'
90  if (info .eq. -8) write (6,9018)
91  if (info .eq. -9) write (6,9019)
92  endif
93  if (iprint .ge. 1) write (6,3007) cachyt,sbtime,lnscht
94  write (6,3008) time
95  if (iprint .ge. 1) then
96  if (info .eq. -4 .or. info .eq. -9) then
97  write (itfile,3002)
98  + iter,nfgv,nseg,nact,word,iback,stp,xstep
99  endif
100  write (itfile,3009) task
101  if (info .ne. 0) then
102  if (info .eq. -1) write (itfile,9011)
103  if (info .eq. -2) write (itfile,9012)
104  if (info .eq. -3) write (itfile,9013)
105  if (info .eq. -4) write (itfile,9014)
106  if (info .eq. -5) write (itfile,9015)
107  if (info .eq. -8) write (itfile,9018)
108  if (info .eq. -9) write (itfile,9019)
109  endif
110  write (itfile,3008) time
111  endif
112  endif
113 
114  1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))
115  3002 format(2(1x,i4),2(1x,i5),2x,a3,1x,i4,1p,2(2x,d7.1),6x,'-',10x,'-')
116  3003 format (/,
117  + ' * * *',/,/,
118  + 'Tit = total number of iterations',/,
119  + 'Tnf = total number of function evaluations',/,
120  + 'Tnint = total number of segments explored during',
121  + ' Cauchy searches',/,
122  + 'Skip = number of BFGS updates skipped',/,
123  + 'Nact = number of active bounds at final generalized',
124  + ' Cauchy point',/,
125  + 'Projg = norm of the final projected gradient',/,
126  + 'F = final function value',/,/,
127  + ' * * *')
128  3004 format (/,3x,'N',4x,'Tit',5x,'Tnf',2x,'Tnint',2x,
129  + 'Skip',2x,'Nact',5x,'Projg',8x,'F')
130  3005 format (i5,2(1x,i6),(1x,i6),(2x,i4),(1x,i5),1p,2(2x,d10.3))
131  3007 format (/,' Cauchy time',1p,e10.3,' seconds.',/
132  + ' Subspace minimization time',1p,e10.3,' seconds.',/
133  + ' Line search time',1p,e10.3,' seconds.')
134  3008 format (/,' Total User time',1p,e10.3,' seconds.',/)
135  3009 format (/,a60)
136  9011 format (/,
137  +' Matrix in 1st Cholesky factorization in formk is not Pos. Def.')
138  9012 format (/,
139  +' Matrix in 2st Cholesky factorization in formk is not Pos. Def.')
140  9013 format (/,
141  +' Matrix in the Cholesky factorization in formt is not Pos. Def.')
142  9014 format (/,
143  +' Derivative >= 0, backtracking line search impossible.',/,
144  +' Previous x, f and g restored.',/,
145  +' Possible causes: 1 error in function or gradient evaluation;',/,
146  +' 2 rounding errors dominate computation.')
147  9015 format (/,
148  +' Warning: more than 10 function and gradient',/,
149  +' evaluations in the last line search. Termination',/,
150  +' may possibly be caused by a bad search direction.')
151  9018 format (/,' The triangular system is singular.')
152  9019 format (/,
153  +' Line search cannot locate an adequate point after 20 function',/
154  +,' and gradient evaluations. Previous x, f and g restored.',/,
155  +' Possible causes: 1 error in function or gradient evaluation;',/,
156  +' 2 rounding errors dominate computation.')
157 
158  return
159 
160  end
subroutine prn3lb(n, x, f, task, iprint, info, itfile, iter, nfgv, nintol, nskip, nact, sbgnrm, time, nseg, word, iback, stp, xstep, k, cachyt, sbtime, lnscht)
This subroutine prints out information when either a built-in convergence test is satisfied or when a...
Definition: prn3lb.f:45