From ad9c5f0c427693e19cf06eba103230ae9607ad7c Mon Sep 17 00:00:00 2001
From: Abdullah Alperen <alperena@msu.edu>
Date: Wed, 7 Feb 2018 12:09:40 -0500
Subject: [PATCH] fixed bug on SAI calculation

---
 sPuReMD/src/lin_alg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sPuReMD/src/lin_alg.c b/sPuReMD/src/lin_alg.c
index 110c43a3..93e833a7 100644
--- a/sPuReMD/src/lin_alg.c
+++ b/sPuReMD/src/lin_alg.c
@@ -1699,7 +1699,7 @@ real sparse_approx_inverse( const sparse_matrix * const A,
                 }
                 // change the value if any of the column indices is seen
                 for ( d_j = A->start[pos_x[d_i]];
-                        d_j < A->start[pos_x[d_i + 1]]; ++d_j )
+                        d_j < A->start[pos_x[d_i] + 1]; ++d_j )
                 {
                     if ( Y[A->j[d_j]] == 1 )
                     {
-- 
GitLab