# Bug with dot() reported by Julia console

**URL:** <https://discourse.julialang.org/t/bug-with-dot-reported-by-julia-console/60570>\
**Category:** General Usage\
**Created:** [May 5, 2021, 12:05pm UTC](https://discourse.julialang.org/t/bug-with-dot-reported-by-julia-console/60570 "2021-05-05T12:05:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamsuddhasattwa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iamsuddhasattwa/32/7441_2.png) [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Post date:** [May 5, 2021, 12:05pm UTC](https://discourse.julialang.org/t/bug-with-dot-reported-by-julia-console/60570/1 "2021-05-05T12:05:22Z")

</div>

I have found that the simple operation of dot product using dot() is leading to a the julia program (v1.5.3) crashing. I think it is a **serious bug**. The following simple command

```julia
using LinearAlgebra;
N = 20000; t1= rand(Complex{Float64}, N); t2= rand(Complex{Float64}, N); t1./=sqrt(N); t2./=sqrt(N); 
dot(t1, t2)

```

immediately leads to

```julia
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0xe submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATIONEXCEPTION_ACCESS_VIOLATION at 0xION_ACCESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0xION_ACCESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0xION_ACCESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0xION_ACCESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0xION_ACCESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x1d3d7280 -- at 0x1d3d7280 -- at 0x1d3d7280 -- at 0x1d3d7280 -- at 0x1d3d7280 -- at 0x1d3d7280 -- at 0x1d3d7280 -- at 0x1d3d7280 -- dcabs164_ at C:\Users\iamsu\AppData\Local\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
in expression starting at REPL[70]:1
 cal\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
in expression starting at REPL[70]:1
in expression starting at REPL[70]:1
 cal\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
in expression starting at REPL[70]:1
in expression starting at REPL[70]:1
 cal\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
in expression starting at REPL[70]:1
in expression starting at REPL[70]:1
dcabs164_ at C:\Users\iamsu\AppData\Local\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
in expression starting at REPL[70]:1
in expression starting at REPL[70]:1
 cal\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
dcabs164_ at C:\Users\iamsu\AppData\Local\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
in expression starting at REPL[70]:1
 cal\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
in expression starting at REPL[70]:1
OPENBLAS_GET_PARALLEL64_ at C:\Users\iamsu\AppData\Local\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
OPENBLAS_GET_PARALLEL64_ at C:\Users\iamsu\AppData\Local\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
openblas_set_num_threads64_ at C:\Users\iamsu\AppData\Local\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
dcabs164_ at C:\Users\iamsu\AppData\Local\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
cblas_zdotc_sub64_ at C:\Users\iamsu\AppData\Local\julia-1.5.3\bin\libopenblas64_.DLL (unknown line)
dotc at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\LinearAlgebra\src\blas.jl:337 [inlined]
dotc at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\LinearAlgebra\src\blas.jl:377
dot at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\LinearAlgebra\src\matmul.jl:10
unknown function (ip: 000000006ea5e13d)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1690 [inlined]
do_call at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:117
eval_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:206

```

and then the window closes.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [May 5, 2021, 12:22pm UTC](https://discourse.julialang.org/t/bug-with-dot-reported-by-julia-console/60570/2 "2021-05-05T12:22:00Z")

</div>

This looks like [Dot abruptly ends Julia session - #4 by jhat](https://discourse.julialang.org/t/dot-abruptly-ends-julia-session/53748/4), note also the issue linked there [EXCEPTION\_ACCESS\_VIOLATION in julia 1.5 · Issue #36976 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/36976)

The GitHub discussion suggests this should be fixed in 1.6.1, although I can still reproduce this on Win 10:

```julia
julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)

julia> using LinearAlgebra

julia> N = 11_000; t1= rand(Complex{Float64}, N); t2= rand(Complex{Float64}, N);

julia> dot(t1, t2)

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x1fe308e0

```

It seems that I’m still on the older OpenBLAS version, despite being on 1.6.1:

```julia
julia> LinearAlgebra.BLAS.openblas_get_config()
"OpenBLAS 0.3.10 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=32"

```

---

<div class="post-metadata">

**Author:** ![iamsuddhasattwa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iamsuddhasattwa/32/7441_2.png) [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Post date:** [May 5, 2021, 12:32pm UTC](https://discourse.julialang.org/t/bug-with-dot-reported-by-julia-console/60570/3 "2021-05-05T12:32:48Z")

</div>

Oh I see… Thank you very much for looking into the matter.  
My BLAS is 0.3.9.

```julia
julia> LinearAlgebra.BLAS.openblas_get_config()
"OpenBLAS 0.3.9 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=32"

```

One curious thing is that, if I resize the vectors to NX1 matrices, the bug is avoiuded !

```julia
N = 20000; t1= rand(Complex{Float64}, N,1); t2= rand(Complex{Float64}, N,1 ); t1./=sqrt(N); t2./=sqrt(N); t1'*t2
1×1 Array{Complex{Float64},2}:
 0.4975290261225185 + 0.00029390224327662385im

```

Is there a way to update the BLAS ?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [May 5, 2021, 3:04pm UTC](https://discourse.julialang.org/t/bug-with-dot-reported-by-julia-console/60570/4 "2021-05-05T15:04:43Z")

</div>

I think in principle yes, not sure how to do it though, you could move to MKL I guess by installing MKL.jl
