diff options
author | thor <thor@pkgsrc.org> | 2021-06-15 04:41:51 +0000 |
---|---|---|
committer | thor <thor@pkgsrc.org> | 2021-06-15 04:41:51 +0000 |
commit | 1c4f696d70dff3ae58ee512e4996d439aa9a07f3 (patch) | |
tree | 3d71c8de364955c233f1dd203e59ccc6502d213d /math/cblas64/Makefile | |
parent | e515e489db91eb27eb7f362701459bd13a718e77 (diff) | |
download | pkgsrc-1c4f696d70dff3ae58ee512e4996d439aa9a07f3.tar.gz |
mk/blas.bl3, Netlib and OpenBLAS packages, NumPy: C fixup and 64 bits
This delivers 64 bit index BLAS libraries alongside 32 bit ones. This is often
called ILP64 in the BLAS world, as opposed to LP64 where integers are 32 bit
due to the Fortran default integer type, not to be confused with the basic
system ABI used by C. For really large vectors on modern machines, you want
an 'ILP64' BLAS and layers on top of it.
In preparation of better support for vendor BLAS libraries, I had to realize
that you better use the C interfaces supplied by them, not the netlib one
strapped on. A simple reason of practicability: The vendor blas libraries,
just like openblas, like to ship all symbols in one library, so you get them
whether you want it or not. Also implementations may skip Fortran and implement
the underlying functionality directly in C anyway, so one might skip a
layer of indirection. Future will tell if other layers will follow. We still
have the framework of individual layers from Netlib to combine with certain
implementations that miss them (Accelerate framework comes to mind, which
needs further work).
The framework of netlib reference packages for the separate libraries
is instructive and helps keeping things small when you not need all of them.
The installation location of the headers is now in a subdirectory to be able
to have 32 and 64 bit variants independently. The 32 bit ones are linked to
${PREFIX}/include to keep the old picture. We could be brave and remove
those, but there is some value in a build just trying -lcblas and
inclusion of <cblas.h> to be happy.
There is one blas.buildlink3.mk that is supposed to be used only once and
so avoids a combination of conflicting libraries (as the 64 bit index symbols
have the same names as the 32 bit ones).
Basic usage for getting LAPACK+BLAS is still the same as before. You get
CBLAS and LAPACKE by setting BLAS_C_INTERFACE=yes in the package. The 64 bit
indices are selected via BLAS_INDEX64=yes.
Due to the special nature of the Accelerate framework, a package has to
explicitly indicate support for it and it will also not appear on the
list of implementations by default. The reason is that it does provide
mainly CBLAS and CLAPACK (another version of C interface to LAPACK, f2c-based)
and BLAS/LAPACK with f2c/g77 calling conventions. A default build with
gfortran would not like that
This commit also fixes up math/py-numpy and math/py-numpy16 to follow the
new scheme, as that are the only packages directly affected by the change
in CBLAS providership.
Diffstat (limited to 'math/cblas64/Makefile')
-rw-r--r-- | math/cblas64/Makefile | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/math/cblas64/Makefile b/math/cblas64/Makefile new file mode 100644 index 00000000000..1e09f006e21 --- /dev/null +++ b/math/cblas64/Makefile @@ -0,0 +1,17 @@ +# $NetBSD: Makefile,v 1.1 2021/06/15 04:41:52 thor Exp $ + +MAINTAINER= thomas.orgis@uni-hamburg.de +COMMENT= C interface to the reference BLAS with 64 bit indices + +LAPACK_COMPONENT= cblas64 +LAPACK_COMPONENT_CMAKE_ARGS= \ + -DBUILD_INDEX64=ON \ + -DUSE_OPTIMIZED_BLAS=ON \ + -DBLAS_LIBRARIES=-lblas64 \ + -DCBLAS=ON -DLAPACKE=OFF -DLAPACK=OFF \ + -DCMAKE_VERBOSE=ON + +.include "../../math/blas64/buildlink3.mk" + +.include "../../math/lapack/Makefile.common" +.include "../../mk/bsd.pkg.mk" |