Open matospiso opened 9 months ago
Have you tried AMD? It is better tested and should drop in quite easily. For my work it typically works better than COLAMD.
Alternatively, you could try using the C version of COLAMD from Rust. This would show if the issue is with my translation of the union fields.
https://crates.io/crates/suitesparse_sys https://github.com/rwl/spsolve/blob/main/src/lufact.rs#L48
Hi, thank you for your response. For the purposes of my project I wrote simple Python bindings for the official C implementation of COLAMD, and it's working fine even on inputs where the Rust code panics. Consequently, the bug is most likely in the translation.
Hello, I'd like to use your code for an application in recommender systems, which currently computes
colamd
throughcholmod
using a Python wrapper (https://scikit-sparse.readthedocs.io/en/latest/) - and I would like to get rid of this dependency and use your code instead. However, I stumbled upon several cases where the algorithm panics on valid input. Could you help me solve it? 🙂Disclaimer: I'm very new to Rust and can't debug this on my own. It's possible I made a mistake somewhere in my Rust code, please be patient.
Problem
colamd
panics on valid input -- symbolic sparse matrix, even a small one.I created 3 small test cases:
100
is a 100x100 submatrix of matrix101
.101
is a 101x101 submatrix of matrix120
. Matrix120
has shape 120x120, and is a submatrix of a large sparse matrix (see section Data)colamd
runs fine for matrix100
101
and120
(see console outputs)How to run
rust_colamd
), runcargo build
cargo run
To see outputs for matrix
101
, uncomment the line inmain()
Console outputs
100x100 matrix
101x101 matrix
120x120 matrix
Reproducing the issue
Rust version
File structure
Data
ratings.csv
in this dataset)Running
colamd
on the full matrix also panics, that's how I initially found out, but I created some smaller submatrices to demonstrate the issue.Cargo.toml
main.rs