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

Segfault in matrix transpose #31

Open
richardlett opened this issue Jul 20, 2021 · 1 comment
Open

Segfault in matrix transpose #31

richardlett opened this issue Jul 20, 2021 · 1 comment

Comments

@richardlett
Copy link
Collaborator

Issue I neglected earlier

Data set:

/project/projectdirs/mp309/bella-spgemm/ecoli_hifi_29x.fastq

Parameters:

-k 31 -l 20 -u 23

Fix:

The issue appears to be in include/common/transpose.h, ~ line 35.

for (IT i=0; i <= n; i++)
{
    cscColPtr[i+1] = atomicColPtr[i] + cscColPtr[i];
}

cscColPtr

is of length n+1 I believe (n rows, n+1 stores nnz).

However this writes at location n+1 (i.e. n+2nd element), causing out of bounds.

I believe the correct code would be

for (IT i=0; i < n; i++)

cscColPtr[i+1] already handles the +1 size correctly for the last index (n).

@giuliaguidi
Copy link
Collaborator

@richardlett has this been fixed?

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