2 C LAST LINE OF SUBROUTINE LBFGS
5 SUBROUTINE LB1
(IPRINT
,ITER
,NFUN
,
6 * GNORM
,N
,M
,X
,F
,G
,STP
,FINISH
)
8 C -------------------------------------------------------------
9 C THIS ROUTINE PRINTS MONITORING INFORMATION. THE FREQUENCY AND
10 C AMOUNT OF OUTPUT ARE CONTROLLED BY IPRINT.
11 C -------------------------------------------------------------
13 INTEGER IPRINT
(2),ITER
,NFUN
,LP
,MP
,N
,M
14 DOUBLE PRECISION X
(N
),G
(N
),F
,GNORM
,STP
,GTOL
,STPMIN
,STPMAX
16 COMMON /LB3
/MP
,LP
,GTOL
,STPMIN
,STPMAX
22 IF (IPRINT
(2).GE
.1)THEN
24 WRITE(MP
,50) (X
(I
),I
=1,N
)
26 WRITE(MP
,50) (G
(I
),I
=1,N
)
31 IF ((IPRINT
(1).EQ
.0).AND
.(ITER
.NE
.1.AND
..NOT
.FINISH
))RETURN
32 IF (IPRINT
(1).NE
.0)THEN
33 IF(MOD
(ITER
-1,IPRINT
(1)).EQ
.0.OR
.FINISH
)THEN
34 IF(IPRINT
(2).GT
.1.AND
.ITER
.GT
.1) WRITE(MP
,70)
35 WRITE(MP
,80)ITER
,NFUN
,F
,GNORM
,STP
40 IF( IPRINT
(2).GT
.1.AND
.FINISH
) WRITE(MP
,70)
41 WRITE(MP
,80)ITER
,NFUN
,F
,GNORM
,STP
43 IF (IPRINT
(2).EQ
.2.OR
.IPRINT
(2).EQ
.3)THEN
49 WRITE(MP
,50)(X
(I
),I
=1,N
)
50 IF (IPRINT
(2).EQ
.3)THEN
52 WRITE(MP
,50)(G
(I
),I
=1,N
)
55 IF (FINISH
) WRITE(MP
,100)
58 10 FORMAT('*************************************************')
59 20 FORMAT(' N=',I5
,' NUMBER OF CORRECTIONS=',I2
,
60 . /, ' INITIAL VALUES')
61 30 FORMAT(' F= ',1PD22
.15
,' GNORM= ',1PD22
.15
)
62 40 FORMAT(' VECTOR X= ')
63 50 FORMAT(4(2X
,1PD22
.15
))
64 60 FORMAT(' GRADIENT VECTOR G= ')
65 70 FORMAT(/' I NFN',5X
,'FUNC',20X
,'GNORM',19X
,'STEPLENGTH'/)
66 80 FORMAT(2(I4
,1X
),3X
,3(1PD22
.15
,2X
))
67 90 FORMAT(' FINAL POINT X= ')
68 100 FORMAT(/' THE MINIMIZATION TERMINATED WITHOUT DETECTING ERRORS.',