@@ -177,7 +177,7 @@ self: super:
177177 <para>
178178 <link
179179 xlink:href="https://software.intel.com/en-us/mkl">Intel
180− MKL</link> (only works on x86 architecture)
180+ MKL</link> (only works on x86 architecture, unfree)
181181 </para>
182182 <para>
183183 The Nixpkgs attribute is <literal>mkl</literal>.
@@ -211,6 +211,44 @@ self: super:
211211 using <literal>LD_PRELOAD</literal> of libblas.so.3 and
212212 liblapack.so.3.
213213 </para>
214+ <para>
215+ Intel MKL requires an <literal>openmp</literal> implementation
216+ when running with multiple processors. By default,
217+ <literal>mkl</literal> will use Intel’s <literal>iomp</literal>
218+ implementation if no other is specified, but this is a
219+ runtime-only dependency and binary compatible with the LLVM
220+ implementation. To use that one instead, Intel recommends users
221+ set it with <literal>LD_PRELOAD</literal>. Note that
222+ <literal>mkl</literal> is only available on
223+ <literal>x86_64-linux</literal> and
224+ <literal>x86_64-darwin</literal>. Moreover, Hydra is not build
225+ and distributing pre-compiled binaries using it.
226+ </para>
227+ <para>
228+ For BLAS/LAPACK switching to work correctly, all packages must
229+ depend on <literal>blas</literal> or <literal>lapack</literal>.
230+ This ensures that only one BLAS/LAPACK library is used at one
231+ time. There are two versions versions of BLAS/LAPACK currently
232+ in the wild, <literal>LP64</literal> (integer size = 32 bits)
233+ and <literal>ILP64</literal> (integer size = 64 bits). Some
234+ software needs special flags or patches to work with
235+ <literal>ILP64</literal>. You can check if
236+ <literal>ILP64</literal> is used in Nixpkgs with
237+ <varname>blas.isILP64</varname> and
238+ <varname>lapack.isILP64</varname>. Some software does NOT work
239+ with <literal>ILP64</literal>, and derivations need to specify
240+ an assertion to prevent this. You can prevent
241+ <literal>ILP64</literal> from being used with the following:
242+ </para>
243+ <programlisting>
244+{ stdenv, blas, lapack, ... }:
245+
246+assert (!blas.isILP64) && (!lapack.isILP64);
247+
248+stdenv.mkDerivation {
249+ ...
250+}
251+ </programlisting>
214252 </section>
215253 </section>
216254</chapter>