summaryrefslogtreecommitdiff
path: root/debian/patches/0006-Stop-generating-iteration-log-files.patch
blob: aa3197658df6e2516cbaeee14e355206980542ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
From: Gard Spreemann <gspr@nonempty.org>
Date: Thu, 30 Jul 2020 10:49:15 +0200
Subject: Stop generating iteration log files.

Based on SciPy commit
 c3c54c15eafe7fa7a2b7a499cb64f38f1a7ee057
---
 lbfgsb.f | 61 +++++++++++--------------------------------------------------
 1 file changed, 11 insertions(+), 50 deletions(-)

diff --git a/lbfgsb.f b/lbfgsb.f
index 59f0a97..e30aff0 100644
--- a/lbfgsb.f
+++ b/lbfgsb.f
@@ -140,8 +140,6 @@ c        0<iprint<99 print also f and |proj g| every iprint iterations;
 c        iprint=99   print details of every iteration except n-vectors;
 c        iprint=100  print also the changes of active set and final x;
 c        iprint>100  print details of every iteration including x and g;
-c       When iprint > 0, the file iterate.dat will be created to
-c                        summarize the iteration.
 c
 c     csave is a working string of characters of length 60.
 c
@@ -426,8 +424,6 @@ c        0<iprint<99 print also f and |proj g| every iprint iterations;
 c        iprint=99   print details of every iteration except n-vectors;
 c        iprint=100  print also the changes of active set and final x;
 c        iprint>100  print details of every iteration including x and g;
-c       When iprint > 0, the file iterate.dat will be created to
-c                        summarize the iteration.
 c
 c     csave is a working string of characters of length 60.
 c
@@ -483,7 +479,7 @@ c     ************
  
       logical          prjctd,cnstnd,boxed,updatd,wrk
       character*3      word
-      integer          i,k,nintol,itfile,iback,nskip,
+      integer          i,k,nintol,iback,nskip,
      +                 head,col,iter,itail,iupdat,
      +                 nseg,nfgv,info,ifun,
      +                 iword,nfree,nact,ileave,nenter
@@ -546,24 +542,18 @@ c           'word' records the status of subspace solutions.
 c           'info' records the termination information.
          info = 0
 
-         itfile = 8
-         if (iprint .ge. 1) then
-c                                open a summary file 'iterate.dat'
-            open (8, file = 'iterate.dat', status = 'unknown')
-         endif            
-
 c        Check the input arguments for errors.
 
          call errclb(n,m,factr,l,u,nbd,task,info,k)
          if (task(1:5) .eq. 'ERROR') then
-            call prn3lb(n,x,f,task,iprint,info,itfile,
+            call prn3lb(n,x,f,task,iprint,info,
      +                  iter,nfgv,nintol,nskip,nact,sbgnrm,
      +                  zero,nseg,word,iback,stp,xstep,k,
      +                  cachyt,sbtime,lnscht)
             return
          endif
 
-         call prn1lb(n,m,l,u,x,iprint,itfile,epsmch)
+         call prn1lb(n,m,l,u,x,iprint,epsmch)
  
 c        Initialize iwhere & project x onto the feasible set.
  
@@ -580,7 +570,6 @@ c          restore local variables.
          updatd = lsave(4)
 
          nintol = isave(1)
-         itfile = isave(3)
          iback  = isave(4)
          nskip  = isave(5)
          head   = isave(6)
@@ -646,7 +635,6 @@ c     Compute the infinity norm of the (-) projected gradient.
   
       if (iprint .ge. 1) then
          write (6,1002) iter,f,sbgnrm
-         write (itfile,1003) iter,nfgv,sbgnrm,f
       endif
       if (sbgnrm .le. pgtol) then
 c                                terminate the algorithm.
@@ -834,7 +822,7 @@ c        Compute the infinity norm of the projected (-)gradient.
  
 c        Print iteration information.
 
-         call prn2lb(n,x,f,g,iprint,itfile,iter,nfgv,nact,
+         call prn2lb(n,x,f,g,iprint,iter,nfgv,nact,
      +               sbgnrm,nseg,word,iword,iback,stp,xstep)
          goto 1000
       endif
@@ -927,7 +915,7 @@ c -------------------- the end of the loop -----------------------------
  999  continue
       call timer(time2)
       time = time2 - time1
-      call prn3lb(n,x,f,task,iprint,info,itfile,
+      call prn3lb(n,x,f,task,iprint,info,
      +            iter,nfgv,nintol,nskip,nact,sbgnrm,
      +            time,nseg,word,iback,stp,xstep,k,
      +            cachyt,sbtime,lnscht)
@@ -941,7 +929,6 @@ c     Save local variables.
       lsave(4)  = updatd
 
       isave(1)  = nintol 
-      isave(3)  = itfile 
       isave(4)  = iback 
       isave(5)  = nskip 
       isave(6)  = head 
@@ -1361,8 +1348,6 @@ c        0<iprint<99 print also f and |proj g| every iprint iterations;
 c        iprint=99   print details of every iteration except n-vectors;
 c        iprint=100  print also the changes of active set and final x;
 c        iprint>100  print details of every iteration including x and g;
-c       When iprint > 0, the file iterate.dat will be created to
-c                        summarize the iteration.
 c
 c     sbgnrm is a double precision variable.
 c       On entry sbgnrm is the norm of the projected gradient at x.
@@ -2673,9 +2658,9 @@ c                                             and the last column of SS:
 
 c======================= The end of matupd =============================
 
-      subroutine prn1lb(n, m, l, u, x, iprint, itfile, epsmch)
+      subroutine prn1lb(n, m, l, u, x, iprint, epsmch)
  
-      integer n, m, iprint, itfile
+      integer n, m, iprint
       double precision epsmch, x(n), l(n), u(n)
 
 c     ************
@@ -2705,9 +2690,6 @@ c     ************
          write (6,7001) epsmch
          write (6,*) 'N = ',n,'    M = ',m
          if (iprint .ge. 1) then
-            write (itfile,2001) epsmch
-            write (itfile,*)'N = ',n,'    M = ',m
-            write (itfile,9001)
             if (iprint .gt. 100) then
                write (6,1004) 'L =',(l(i),i = 1,n)
                write (6,1004) 'X0 =',(x(i),i = 1,n)
@@ -2744,11 +2726,11 @@ c     ************
 
 c======================= The end of prn1lb =============================
 
-      subroutine prn2lb(n, x, f, g, iprint, itfile, iter, nfgv, nact, 
+      subroutine prn2lb(n, x, f, g, iprint, iter, nfgv, nact, 
      +                  sbgnrm, nseg, word, iword, iback, stp, xstep)
  
       character*3      word
-      integer          n, iprint, itfile, iter, nfgv, nact, nseg,
+      integer          n, iprint, iter, nfgv, nact, nseg,
      +                 iword, iback
       double precision f, sbgnrm, stp, xstep, x(n), g(n)
 
@@ -2798,8 +2780,6 @@ c                             the truncated Newton step has been used.
          imod = mod(iter,iprint)
          if (imod .eq. 0) write (6,2001) iter,f,sbgnrm
       endif
-      if (iprint .ge. 1) write (itfile,3001)
-     +          iter,nfgv,nseg,nact,word,iback,stp,xstep,sbgnrm,f
 
  1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))
  2001 format
@@ -2812,14 +2792,14 @@ c                             the truncated Newton step has been used.
 
 c======================= The end of prn2lb =============================
 
-      subroutine prn3lb(n, x, f, task, iprint, info, itfile, 
+      subroutine prn3lb(n, x, f, task, iprint, info, 
      +                  iter, nfgv, nintol, nskip, nact, sbgnrm, 
      +                  time, nseg, word, iback, stp, xstep, k, 
      +                  cachyt, sbtime, lnscht)
  
       character*60     task
       character*3      word
-      integer          n, iprint, info, itfile, iter, nfgv, nintol,
+      integer          n, iprint, info, iter, nfgv, nintol,
      +                 nskip, nact, nseg, iback, k
       double precision f, sbgnrm, time, stp, xstep, cachyt, sbtime,
      +                 lnscht, x(n)
@@ -2873,23 +2853,6 @@ c     ************
             if (info .eq. -8) write (6,9018)
             if (info .eq. -9) write (6,9019)
          endif
-         if (iprint .ge. 1) then
-            if (info .eq. -4 .or. info .eq. -9) then
-               write (itfile,3002)
-     +             iter,nfgv,nseg,nact,word,iback,stp,xstep
-            endif
-            write (itfile,3009) task
-            if (info .ne. 0) then
-               if (info .eq. -1) write (itfile,9011)
-               if (info .eq. -2) write (itfile,9012)
-               if (info .eq. -3) write (itfile,9013)
-               if (info .eq. -4) write (itfile,9014)
-               if (info .eq. -5) write (itfile,9015)
-               if (info .eq. -8) write (itfile,9018)
-               if (info .eq. -9) write (itfile,9019)
-            endif
-            write (itfile,3008) time
-         endif
       endif
 
  1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))
@@ -3152,8 +3115,6 @@ c        0<iprint<99 print also f and |proj g| every iprint iterations;
 c        iprint=99   print details of every iteration except n-vectors;
 c        iprint=100  print also the changes of active set and final x;
 c        iprint>100  print details of every iteration including x and g;
-c       When iprint > 0, the file iterate.dat will be created to
-c                        summarize the iteration.
 c
 c     info is an integer variable.
 c       On entry info is unspecified.