bkochuna / ners570f24-SpMV

3 stars 0 forks source link

Add ELL view tests #43

Open KyleVaughn opened 2 weeks ago

KyleVaughn commented 2 weeks ago

Description:

Added by @S-A-Almohri

This issue involves adding a suite of tests for the ELL view within the sparse matrix library to ensure its correctness and performance. The tests should verify that the ELL format handles various scenarios correctly, including edge cases, and performs as expected. An additional check with Python might be implemented using SciPy functions to validate results.

Tasks:

Added by @S-A-Almohri

Review Existing ELL Implementation:

Define Test Cases:

Basic functionality: Verify that simple, small matrices are correctly represented in ELL format. Edge cases: Empty matrices, matrices with a single element, symmetric matrices, and very sparse matrices. Performance: Measure the performance of SpMV using ELL format for larger matrices.

Implement Unit Tests:

Run and Validate Tests:

Definition of done:

Added by @S-A-Almohri

NiloyGupta-UM commented 6 days ago

I don't think performance tests fall under the scope of this issue; all these tests need to do is check that the implemented methods work and produce the expected behavior. Furthermore, assuming you are referring to sparse matrix-vector multiplication operations when writing "SpMV", that falls under another issue and should not be part of this one.

Also, specifically because ELL requires padding, making sure that the padded values are properly printed/written would be a good test. What "properly" means in this case might be defined in another issue concerning the ELL format or may need to be discussed by the group.

I think a good edge test case to add would be a matrix with a row of all zeros. Furthermore, a test should be added to check if matrix values accidentally get modified during the execution of the viewing methods. Otherwise, the cases you mentioned are a good set. It might also be beneficial to add a requirement that explicitly states that the library's testing framework should be utilized, but, depending on the group's opinion, this may already be an implicit one.

S-A-Almohri commented 6 days ago

Thanks for the thorough review. Sorry for not being clear, when I say SpMV I refer to the script, and by performance check against SciPy, I mean checking for time it takes to print and view each. The second bullet point just had that extra part, I changed it.