-
Notifications
You must be signed in to change notification settings - Fork 7
Link with CBLAS & LAPACK
mir-blas requires a library with CBLAS ABI. mir-lapack requires a library with LAPACK ABI. Almost all LAPACK and CBLAS implementations requires BLAS ABI.
The default library that combines all ABIs is OpenBLAS.
Note, that OpenBLAS may be compiled without CBLAS and/or LAPACK API. Check that arguments for make
contains NO_CBLAS=0
and NO_LAPACK=0
.
The following instruction uses SDL format for dub configurations.
$ sudo apt install libopenblas-dev
The default configution for mir-blas
and mir-lapack
is "openblas"
Note: Ubuntu Trusty and previous has deprecated OpenBLAS that may not have all required for you ABI. For deprecated ubuntu use liblapack-dev
instead and add the following sub configuration in your project
# in dub.sdl
subConfiguraiton "mir-lapack" "blas"
or, if mir-lapack
is not used
# in dub.sdl
subConfiguraiton "mir-blas" "blas"
If your linux distribution setup has both libblas
and libcblas
then use
# in dub.sdl
subConfiguraiton "mir-lapack" "threelib"
or, if mir-lapack
is not used
# in dub.sdl
subConfiguraiton "mir-blas" "twolib"
Install OpenBLAS using brew package manager.
$ brew install openblas
$ brew link openblas
O†r link with Apple Accelerate:
# in dub.sdl
subConfiguraiton "mir-lapack" "blas"
or, if mir-lapack
is not used
# in dub.sdl
subConfiguraiton "mir-blas" "blas"
Windows + Intel MKL
There is predefined single thread configuration for Intel MKL:
# in dub.sdl
subConfiguraiton "mir-lapack" "mkl-sequential"
or, if mir-lapack
is not used
# in dub.sdl
subConfiguraiton "mir-blas" "mkl-sequential"
Library path may need to be specified for MSVC linker.
# in dub.sdl
lflags "/LIBPATH:<PATH_TO_REQUIRED_LIBS>"
To specify your own libraries use:
# in dub.sdl
subConfiguraiton "mir-lapack" "zerolib"
libs "<YOUR_LIB1>" "<YOUR_LIB2>" ...
or, if mir-lapack
is not used
# in dub.sdl
subConfiguraiton "mir-blas" "zerolib"
libs "<YOUR_LIB1>" "<YOUR_LIB2>" ...