-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Installation Guide
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.
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)
In order to build OpenBLAS on Windows you will need:
- MSYS (a collection of Unix tools, including "
make
"). We recommend this distribution: http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/ - MinGW-w64 (GCC for Windows). Either of these work well: (1) mingw-builds or (2) its successor mingw-w64. (It is unclear if the earlier set of rubenvb's Personal Builds of (2): 32-bit or 64-bit that used to be recommended here are still maintained).
Simply download, unzip, add to the PATH environment variable.
Alternatively, you can install
- MSYS2 from https://msys2.github.io/ which includes the package manager
pacman
and use -
pacman -S perl make gcc gcc-fortran
to install the tools and compilers (see https://sourceforge.net/p/msys2/wiki/MSYS2%20introduction/ for details)
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.
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.
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
See https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-Android
See https://github.com/xianyi/OpenBLAS/wiki/Faq#mips