If the lbfgsb bundled with python-scipy is replaced with a separate package, 
the latter should receive something like the following patch, which is 
included in the SciPy-bundled version of lbfgsb per 
https://github.com/scipy/scipy/issues/2261 

(Synopsis: There are a few places in the lbfgsb code where the no-printing flag 
is ignored.)
--- 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

Reply via email to