Tue Jun 15 15:06:24 2021 UTC ()
math/lapack, math/openblas: more inclusive 64 bit platform check

The simple approach missed alpha.


(thor)
diff -r1.14 -r1.15 pkgsrc/math/lapack/Makefile.common
diff -r1.5 -r1.6 pkgsrc/math/openblas/Makefile.common

cvs diff -r1.14 -r1.15 pkgsrc/math/lapack/Makefile.common (expand / switch to unified diff)

--- pkgsrc/math/lapack/Makefile.common 2021/06/15 04:41:52 1.14
+++ pkgsrc/math/lapack/Makefile.common 2021/06/15 15:06:23 1.15
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.14 2021/06/15 04:41:52 thor Exp $ 1# $NetBSD: Makefile.common,v 1.15 2021/06/15 15:06:23 thor Exp $
2# used by math/blas/Makefile 2# used by math/blas/Makefile
3# used by math/cblas/Makefile 3# used by math/cblas/Makefile
4# used by math/lapacke/Makefile 4# used by math/lapacke/Makefile
5# used by math/lapack/Makefile 5# used by math/lapack/Makefile
6# used by math/blas64/Makefile 6# used by math/blas64/Makefile
7# used by math/cblas64/Makefile 7# used by math/cblas64/Makefile
8# used by math/lapacke64/Makefile 8# used by math/lapacke64/Makefile
9# used by math/lapack64/Makefile 9# used by math/lapack64/Makefile
10 10
11# Common Makefile for packages derived from the Netlib BLAS/LAPACK sources. 11# Common Makefile for packages derived from the Netlib BLAS/LAPACK sources.
12# Package Makefile sets LAPACK_COMPONENT and LAPACK_COMPONENT_CMAKE_ARGS to 12# Package Makefile sets LAPACK_COMPONENT and LAPACK_COMPONENT_CMAKE_ARGS to
13# choose the library to install. 13# choose the library to install.
14# LAPACK_COMPONENT can be "lapack", "lapacke", or "cblas", 14# LAPACK_COMPONENT can be "lapack", "lapacke", or "cblas",
@@ -25,28 +25,30 @@ HOMEPAGE= https://www.netlib.org/lapack/ @@ -25,28 +25,30 @@ HOMEPAGE= https://www.netlib.org/lapack/
25LICENSE= modified-bsd 25LICENSE= modified-bsd
26 26
27# All parts are in the same section 27# All parts are in the same section
28PATCHDIR= ${.CURDIR}/../../math/lapack/patches 28PATCHDIR= ${.CURDIR}/../../math/lapack/patches
29DISTINFO_FILE= ${.CURDIR}/../../math/lapack/distinfo 29DISTINFO_FILE= ${.CURDIR}/../../math/lapack/distinfo
30 30
31USE_LANGUAGES= c fortran 31USE_LANGUAGES= c fortran
32USE_CMAKE= yes 32USE_CMAKE= yes
33 33
34WRKSRC= ${WRKDIR}/${DISTNAME} 34WRKSRC= ${WRKDIR}/${DISTNAME}
35CONFIGURE_DIRS= build 35CONFIGURE_DIRS= build
36CMAKE_ARG_PATH= ${WRKSRC} 36CMAKE_ARG_PATH= ${WRKSRC}
37 37
 38.include "../../mk/bsd.prefs.mk"
 39
