Closed maboesanman closed 3 years ago
I am multiplying a 1x6561 matrix by a 6561x81 matrix, and getting the following error:
1x6561
6561x81
thread 'main' panicked at 'attempt to divide by zero', /Users/mason/.cargo/registry/src/github.com-1ecc6299db9ec823/sprs-0.9.0/src/sparse/smmp.rs:317:50 stack backtrace: 0: 0x10194cec4 - std::backtrace_rs::backtrace::libunwind::trace::hd88477027cbad739 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/../../backtrace/src/backtrace/libunwind.rs:96 1: 0x10194cec4 - std::backtrace_rs::backtrace::trace_unsynchronized::h55d585199a895209 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/../../backtrace/src/backtrace/mod.rs:66 2: 0x10194cec4 - std::sys_common::backtrace::_print_fmt::hb8620cd0e9ce0e63 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/sys_common/backtrace.rs:79 3: 0x10194cec4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h775bfbdf96aa79d0 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/sys_common/backtrace.rs:58 4: 0x101968370 - core::fmt::write::h0ce880d33cd2a300 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/core/src/fmt/mod.rs:1082 5: 0x10194aaeb - std::io::Write::write_fmt::h6147d260c7636915 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/io/mod.rs:1514 6: 0x10194ea85 - std::sys_common::backtrace::_print::h9d922e3b51e90247 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/sys_common/backtrace.rs:61 7: 0x10194ea85 - std::sys_common::backtrace::print::h545d547615f3af71 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/sys_common/backtrace.rs:48 8: 0x10194ea85 - std::panicking::default_hook::{{closure}}::h64d4ee2f4a0f80cc at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/panicking.rs:208 9: 0x10194e7c7 - std::panicking::default_hook::h1c3041b2be9ecd46 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/panicking.rs:227 10: 0x10194f025 - std::panicking::rust_panic_with_hook::hd1eb241d8883c0f2 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/panicking.rs:577 11: 0x10194ebbb - std::panicking::begin_panic_handler::{{closure}}::ha85ecb47a5abde88 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/panicking.rs:484 12: 0x10194d338 - std::sys_common::backtrace::__rust_end_short_backtrace::hff753be7bf3f7879 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/sys_common/backtrace.rs:153 13: 0x10194eb7a - rust_begin_unwind at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/panicking.rs:483 14: 0x1019718bf - core::panicking::panic_fmt::h33aee6f32da9c3a4 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/core/src/panicking.rs:85 15: 0x101971817 - core::panicking::panic::hbacf203cc1296275 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/core/src/panicking.rs:50 16: 0x1018a47b9 - sprs::sparse::smmp::mul_csr_csr_with_workspace::ha51a3ae8cf6efada at /Users/mason/.cargo/registry/src/github.com-1ecc6299db9ec823/sprs-0.9.0/src/sparse/smmp.rs:317 17: 0x1018a2c42 - sprs::sparse::smmp::mul_csr_csr::hc388fa0bbdb749af at /Users/mason/.cargo/registry/src/github.com-1ecc6299db9ec823/sprs-0.9.0/src/sparse/smmp.rs:256 18: 0x1018aa2d4 - sprs::sparse::csmat::<impl core::ops::arith::Mul<&sprs::sparse::CsMatBase<N,I,IpS2,IS2,DS2,Iptr>> for &sprs::sparse::CsMatBase<N,I,IpS1,IS1,DS1,Iptr>>::mul::hf2bbe18df540268a at /Users/mason/.cargo/registry/src/github.com-1ecc6299db9ec823/sprs-0.9.0/src/sparse/csmat.rs:1980 19: 0x1018a6e3b - sprs::sparse::vec::<impl core::ops::arith::Mul<&sprs::sparse::CsMatBase<N,I,IpS2,IS2,DS2,Iptr>> for &sprs::sparse::CsVecBase<IS1,DS1>>::mul::h9a2471a3abbd6b95 at /Users/mason/.cargo/registry/src/github.com-1ecc6299db9ec823/sprs-0.9.0/src/sparse/vec.rs:1109 20: 0x10189cad4 - hanami::distribution_helpers::breed::h92fa492d5b3eec39 at /Users/mason/Projects/hanami/src/distribution_helpers.rs:80 21: 0x1018c131c - hanami::distribution::Distribution::breed::h413b92376d732c51 at /Users/mason/Projects/hanami/src/distribution.rs:28 22: 0x1018c68c1 - hanami::main::hbf4c88e0e80b924d at /Users/mason/Projects/hanami/src/main.rs:26 23: 0x101893dce - core::ops::function::FnOnce::call_once::h687b2e168d0f76fc at /Users/mason/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:227 24: 0x10188a6a1 - std::sys_common::backtrace::__rust_begin_short_backtrace::h4ccaf05d6d7adac3 at /Users/mason/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:137 25: 0x10188a734 - std::rt::lang_start::{{closure}}::h13e1e4b6b811a21e at /Users/mason/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:66 26: 0x10194f3c0 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h9701893602c0d2b8 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/core/src/ops/function.rs:259 27: 0x10194f3c0 - std::panicking::try::do_call::h36661eb24574abc6 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/panicking.rs:381 28: 0x10194f3c0 - std::panicking::try::h793b84fde6338f19 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/panicking.rs:345 29: 0x10194f3c0 - std::panic::catch_unwind::h8193b10b7e6850a4 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/panic.rs:382 30: 0x10194f3c0 - std::rt::lang_start_internal::h4e557833a639e107 at /rustc/d006f5734f49625c34d6fc33bf6b9967243abca8/library/std/src/rt.rs:51 31: 0x10188a711 - std::rt::lang_start::h1a518b7290cfe06e at /Users/mason/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:65 32: 0x1018c6c82 - _main
which is caused by this line which seems to assume the number of rows won't be so low.
https://github.com/maboesanman/hanami/tree/sprs_issue running this on a MacBook Pro, and nb_threads is 6
I am multiplying a
1x6561
matrix by a6561x81
matrix, and getting the following error:which is caused by this line which seems to assume the number of rows won't be so low.