Skip to content

Commit ad73ef5

Browse files
committed
Sort the right matrix
1 parent f32eb8c commit ad73ef5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/distributed/preconditioner/schwarz.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,12 @@ void Schwarz<ValueType, LocalIndexType, GlobalIndexType>::generate(
231231
exec, local_matrix->get_size()[0], std::move(l1_diag_arr));
232232
auto l1_diag_csr = Csr::create(exec);
233233
l1_diag->move_to(l1_diag_csr);
234-
l1_diag_csr->sort_by_column_index(); // spgeam requires sorting for
235-
// some backends
236234
auto id = matrix::Identity<ValueType>::create(
237235
exec, local_matrix->get_size()[0]);
238236
auto one = initialize<matrix::Dense<ValueType>>(
239237
{::gko::one<ValueType>()}, exec);
238+
local_matrix_copy->sort_by_column_index(); // spgeam requires sorting
239+
// for some backends
240240
l1_diag_csr->apply(one, id, one, local_matrix_copy);
241241

242242
this->set_solver(

0 commit comments

Comments
 (0)