38.if !empty(LAPACK_COMPONENT:M*64) 40.if !empty(LAPACK_COMPONENT:M*64)
39. if empty(MACHINE_ARCH:M*64) 41. if empty(LP64PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@)
40PKG_FAIL_REASON+= "${LAPACK_COMPONENT} incompatible with non-64-bit platform" 42PKG_FAIL_REASON+= "${LAPACK_COMPONENT} incompatible with non-64-bit platform"
41. endif 43. endif
42HEADERDIR= netlib64 44HEADERDIR= netlib64
43.else 45.else
44HEADERDIR= netlib 46HEADERDIR= netlib
45.endif 47.endif
46 48
47# Note: We patch the build to install both static and 49# Note: We patch the build to install both static and
48# shared libraries. 50# shared libraries.
49CMAKE_ARGS= -DBUILD_DEPRECATED=ON \ 51CMAKE_ARGS= -DBUILD_DEPRECATED=ON \
50 -DBUILD_SHARED_LIBS=ON \ 52 -DBUILD_SHARED_LIBS=ON \
51 -DBUILD_STATIC_LIBS=ON \ 53 -DBUILD_STATIC_LIBS=ON \
52 -DCMAKE_INSTALL_INCLUDEDIR=${PREFIX}/include/${HEADERDIR} \ 54 -DCMAKE_INSTALL_INCLUDEDIR=${PREFIX}/include/${HEADERDIR} \

cvs diff -r1.5 -r1.6 pkgsrc/math/openblas/Makefile.common (expand / switch to unified diff)

