# MKL: what are the issues these days?

**URL:** <https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191>\
**Category:** Internals & Design\
**Created:** [November 30, 2018, 8:52pm UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191 "2018-11-30T20:52:25Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 30, 2018, 8:52pm UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/1 "2018-11-30T20:52:25Z")

</div>

I understand the JuliaPro does not ship MKL version anymore. There is an explanation of the situation in 2016 by @StefanKarpinski :

_This is not a technical issue primarily, it’s a legal one. You can easily build Julia with MKL, but as long as Julia ships with GPL libraries like FFTW and SuiteSparse, shipping Julia with MKL is illegal. Non-GPL licenses for both FFTW and SuiteSparse can be purchased, but obviously that’s not a viable open source default. If you’re willing to pay for a commercially supported Julia Pro, then you can get Julia built with non-GPL versions of these libraries and MKL._

from [https://github.com/JuliaLang/julia/issues/18374](https://github.com/JuliaLang/julia/issues/18374). So what prevents Julia from shipping with MKL instead of (or addition to) OpenBLAS? Does this legal argument still apply? Or is it perhaps developer-time issue? Or some other technical difficulty?

PS: If anyone has Julia with MKL built, would it be possible to run the test discussed in [Performance gotcha in linear algebra lu() - #11 by PetrKryslUCSD](https://discourse.julialang.org/t/performance-gotcha-in-linear-algebra-lu/18128/11)? It would be much appreciated!

---

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [November 30, 2018, 10:29pm UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/2 "2018-11-30T22:29:20Z")

</div>

I’ve tried to build it but on Windows but I get all kind of errors.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [November 30, 2018, 11:12pm UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/3 "2018-11-30T23:12:28Z")

</div>

Still legal: some of SuiteSparse is GPL. In order to use it legally, we must abide by the terms of its license, which requires that the derived work (`julia`) follow the rules of the GPL. This means that all code that we ship as part of `julia` must be provided under terms compatible with the GPL. That’s no problem for MIT or BSD code, but MKL is distinctly not something that we can ship under terms compatible with the GPL since it is closed source. Therefore, if we shipped `julia` with MKL, we would be violating the terms of SuiteSparse’s license, voiding our legal permission to use it. Dynamic versus static linking does not alleviate this responsibility: anything that is clearly intended to be part of the derived work counts.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [November 30, 2018, 11:22pm UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/4 "2018-11-30T23:22:54Z")

</div>

Is suite sparse ever going to be moved out of the Julia repo to a package? If so, would that help here?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 1, 2018, 12:17am UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/5 "2018-12-01T00:17:37Z")

</div>

Yes, that would fix the problem and allow us to ship Julia with MKL. This is one of the reasons we’ve been trying to move functionality like sparse at arrays and arpack out of Base.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [December 1, 2018, 12:23am UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/6 "2018-12-01T00:23:49Z")

</div>

I have to say I am lost. If SuiteSparse (ss) was a stand-alone package, JuliaPro would be able to ship Julia with MKL, but no one would be able to use ss with Julia then, because Julia would be distributed with a license incompatible with that of ss. Or am I misundertanding?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 1, 2018, 12:36am UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/7 "2018-12-01T00:36:08Z")

</div>

Loading it as an add-on package would be fine. That does not create a derived work because Julia would then be fully functional and complete without the package, which means that Julia is not a derived work. However, since we ship SuiteSparse and build it with Julia and build it into the system image, it’s very questionable to try to try to claim that what we ship is not a derived work including SuiteSparse.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [December 1, 2018, 12:43am UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/8 "2018-12-01T00:43:45Z")

</div>

So to clarify: Julia would be shipped with a different license? Not MIT?  
Also developers who use Julia and “derive” their work by building on ss would be in trouble?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 1, 2018, 12:51am UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/9 "2018-12-01T00:51:59Z")

</div>

Julia’s code is and will remain MIT licensed,  
regardless of what we combine it with. The derived work that is the `julia` binary that we ship is a combination of MIT, GPL, BSD and a few others—the requirements of using it are effectively the same as the legal requirements of the GPL (it’s a very slightly larger superset). Writing programs or packages in Julia does not create a derived work. If you were to build a custom system image including your code and then ship that, while including SuiteSparse, then that would be a derived work and the GPL would apply. MIT and BSD licenses don’t talk about “derived works” so the concept doesn’t really matter when considering whether you’re complying with them.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [December 1, 2018, 12:53am UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/10 "2018-12-01T00:53:27Z")

</div>

Ah, that makes sense. Thanks for the clarification.

---

<div class="post-metadata">

**Author:** ![waldyrious](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/waldyrious/32/80_2.png) [@waldyrious](https://discourse.julialang.org/u/waldyrious)\
**Post date:** [December 1, 2018, 2:40pm UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/11 "2018-12-01T14:40:32Z")

</div>

> [@Mason](#):
>
> Is suite sparse ever going to be moved out of the Julia repo to a package? If so, would that help here?

> [@StefanKarpinski](#):
>
> Yes, that would fix the problem and allow us to ship Julia with MKL. This is one of the reasons we’ve been trying to move functionality like sparse at arrays and arpack out of Base.

If I’m reading [#27460](https://github.com/JuliaLang/julia/issues/27460) correctly, ARPACK was removed in [#27616](https://github.com/JuliaLang/julia/pull/27616), and the SuiteSparse removal is being worked in [#27638](https://github.com/JuliaLang/julia/pull/27638), right? Or are there additional issues not tracked by those?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 1, 2018, 3:45pm UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/12 "2018-12-01T15:45:54Z")

</div>

You are reading that correctly. After that I think the base language will be non-GPL and we will be legally able to ship with MKL as an option.

---

<div class="post-metadata">

**Author:** ![non-Jedi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-jedi/32/3645_2.png) [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Post date:** [July 16, 2019, 12:44pm UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/14 "2019-07-16T12:44:47Z")

</div>

Crossposting in general is rude, and necroing old topics to do so is even ruder. Please don’t do so in the future.

On the actual topic of anaconda and MKL, I don’t believe numpy includes or is derived from GPL code, so the legal barriers to bundling it with MKL are not significant compared to Julia.

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [July 16, 2019, 1:17pm UTC](https://discourse.julialang.org/t/mkl-what-are-the-issues-these-days/18191/16 "2019-07-16T13:17:01Z")

</div>

> [@Amin\_Yahyaabadi](#):
>
> This is not acceptable.

Please, relax and mind your tone.
