Bug#921193: libmkl-rt: Octave returns wrong results when large arrays are multiplied

2019-02-04 Thread Mo Zhou
control: tags -1 +wontfix

Hi Ido,

As discussed in [1], I think this issue is not fixable because there
is no bug in either MKL or Octave. The GEMM computation error is just
because the clash between libgomp and libiomp.

If you need to use Octave against MKL, please set the environment
variable to switch threading model to GNU OpenMP or TBB:

  MKL_THREADING_LAYER=gnu
  MKL_THREADING_LAYER=tbb

Please don't set it as MKL_THREADING_LAYER=intel, which could cause
the original problem you described.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921207



Bug#921193: libmkl-rt: Octave returns wrong results when large arrays are multiplied

2019-02-02 Thread Ido Halperin
Package: libmkl-rt
Version: 2019.1.144-4
Severity: important

Dear Maintainer,

After installing intel-mkl and setting MKL as default BLAS/LAPACK
implementation, wrong results are obtained when large arrays are
multiplied in octave. Here is the output of a MWE:


octave:1> x1=0:10;[x1;x1]*[x1;x1]'
ans =

   450792059465624   472496191531028
   512874660819596   531922410008450

  
This result is absolutely wrong. All the elements in the 'ans' matrix
should have the same value. 

For example, after changing back to the original BLAS/LAPACK
implementation, the result is


octave:1> x1=0:10;[x1;x1]*[x1;x1]'
ans =

   385   385
   385   385



which is the right one.


Regards

Ido


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libmkl-rt depends on:
ii  debconf [debconf-2.0]  1.5.70
ii  libatlas3-base [liblapack.so.3]3.10.3-7+b1
ii  libblas3 [libblas.so.3]3.8.0-2
ii  libc6  2.28-5
ii  libgcc-5-dev   5.4.1-4
ii  libgcc-6-dev   6.5.0-1
ii  libgcc-7-dev   7.4.0-2
ii  libgcc-8-dev   8.2.0-15
ii  liblapack3 [liblapack.so.3]3.8.0-2
ii  libmkl-locale  2019.1.144-4
ii  libmkl-meta-computational  2019.1.144-4
ii  libmkl-meta-interface  2019.1.144-4
ii  libmkl-meta-threading  2019.1.144-4
ii  libomp-7-dev   1:7.0.1-4
ii  libomp-dev 1:7.0-47
ii  libopenblas-base [liblapack.so.3]  0.3.5+ds-1

libmkl-rt recommends no packages.

libmkl-rt suggests no packages.

-- debconf information:
* libmkl-rt/use-as-default-blas-lapack: true
* libmkl-rt/exact-so-3-selections: libblas.so.3, liblapack.so.3,
libblas64.so.3, liblapack64.so.3,
  libmkl-rt/title: