Closed
Description
I noticed very peculiar behavior of the dot product when the ndarray-linalg
package is included in a project:
Code to replicate:
extern crate ndarray;
#[cfg(test)]
mod tests {
use ndarray::prelude::*;
#[test]
fn test_dgemv() {
let a = arr2(&[[1.], [2.]]);
let b = arr1(&[1., 2.]);
println!("{:?}", a.t().dot(&b));
}
}
Output:
Intel MKL ERROR: Parameter 7 was incorrect on entry to cblas_dgemv.
[0.0] shape=[1], strides=[1], layout=C | F (0x3), const ndim=1
dependencies:
[dependencies]
ndarray = "0.12.1"
[dependencies.ndarray-linalg]
version = "0.10"
features = ["intel-mkl"]
Note the lack of a panic. If I remove the ndarray-linalg
dependency the output is as expected.
IMO ndarray
should not outsource the dot product to BLAS when another package requires BLAS, but that is secondary to the uncaught error and faulty returned value.
Activity