# building julia with MKL

**URL:** https://discourse.julialang.org/t/building-julia-with-mkl/7943
**Category:** New to Julia
**Tags:** mkl, build
**Created:** [December 23, 2017, 6:16pm UTC](https://discourse.julialang.org/t/building-julia-with-mkl/7943 "2017-12-23T18:16:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Gertian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gertian/32/213483_2.png) [@Gertian](https://discourse.julialang.org/u/Gertian)
#### Post date: [December 23, 2017, 6:16pm UTC](https://discourse.julialang.org/t/building-julia-with-mkl/7943/1 "2017-12-23T18:16:07Z")

</div>

I am trying to build julia with MKL but I can’t get the Base.runtests(“linalg/arnoldi”) to succeed, i always get:

```julia
julia> Base.runtests("linalg/arnoldi")
Test (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)

signal (11): Segmentation fault
while loading /home/gertian/julia/usr/share/julia/test/linalg/arnoldi.jl, in expression starting on line 5
mkl_blas_avx2_xzdotc at /opt/intel/compilers_and_libraries_2018.1.163/linux/mkl/lib/intel64/libmkl_avx2.so (unknown line)
ZDOTC at /opt/intel/compilers_and_libraries_2018.1.163/linux/mkl/lib/intel64/libmkl_intel_ilp64.so (unknown line)
unknown function (ip: 0x8f)
unknown function (ip: 0x7fff9bee1f47)
unknown function (ip: 0x55ed23a39f9f)
Allocations: 8746084 (Pool: 8743977; Big: 2107); GC: 17
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLang/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 0.6.1
Commit 0d7248e2ff (2017-10-24 22:15 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libmkl_rt
  LAPACK: libmkl_rt
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)

Stacktrace:
 [1] runtests(::String, ::Int64) at ./interactiveutil.jl:691
 [2] runtests(::String) at ./interactiveutil.jl:680

```

My make.user file is:

```julia
USE_MKL=1
MKLLIB = $(MKLROOT)/lib/intel64

```

and I ran the following command right before make -j 4 :

`$source /opt/intel/mkl/bin/mklvars.sh intel64 ilp64`

Any ideas on what might have gone wrong ?

reference:  
[Intel guide for MKL+julia](https://software.intel.com/en-us/articles/julia-with-intel-mkl-for-improved-performance)