--- pkgsrc/math/openblas/Makefile.common 2021/06/15 04:41:52 1.5
+++ pkgsrc/math/openblas/Makefile.common 2021/06/15 15:06:23 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.5 2021/06/15 04:41:52 thor Exp $ 1# $NetBSD: Makefile.common,v 1.6 2021/06/15 15:06:23 thor Exp $
2# 2#
3# used by math/openblas_pthread/Makefile 3# used by math/openblas_pthread/Makefile
4# used by math/openblas_openmp/Makefile 4# used by math/openblas_openmp/Makefile
5# used by math/openblas/Makefile 5# used by math/openblas/Makefile
6# used by math/openblas64_pthread/Makefile 6# used by math/openblas64_pthread/Makefile
7# used by math/openblas64_openmp/Makefile 7# used by math/openblas64_openmp/Makefile
8# used by math/openblas64/Makefile 8# used by math/openblas64/Makefile
9# 9#
10# This is the common Makefile for OpenBLAS builds. It depends on 10# This is the common Makefile for OpenBLAS builds. It depends on
11# OPENBLAS_VARIANT = (openblas|openblas_pthread|openblas_openmp) 11# OPENBLAS_VARIANT = (openblas|openblas_pthread|openblas_openmp)
12# being set. 12# being set.
13 13
14DISTNAME= OpenBLAS-${OPENBLAS_VERSION} 14DISTNAME= OpenBLAS-${OPENBLAS_VERSION}
@@ -52,45 +52,43 @@ BUILD_DEFS+= OPENBLAS_THREAD_LIMIT @@ -52,45 +52,43 @@ BUILD_DEFS+= OPENBLAS_THREAD_LIMIT
52 52
53.include "../../mk/bsd.prefs.mk" 53.include "../../mk/bsd.prefs.mk"
54 54
55# Using conservative default of 32 threads as that matches the 55# Using conservative default of 32 threads as that matches the
56# limit for related stack arrays in OpenBLAS. Might raise it 56# limit for related stack arrays in OpenBLAS. Might raise it
57# in future, anyway. There some memory usage/efficiency tradeoff 57# in future, anyway. There some memory usage/efficiency tradeoff
58# when this number is excessively high. 58# when this number is excessively high.
59OPENBLAS_THREAD_LIMIT?= 32 59OPENBLAS_THREAD_LIMIT?= 32
60.if !empty(OPENBLAS_THREAD_LIMIT) 60.if !empty(OPENBLAS_THREAD_LIMIT)
61MAKE_FLAGS+= NUM_THREADS=${OPENBLAS_THREAD_LIMIT:Q} 61MAKE_FLAGS+= NUM_THREADS=${OPENBLAS_THREAD_LIMIT:Q}
62.endif 62.endif
63BENCHMARK_MAXTHREADS?= 8 63BENCHMARK_MAXTHREADS?= 8
64 64
65.if ${MACHINE_ARCH:M*64} == "" 65.if empty(LP64PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@)
66MAKE_FLAGS+= BINARY32=1 66MAKE_FLAGS+= BINARY32=1
67. if !empty(OPENBLAS_VARIANT:M*64*) 67. if !empty(OPENBLAS_VARIANT:M*64*)
68PKG_FAIL_REASON+= "${OPENBLAS_VARIANT} incompatible with non-64-bit platform" 68PKG_FAIL_REASON+= "${OPENBLAS_VARIANT} incompatible with non-64-bit platform"
69. endif 69. endif
70.else 70.else
71MAKE_FLAGS+= BINARY64=1 71MAKE_FLAGS+= BINARY64=1
72.endif 72.endif
73 73
74# Build with the C APIs, as do other optimized libraries. 74# Build with the C APIs, as do other optimized libraries.
75#MAKE_FLAGS+= NO_CBLAS=0 NO_LAPACKE=0 75#MAKE_FLAGS+= NO_CBLAS=0 NO_LAPACKE=0
76 76
77# Separate headers and cmake stuff. 77# Separate headers and cmake stuff.
78MAKE_FLAGS+= OPENBLAS_INCLUDE_DIR=${PREFIX}/include/${OPENBLAS_VARIANT} 78MAKE_FLAGS+= OPENBLAS_INCLUDE_DIR=${PREFIX}/include/${OPENBLAS_VARIANT}
79MAKE_FLAGS+= OPENBLAS_CMAKE_DIR=${PREFIX}/lib/cmake/${OPENBLAS_VARIANT} 79MAKE_FLAGS+= OPENBLAS_CMAKE_DIR=${PREFIX}/lib/cmake/${OPENBLAS_VARIANT}
80 80
81# TODO: Set INTERFACE64=1 with additional OPENBLAS_VARIANTs. 81# Settled on no sumbol suffix for 64 bit.
82# Need to settle on a convention for SYMBOLSUFFIX first, see 
83# https://github.com/xianyi/OpenBLAS/issues/646 . 
84MAKE_FLAGS+= FIXED_LIBNAME=1 82MAKE_FLAGS+= FIXED_LIBNAME=1
85.if ${OPENBLAS_VARIANT} == openblas || ${OPENBLAS_VARIANT} == openblas64 83.if ${OPENBLAS_VARIANT} == openblas || ${OPENBLAS_VARIANT} == openblas64
86MAKE_FLAGS+= USE_OPENMP=0 USE_THREAD=0 USE_LOCKING=1 84MAKE_FLAGS+= USE_OPENMP=0 USE_THREAD=0 USE_LOCKING=1
87BENCHMARK_ENV= USE_SIMPLE_THREADED_LEVEL3=1 85BENCHMARK_ENV= USE_SIMPLE_THREADED_LEVEL3=1
88.elif !empty(OPENBLAS_VARIANT:Mopenblas*_pthread) 86.elif !empty(OPENBLAS_VARIANT:Mopenblas*_pthread)
89MAKE_FLAGS+= LIBNAMESUFFIX=pthread 87MAKE_FLAGS+= LIBNAMESUFFIX=pthread
90MAKE_FLAGS+= USE_OPENMP=0 USE_THREAD=1 88MAKE_FLAGS+= USE_OPENMP=0 USE_THREAD=1
91BENCHMARK_ENV= OPENBLAS_NUM_THREADS=${BENCHMARK_MAXTHREADS} 89BENCHMARK_ENV= OPENBLAS_NUM_THREADS=${BENCHMARK_MAXTHREADS}
92.elif !empty(OPENBLAS_VARIANT:Mopenblas*_openmp) 90.elif !empty(OPENBLAS_VARIANT:Mopenblas*_openmp)
93MAKE_FLAGS+= LIBNAMESUFFIX=openmp 91MAKE_FLAGS+= LIBNAMESUFFIX=openmp
94MAKE_FLAGS+= USE_OPENMP=1 NO_AFFINITY=1 92MAKE_FLAGS+= USE_OPENMP=1 NO_AFFINITY=1
95BENCHMARK_ENV= OMP_NUM_THREADS=${BENCHMARK_MAXTHREADS} 93BENCHMARK_ENV= OMP_NUM_THREADS=${BENCHMARK_MAXTHREADS}
96.endif 94.endif