ralna / spral

Sparse Parallel Robust Algorithms Library
https://ralna.github.io/spral/
Other
102 stars 27 forks source link

Fix check in unsymmetric scaling test #211

Closed mjacobse closed 1 month ago

mjacobse commented 1 month ago

cnt counts column-wise, so should be checked up to the number of columns a%n, not the number of rows a%m. Noticed when doing tests for #207 by allocating the exact sizes for each randomly generated matrix rather than the oversized maximum sizes. Perhaps that would be a good general improvement for the tests, even with #207 already fixed?

jfowkes commented 1 month ago

@mjacobse yes agreed. It it a mystery why the oversized maximum sizes are allocated in the tests!

mjacobse commented 1 month ago

@mjacobse yes agreed. It it a mystery why the oversized maximum sizes are allocated in the tests!

To be fair it simplifies things by doing the allocation just once and reusing it for all test cases. But it really has the potential to hide bugs. Would you like me to open a pull request with specifically reallocated arrays for each test case?

jfowkes commented 1 month ago

@mjacobse yes agreed. It it a mystery why the oversized maximum sizes are allocated in the tests!

To be fair it simplifies things by doing the allocation just once and reusing it for all test cases. But it really has the potential to hide bugs. Would you like me to open a pull request with specifically reallocated arrays for each test case?

Yes please, that would be amazing :)