Native Linear Algebra Providers

Math.NET Numerics currently supports two native providers Intel's Math Kernel Library (MKL) and AMD's Core Math Library (ACML).

See also Math.NET Numerics With Native Linear Algebra

MKL (Windows)

  1. Install MKL on your system (we are using v10.3 Update 2).
  2. Open the NativeWrappers.sln in VS 2010 under \src\NativeWrappers\Windows .
  3. Open the Configuration Manager and select either the 32-bit or 64-bit solution platform.
  4. Right click on the MKLWrapper project and update the MKL include directory under C/C++/General and the library directory under Linker/General to point to your MKL installation.
  5. Right click on the MKLWrapper project and click rebuild.
  6. There will be two DLLs in the output directory: Math.NET.Numerics.MKL.dll and libiomp5md.dll. The output directory will be either \src\NativeWrappers\Windows\Win32\Release or \src\NativeWrappers\Windows\x64\release.
  7. Copy the two DLLs from #6 to the same directory as MathNet.Numerics.dll.
  8. Tell the Math.NET Numerics library to use the MKL provider by adding this line to your code:
MathNet.Numerics.Control.LinearAlgebraProvider =
   new MathNet.Numerics.Algorithms.LinearAlgebra.Mkl.MklLinearAlgebraProvider();

ACML (Windows)

  1. Install the Intel Fortran version of ACML on your system (we are using v4.4) - http://developer.amd.com/cpu/Libraries/acml/Pages/default.aspx
  2. Open the NativeWrappers.sln in VS 2010 under \src\NativeWrappers\Windows .
  3. Open the Configuration Manager and select either the 32-bit or 64-bit solution platform.
  4. Right click on the ACMLWrapper project and update the ACML include directory under C/C++/General and the library directory under Linker/General to point to your ACML installation.
  5. Right click on the ACMLWrapper project and click rebuild.
  6. There will be one DLL in the output directory: Math.NET.Numerics.ACML.dll. The output directory will be either \src\NativeWrappers\Windows\Win32\Release or \src\NativeWrappers\Windows\x64\release.
  7. Copy the DLL from #6 to the same directory as MathNet.Numerics.dll.
  8. Copy these DLLS from your ACML installation to the same directory as MathNet.Numerics: libacmlmpdll.dll, libifcoremd.dll, libiomp5md.dll, and libmmd.dll
  9. Tell the Math.NET Numerics library to use the ACML provider by adding this line to your code:
MathNet.Numerics.Control.LinearAlgebraProvider =
   new MathNet.Numerics.Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider();

Note: The ACML wrapper dynamically links the ACML libraries. If you have the Intel Fortran Complier installed you can statically link them.

Last edited Feb 4, 2013 at 11:30 AM by cdrnet, version 3

Comments

No comments yet.