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

small sparse test fixes #30874

Merged
merged 1 commit into from
Jan 29, 2019
Merged

small sparse test fixes #30874

merged 1 commit into from
Jan 29, 2019

Conversation

abraunst
Copy link
Contributor

This fixes in the sparse.jl test file

  • a bunch of useless all(...)
  • the construction of an illegal SparseMatrixCSC

@ViralBShah ViralBShah added sparse Sparse arrays test This change adds or pertains to unit tests labels Jan 28, 2019
rowval = [1,2,3]
nzval1 = Int[]
nzval2 = [1,1,1]
A = SparseMatrixCSC(n, n, colptr, rowval, nzval1)
Copy link
Contributor Author

@abraunst abraunst Jan 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this test seems bogus altogether (it's explicitly constructing a bad matrix). I missed the point initially, but I would just eliminate this test (and eventually add throws on construction forcing consistency between buffers).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just read through the discussion in #20464 to refresh my memory. The symbolic factorizations in SuiteSparse don't reference the nzval buffer so this might be related to that. I don't remember if any of SuiteSparse wrappers currently make use of this feature. We should check that. We might have allowed an empty nzval such that people could do symbolic factorizations without the non-zeros but that might not be a good idea to allow such invalid instances of SparseMatrixCSC. Expert users should be able to work directly with CHOLMOD.Sparse for that.

@ViralBShah
Copy link
Member

The changes are all good. @abraunst Do you want to do something about that check buffers test? I would be ok to merge this as is.

@abraunst
Copy link
Contributor Author

The changes are all good. @abraunst Do you want to do something about that check buffers test? I would be ok to merge this as is.

No, it's fine. We can change/remove the test when/if we decide for more strict enforcing of buffer lengths. Thanks!

@ViralBShah ViralBShah merged commit 467d29f into JuliaLang:master Jan 29, 2019
@abraunst abraunst deleted the tests branch January 29, 2019 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sparse Sparse arrays test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants