summaryrefslogtreecommitdiff
path: root/debian/patches/silence.patch
blob: 828b96c491f9a0172b3319696105eded418a3d21 (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
The library's documentation indicates that it will only write out
messages when the iprint flag is greater than zero. There are two
places where writing still happens unconditionally, which this patch
fixes.

A similar patch was also applied by the SciPy project (see their issue
3238).
--- a/lbfgsb.f
+++ b/lbfgsb.f
@@ -2550,7 +2550,9 @@
          if (gd .ge. zero) then
 c                               the directional derivative >=0.
 c                               Line search is impossible.
-            write(6,*)' ascent direction in projection gd = ', gd
+            if (iprint .ge. 0) then
+               write(6,*)' ascent direction in projection gd = ', gd
+            endif
             info = -4
             return
          endif
@@ -3279,8 +3281,10 @@
  55   continue
       if ( dd_p .gt.zero ) then
          call dcopy( n, xp, 1, x, 1 )
-         write(6,*) ' Positive dir derivative in projection '
-         write(6,*) ' Using the backtracking step '
+         if (iprint .ge. 0) then
+            write(6,*) ' Positive dir derivative in projection '
+            write(6,*) ' Using the backtracking step '
+         endif
       else
          go to 911
       endif