Skip to content

Commit

Permalink
Revert "count SpMV operations as iterations in IDR"
Browse files Browse the repository at this point in the history
This reverts commit b59befe.
  • Loading branch information
upsj committed Feb 5, 2021
1 parent c53bf0f commit faa1a62
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions core/solver/idr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,7 @@ void Idr<ValueType>::iterate(const LinOp *b, LinOp *x) const

/* Memory movement summary for iteration with subspace dimension s
* Per iteration:
* (11/2s+10+7/(s+1))n * values + matrix/preconditioner storage
* For (s+1) iterations:
* (11/2s^2+31/2s+17)n * values + (s+1) * matrix/preconditioner storage
* (11/2s^2+31/2s+18)n * values + (s+1) * matrix/preconditioner storage
* (s+1)x SpMV: 2(s+1)n * values + (s+1) * storage
* (s+1)x Preconditioner: 2(s+1)n * values + (s+1) * storage
* 1x multidot (gemv) (s+1)n
Expand All @@ -188,6 +186,7 @@ void Idr<ValueType>::iterate(const LinOp *b, LinOp *x) const
* 2x norm2 2n
* 1x scale 2n
* 2x axpy 6n
* 1x norm2 residual n
*/
while (true) {
++total_iter;
Expand All @@ -206,10 +205,6 @@ void Idr<ValueType>::iterate(const LinOp *b, LinOp *x) const
subspace_vectors->apply(residual.get(), f.get());

for (size_type k = 0; k < subspace_dim_; k++) {
++total_iter;
this->template log<log::Logger::iteration_complete>(
this, total_iter, residual.get(), dense_x);

// c = M \ f = (c_1, ..., c_s)^T
// v = residual - sum i=[k,s) of (c_i * g_i)
exec->run(idr::make_step_1(nrhs, k, m.get(), f.get(),
Expand Down

0 comments on commit faa1a62

Please sign in to comment.