[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#990113: marked as done ([pre-approval] unblock: armadillo/1:10.1.2+dfsg-6)



Your message dated Wed, 23 Jun 2021 18:42:32 +0200
with message-id <CAM8zJQvf6OGy7EcaBMijA8zg+fUw2Ce7N4KOTcVAo+xJmDXofQ@mail.gmail.com>
and subject line Re: Bug#990113: release.debian.org: Permission to upload armadillo: sparse matrix bug fix
has caused the Debian Bug report #990113,
regarding [pre-approval] unblock: armadillo/1:10.1.2+dfsg-6
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
990113: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990113
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal

Dear Release Team,

Please permit me to upload the attached targeted fix from upstream
that fixed erroneous calculations relating to sparse diagonal
matrices. This fix is needed to prevent some numerical errors, and I
request you to consider this positively.

Thanks.

Kumar
>From 158c2a523c29b1aa883fd410e4b695c8f9859944 Mon Sep 17 00:00:00 2001
From: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
Date: Mon, 21 Jun 2021 09:43:47 +0530
Subject: [PATCH] Add patch from upstream for fixing sparse matrix related bug.

---
 debian/changelog                             |  6 +++
 debian/patches/armadillo_spdiag_bugfix.patch | 53 ++++++++++++++++++++
 debian/patches/series                        |  2 +-
 3 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/armadillo_spdiag_bugfix.patch

diff --git a/debian/changelog b/debian/changelog
index 730ef566..1a405ec6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+armadillo (1:10.1.2+dfsg-6) unstable; urgency=medium
+
+  * Add patch from upstream for fixing sparse matrix related bug.
+
+ -- Kumar Appaiah <akumar@debian.org>  Mon, 21 Jun 2021 09:43:00 +0530
+
 armadillo (1:10.1.2+dfsg-5) unstable; urgency=medium
 
   * Add patches from upstream for pinv and rcond bugs
diff --git a/debian/patches/armadillo_spdiag_bugfix.patch b/debian/patches/armadillo_spdiag_bugfix.patch
new file mode 100644
index 00000000..e0c62748
--- /dev/null
+++ b/debian/patches/armadillo_spdiag_bugfix.patch
@@ -0,0 +1,53 @@
+--- armadillo-10.1.2/include/armadillo_bits/spglue_merge_meat.hpp	2016-06-17 02:22:12.000000000 +1000
++++ armadillo-10.1.2-spdiag-bugfix/include/armadillo_bits/spglue_merge_meat.hpp	2021-06-21 12:10:16.212683012 +1000
+@@ -485,7 +485,7 @@
+   
+   while( (x_it != x_end) || (y_it != y_end) )
+     {
+-    eT out_val;
++    eT out_val = eT(0);
+     
+     const uword x_it_col = x_it.col();
+     const uword x_it_row = x_it.row();
+@@ -508,28 +508,29 @@
+       {
+       if((x_it_col < y_it_col) || ((x_it_col == y_it_col) && (x_it_row < y_it_row))) // if y is closer to the end
+         {
+-        out_val = (*x_it);
++        if(x_it_col != x_it_row)  { out_val = (*x_it); }  // don't take values from the main diagonal of A
+         
+         ++x_it;
+         }
+       else
+         {
+-        out_val = (*y_it);
++        if(y_it_col == y_it_row)  { out_val = (*y_it); use_y_loc = true; }  // take values only from the main diagonal of B
+         
+         ++y_it;
+-        
+-        use_y_loc = true;
+         }
+       }
+     
+-    access::rw(out.values[count]) = out_val;
+-    
+-    const uword out_row = (use_y_loc == false) ? x_it_row : y_it_row;
+-    const uword out_col = (use_y_loc == false) ? x_it_col : y_it_col;
+-    
+-    access::rw(out.row_indices[count]) = out_row;
+-    access::rw(out.col_ptrs[out_col + 1])++;
+-    ++count;
++    if(out_val != eT(0))
++      {
++      access::rw(out.values[count]) = out_val;
++      
++      const uword out_row = (use_y_loc == false) ? x_it_row : y_it_row;
++      const uword out_col = (use_y_loc == false) ? x_it_col : y_it_col;
++      
++      access::rw(out.row_indices[count]) = out_row;
++      access::rw(out.col_ptrs[out_col + 1])++;
++      ++count;
++      }
+     }
+   
+   const uword out_n_cols = out.n_cols;
diff --git a/debian/patches/series b/debian/patches/series
index 4a679fbd..83b685e8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,4 +2,4 @@ armadillo_sign_bugfix.patch
 armadillo_princomp_bugfix.patch
 armadillo_pinv_bugfix.patch
 armadillo_rcond_bugfix.patch
-
+armadillo_spdiag_bugfix.patch
-- 
2.30.1


--- End Message ---
--- Begin Message ---
Hi Kumar

On Wed, 23 Jun 2021 at 08:40, Kumar Appaiah <a.kumar@alumni.iitm.ac.in> wrote:
> I have completed all of these. I think we should be ready for
> unblock. Please let me know if someting else is needed.

Thanks!  Nothing else needed, unblocked.

Regards
Graham

--- End Message ---

Reply to: