From 0b74b0ca260f0d869cb58a57113eae9617db447c Mon Sep 17 00:00:00 2001
From: Lukas Cejka <lukas.ostatek@gmail.com>
Date: Mon, 19 Nov 2018 20:40:57 +0100
Subject: [PATCH] Fixed mistake where integer division was used for certain
 format declarations. Added commented-out helpful prints to identify errors.

---
 src/TNL/Matrices/ChunkedEllpack_impl.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/TNL/Matrices/ChunkedEllpack_impl.h b/src/TNL/Matrices/ChunkedEllpack_impl.h
index 9d5a0ddee0..00cee63bb2 100644
--- a/src/TNL/Matrices/ChunkedEllpack_impl.h
+++ b/src/TNL/Matrices/ChunkedEllpack_impl.h
@@ -250,6 +250,13 @@ void ChunkedEllpack< Real, Device, Index >::setCompressedRowLengths( ConstCompre
          this->setSlice( rowLengths, sliceIndex, elementsToAllocation );
       this->rowPointers.computePrefixSum();
    }
+   
+//   std::cout << "\ngetRowLength after first if: " << std::endl;
+//   for( IndexType i = 0; i < rowLengths.getSize(); i++ )
+//   {
+//       std::cout << getRowLength( i ) << std::endl;
+//   }
+//   std::cout << "\n";
 
    if( std::is_same< Device, Devices::Cuda >::value )
    {
@@ -274,6 +281,7 @@ void ChunkedEllpack< Real, Device, Index >::setCompressedRowLengths( ConstCompre
       elementsToAllocation = hostMatrix.values.getSize();
    }
    this->maxRowLength = rowLengths.max();
+//   std::cout << "\nrowLengths.max() = " << rowLengths.max() << std::endl;
    Sparse< Real, Device, Index >::allocateMatrixElements( elementsToAllocation );
 }
 
-- 
GitLab