Skip to content

Segfault in matrix transpose #31

@richardlett

Description

@richardlett

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions