Should we consider using Intel Math Kernel Library?

@rhl said in HipChat: “No Cost Options for Intel Math Kernel Library (MKL), Support yourself, Royalty-Free”? Do we care (things like meas_mosaic can be compiled to use MKL)


  • It’s free, but I don’t think we can redistribute. So would we need to maintain two versions of all code? Or can we require people to install it themselves as a system dependency?
  • Do we need to make this decision now? Is performance at this level enough of a worry today, or are we more worried about just getting good science algorithms?
  • Will this prevent us from running the stack on a smartphone or Raspberry Pi? :smile:

Do we have numbers to indicate how much difference it makes in practice?

Using MKL makes a considerable difference when running meas_mosaic on the HSC side, but that’s not because MKL is any better tuned than Eigen (which is the other option we support right now) - it’s because we’re using multithreaded matrix operations in MKL (meas_mosaic is otherwise an entirely serial problem), and we’re only using one core in Eigen. It looks like it’s impossible to get Eigen to go multi-threaded in meas_mosaic while keeping it single-threaded everywhere else in the stack (it’s controlled by preprocessor symbols, not runtime options), so MKL is currently our only way to parallelize meas_mosaic.

Giving the website a quick scan, it appears we would be able to use MKL internally as an “opensource contributor” under the terms of the “noncommercial use license”.

Most of our end-users would probably be considered “academic researchers” under the terms of a “12 month named-user license”.

Possibly of relevance, a few years ago [policy may have changed since then] I was forced to purchase a license for ICC because AURA is not an accredited academic institution.

The small print for licensing is here:

IANAL; my interpretation is that our internal users would need to register separately and be limited to using MKL on 3 nodes at a time. A per seat “cluster license” is available for purchase for $2500, however, the word cluster does not appear in the fine print. End users would have to re-register every 12 months and be unemployed or purchase a per seat license for $1500.

Select sections from the fine print:

NONCOMMERCIAL USE LICENSE: If You obtained the Materials under a noncommercial use
license, You may use the Materials only for non-commercial use where You receive no fee,
salary or any other form of compensation. The Materials may not be used for any other
purpose, whether "for profit" or "not for profit." Any work performed or produced as a result of
use of the Materials cannot be performed or produced for the benefit of other parties for a fee,
compensation or any other reimbursement or remuneration. You may install copies of the
Materials on an unlimited number of computers provided that You are the only individual usingthe Materials and only one copy of the Materials is in use at any one time. A separate license is
required for each additional use and/or individual user in all other cases, including without
limitation, use by persons, computer systems, and other methods of use known now and in the
future. Intel will provide You with a license key that enables the Materials for a noncommercial-
use license. If You obtained a time-limited noncommercial-use license, the duration (time
period) of Your license and Your ability to use the Materials is limited to the time period of the
obtained license, which is specified on Intel’s download website, specified in the applicable
documentation or controlled by the license key for the Materials.
NAMED-USER LICENSE: If You obtained the Materials under a named-user license, You may
allow only one (1) individual to install and use the Materials on no more than three (3)
computers provided that same individual is using the Materials only on one (1) computer at a
time. If You obtained a time-limited named-user license, the term of Your license and your
ability to use the Materials is limited to the time period of the obtained license, which is specified
on Intel’s download website, specified in the applicable documentation or controlled by the
license key for the Materials.
F. DISTRIBUTION: Distribution of the Redistributables is also subject to the following limitations: You
(i) will be solely responsible to Your customers for any update, support obligation or other liability
which may arise from the distribution, (ii) will not make any statement that Your Product is "certified"
or that its performance is guaranteed by Intel, (iii) will not use Intel's name or trademarks to market
Your Product without written permission from Intel, (iv) will provide a license agreement with
distribution of the Redistributables that prohibits disassembly and reverse engineering of the
Redistributables, (v) will indemnify, hold harmless, and defend Intel and its suppliers from and
against any claims or lawsuits, including attorney's fees, that arise or result from Your modifications,
derivative works or Your distribution of Your Product.

Subjectively, my impression is that Intel’s licensing terms have become more restrictive over time.

I would like to point out that for a lot of commercial software National Labs are often considered 'Government’ and don’t qualify for academic licenses.