Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrices with zero diagonal entries in hypre_ParCSRTMatMatKTDevice #1097

Open
v-dobrev opened this issue Jun 5, 2024 · 1 comment
Open

Comments

@v-dobrev
Copy link

v-dobrev commented Jun 5, 2024

I ran into the following issue while running tests in MFEM with HYPRE built with CUDA and --enable-debug: the hypre_assert in hypre_ParCSRTMatMatKTDevice, here:

hypre_assert(!hypre_CSRMatrixCheckDiagFirstDevice(hypre_ParCSRMatrixDiag(C)));

fails when the diagonal block of C has zero entries on the diagonal which are not present in the sparsity pattern and the row still contains other non-zero entries. If the row is empty, i.e. there are no entries in the sparsity pattern of the row, then the check does not fail. On the other hand, the call that aims to put the diagonal entries first:

hypre_CSRMatrixMoveDiagFirstDevice(C_diag);

works fine in this case -- it just ignores the rows that do not contain a diagonal entry.

This is a special case, however, I think it will be better to not generate an error for this in debug mode. What do you think?

@liruipeng
Copy link
Contributor

I agree. We probably want to remove this assertion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants