Skip to content

Installation Guide

Martin Kroeker edited this page Sep 22, 2017 · 29 revisions

Quick Installation

Precompiled packages have recently become available for a number of platforms through their normal installation procedures, so the instructions below are mostly relevant when you want to try the most recent development snapshot from git.

Linux

Just type make to compile the library.

Notes

  • OpenBLAS doesn't support g77. Please use gfortran or other Fortran compilers. e.g. make FC=gfortran.
  • When building in an emulator (KVM,QEMU etc.) make sure that the combination of CPU features exposed to the virtual environment matches that of an existing CPU to allow detection of the cpu model to succeed. (With qemu, this can be done by passing -cpu host or a supported model name at invocation)

Windows

In order to build OpenBLAS on Windows you will need:

Simply download, unzip, add to the PATH environment variable.

Alternatively, you can install

Then run make (or execute the provided quickbuild.win32 or quickbuild.win64 script files as appropriate) in the base folder of the OpenBLAS sources. Note: don't be alarmed if you see the lib command fail. This is optional and only needed if you would like to dynamically link OpenBLAS from within Visual Studio. For further details see this page.

Mac OSX

If your CPU is Sandy Bridge, please use Clang version 3.1 and above. The Clang 3.0 will generate the wrong AVX binary code of OpenBLAS.

FreeBSD

You will need to install the following tools from the FreeBSD ports tree:

  • lang/gcc [1]
  • lang/perl5.12
  • ftp/curl
  • devel/gmake
  • devel/patch

To compile run the command:

$ gmake CC=gcc46 FC=gfortran46

Note that you need to build with GNU make and manually specify the compiler, otherwhise gcc 4.2 from the base system would be used.

[1]: Removal of Fortran from the FreeBSD base system

Android

See https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-Android

MIPS

See https://github.com/xianyi/OpenBLAS/wiki/Faq#mips