Skip to content

Commit

Permalink
Merge pull request #7306 from vbrunini/ilut_memory_usage
Browse files Browse the repository at this point in the history
ifpack2: Reduce ILUT memory usage.
  • Loading branch information
kddevin authored May 6, 2020
2 parents 931d9ac + 63887f3 commit 27d6e35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/ifpack2/src/Ifpack2_ILUT_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,13 @@ void ILUT<MatrixType>::compute ()
// Now allocate and fill the matrices
Array<size_t> nnzPerRow(myNumRows);

// Make sure to release the old memory for L & U prior to recomputing to
// avoid bloating the high-water mark.
L_ = Teuchos::null;
U_ = Teuchos::null;
L_solver_->setMatrix(Teuchos::null);
U_solver_->setMatrix(Teuchos::null);

for (local_ordinal_type row_i = 0 ; row_i < myNumRows ; ++row_i) {
nnzPerRow[row_i] = L_tmp_idx[row_i].size();
}
Expand Down

0 comments on commit 27d6e35

Please sign in to comment.