Add diag sorting to Schwarz precond w/ l1 smoother#1939
Add diag sorting to Schwarz precond w/ l1 smoother#1939
Conversation
af8c930 to
9cc6d8f
Compare
|
I lowered the test tolerance for gko::half a bit |
191146a to
f32eb8c
Compare
| #include <cmath> | ||
| #include <memory> |
| l1_diag_csr->sort_by_column_index(); // spgeam requires sorting for | ||
| // some backends |
There was a problem hiding this comment.
Does it indeed solve the problems?
l1_diag should only contain the diagonal entry per row.
The column index should be perfectly sorted because of only one entry.
There was a problem hiding this comment.
ok, this totally makes sense... I'm not sure how I haven't noticed this, maybe I was just too overwhelmed trying to understand the preconditioner logic generally. I don't even know what the issue is about then, as I thought that it's described very clearly.
a8b7b4d to
49c0aba
Compare
yhmtsai
left a comment
There was a problem hiding this comment.
the new test seems to be wrong.
Could you also check whether it is failed before fix?
The dist_mtx should already store the matrix in order.
You need to create the distributed matrix by hand first.
test/mpi/preconditioner/schwarz.cpp
Outdated
| .with_generated_preconditioner(this->local_solver_factory->generate( | ||
| gko::copy_and_convert_to<local_matrix_type>( | ||
| this->exec, non_dist_diag_with_l1))) |
There was a problem hiding this comment.
It is not the same matrix.
Schwarz L1 smoother adds the row absolute sum from non-local to diagonal of local matrix but it still keeps the off-diagonal matrix of local matrix.
f43a102 to
3276015
Compare
3276015 to
74133ad
Compare
6c57178 to
f2e0827
Compare
|
@yhmtsai I made a completely new test and made sure that it wouldn't have been passed prior to these changes, so it seems to be correct. I also rebased this PR and cleaned up the commit history a bit. please tell me if this is ok, so that I add this PR to the changelog (I don't want to add a raw PR there). |
618b3a2 to
ad702fc
Compare
ad702fc to
26710fc
Compare
26710fc to
ae8ac4f
Compare
|
@yhmtsai should I keep rebasing this PR? could you please take a look if what did here in the end matches what you had suggested? |
…ApplyPreconditionedSolverWithL1Smoother`
ae8ac4f to
67059cc
Compare
This PR is basically #1932 but without the sorting check. I've also added a test for a solver with the Schwarz preconditioner with L1 smoothing
Fixes: #1920