From 5806cb271b9d7a71abda698de695b18459f471a6 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Thu, 30 Jul 2020 10:19:14 +0200 Subject: Let GBP reformat older patches. --- debian/patches/replace-linpack-with-lapack.patch | 24 +++++++++++++++++------- debian/patches/silence.patch | 14 ++++++++++++-- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/debian/patches/replace-linpack-with-lapack.patch b/debian/patches/replace-linpack-with-lapack.patch index 83e3261..a875ea2 100644 --- a/debian/patches/replace-linpack-with-lapack.patch +++ b/debian/patches/replace-linpack-with-lapack.patch @@ -1,11 +1,21 @@ +From: Gard Spreemann +Date: Thu, 30 Jul 2020 09:57:45 +0200 +Subject: replace-linpack-with-lapack + The library code originally uses LINPACK (from an embedded copy). Since LINPACK has largely been superseded by LAPACK, this patch replaces calls to the former with equivalent calls to the latter. Specifically, dpofa is replaced by dpotrf, and dtrsl is replaced by dtrtrs. +--- + lbfgsb.f | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/lbfgsb.f b/lbfgsb.f +index 9c9e7d9..54fd1f9 100644 --- a/lbfgsb.f +++ b/lbfgsb.f -@@ -1185,7 +1185,7 @@ +@@ -1185,7 +1185,7 @@ c solve Jp2=v2+LD^(-1)v1. p(i2) = v(i2) + sum 20 continue c Solve the triangular system @@ -14,7 +24,7 @@ replaced by dtrtrs. if (info .ne. 0) return c solve D^(1/2)p1=v1. -@@ -1197,7 +1197,7 @@ +@@ -1197,7 +1197,7 @@ c PART II: solve [ -D^(1/2) D^(-1/2)*L' ] [ p1 ] = [ p1 ] c [ 0 J' ] [ p2 ] [ p2 ]. c solve J^Tp2=p2. @@ -23,7 +33,7 @@ replaced by dtrtrs. if (info .ne. 0) return c compute p1=-D^(-1/2)(p1-D^(-1/2)L'p2) -@@ -2135,7 +2135,7 @@ +@@ -2135,7 +2135,7 @@ c [(-L_a +R_z)L'^-1 S'AA'S*theta ] c first Cholesky factor (1,1) block of wn to get LL' c with L' stored in the upper triangle of wn. @@ -32,7 +42,7 @@ replaced by dtrtrs. if (info .ne. 0) then info = -1 return -@@ -2143,7 +2143,7 @@ +@@ -2143,7 +2143,7 @@ c with L' stored in the upper triangle of wn. c then form L^-1(-L_a'+R_z') in the (1,2) block. col2 = 2*col do 71 js = col+1 ,col2 @@ -41,7 +51,7 @@ replaced by dtrtrs. 71 continue c Form S'AA'S*theta + (L^-1(-L_a'+R_z'))'L^-1(-L_a'+R_z') in the -@@ -2158,7 +2158,7 @@ +@@ -2158,7 +2158,7 @@ c upper triangle of (2,2) block of wn. c Cholesky factorization of (2,2) block of wn. @@ -50,7 +60,7 @@ replaced by dtrtrs. if (info .ne. 0) then info = -2 return -@@ -2227,7 +2227,7 @@ +@@ -2227,7 +2227,7 @@ c store T in the upper triangle of the array wt. c Cholesky factorize T to J*J' with c J' stored in the upper triangle of wt. @@ -59,7 +69,7 @@ replaced by dtrtrs. if (info .ne. 0) then info = -3 endif -@@ -3208,12 +3208,12 @@ +@@ -3208,12 +3208,12 @@ c Compute wv:=K^(-1)wv. m2 = 2*m col2 = 2*col diff --git a/debian/patches/silence.patch b/debian/patches/silence.patch index 828b96c..7d34a63 100644 --- a/debian/patches/silence.patch +++ b/debian/patches/silence.patch @@ -1,3 +1,7 @@ +From: Gard Spreemann +Date: Thu, 30 Jul 2020 09:57:45 +0200 +Subject: silence + 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 @@ -5,9 +9,15 @@ fixes. A similar patch was also applied by the SciPy project (see their issue 3238). +--- + lbfgsb.f | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/lbfgsb.f b/lbfgsb.f +index 54fd1f9..008370d 100644 --- a/lbfgsb.f +++ b/lbfgsb.f -@@ -2550,7 +2550,9 @@ +@@ -2550,7 +2550,9 @@ c Determine the maximum step length. if (gd .ge. zero) then c the directional derivative >=0. c Line search is impossible. @@ -18,7 +28,7 @@ A similar patch was also applied by the SciPy project (see their issue info = -4 return endif -@@ -3279,8 +3281,10 @@ +@@ -3279,8 +3281,10 @@ c 55 continue if ( dd_p .gt.zero ) then call dcopy( n, xp, 1, x, 1 ) -- cgit v1.2.3