pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/math/openblas math/openblas: import openblas-0.3.7



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f5db207603e8
branches:  trunk
changeset: 441530:f5db207603e8
user:      bacon <bacon%pkgsrc.org@localhost>
date:      Thu Nov 05 16:31:45 2020 +0000

description:
math/openblas: import openblas-0.3.7

OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
OpenBLAS is an open source project supported by
Lab of Parallel Software and Computational Science, ISCAS.

This package builds the serial library.

Needs patching and testing on platforms besides Linux

diffstat:

 math/openblas/DESCR                            |    5 +
 math/openblas/Makefile                         |    7 +
 math/openblas/Makefile.common                  |  142 +++++++++++++++++++++++++
 math/openblas/PLIST                            |    9 +
 math/openblas/buildlink3.mk                    |   12 ++
 math/openblas/distinfo                         |   27 ++++
 math/openblas/options.mk                       |   18 +++
 math/openblas/patches/patch-Makefile           |   72 ++++++++++++
 math/openblas/patches/patch-Makefile.install   |   43 +++++++
 math/openblas/patches/patch-Makefile.system    |   52 +++++++++
 math/openblas/patches/patch-c_check            |   15 ++
 math/openblas/patches/patch-common__arm.h      |   20 +++
 math/openblas/patches/patch-cpuid__arm.c       |   16 ++
 math/openblas/patches/patch-cpuid__arm64.c     |   15 ++
 math/openblas/patches/patch-cpuid_ia64.c       |   16 ++
 math/openblas/patches/patch-exports+Makefile   |   22 +++
 math/openblas/patches/patch-f_check            |   24 ++++
 math/openblas/patches/patch-getarch.c          |   26 ++++
 math/openblas/patches/patch-interface__ztrmv.c |   15 ++
 math/openblas/patches/patch-utest_Makefile     |   19 +++
 math/openblas/version.mk                       |    3 +
 21 files changed, 578 insertions(+), 0 deletions(-)

diffs (truncated from 662 to 300 lines):

diff -r 25cf55a8a77d -r f5db207603e8 math/openblas/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/openblas/DESCR       Thu Nov 05 16:31:45 2020 +0000
@@ -0,0 +1,5 @@
+OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
+OpenBLAS is an open source project supported by
+Lab of Parallel Software and Computational Science, ISCAS.
+
+This package builds the serial library.
diff -r 25cf55a8a77d -r f5db207603e8 math/openblas/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/openblas/Makefile    Thu Nov 05 16:31:45 2020 +0000
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+MAINTAINER=    thomas.orgis%uni-hamburg.de@localhost
+
+OPENBLAS_VARIANT= openblas
+.include "../../math/openblas/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
diff -r 25cf55a8a77d -r f5db207603e8 math/openblas/Makefile.common
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/openblas/Makefile.common     Thu Nov 05 16:31:45 2020 +0000
@@ -0,0 +1,142 @@
+# $NetBSD: Makefile.common,v 1.1 2020/11/05 16:31:45 bacon Exp $
+#
+# used by math/openblas_pthread/Makefile
+# used by math/openblas_openmp/Makefile
+# used by math/openblas/Makefile
+#
+# This is the common Makefile for OpenBLAS builds. It depends on
+# OPENBLAS_VARIANT = (openblas|openblas_pthread|openblas_openmp)
+# being set.
+
+DISTNAME=      OpenBLAS-${OPENBLAS_VERSION}
+PKGNAME=       ${OPENBLAS_VARIANT}-${OPENBLAS_VERSION}
+DIST_SUBDIR=   openblas-${OPENBLAS_VERSION}
+CATEGORIES=    math
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=xianyi/} \
+               http://www.netlib.org/lapack/timing/
+DISTFILES=     ${DISTNAME}.tar.gz ${LARGE_FILE} ${TIMING_FILE}
+LARGE_FILE=    large.tgz
+TIMING_FILE=   timing.tgz
+GITHUB_PROJECT=        OpenBLAS
+GITHUB_TAG=    v${OPENBLAS_VERSION}
+
+DISTINFO_FILE= ${.CURDIR}/../../math/openblas/distinfo
+PATCHDIR=      ${.CURDIR}/../../math/openblas/patches
+
+HOMEPAGE=      https://github.com/xianyi/OpenBLAS
+COMMENT=       Optimized BLAS library based on GotoBLAS2
+LICENSE=       modified-bsd
+
+# Needs source patching and/or GCC_REQD for NetBSD
+# NetBSD gfortran framework needs improvements for this and other packages
+# Untested on other platforms
+ONLY_FOR_PLATFORM=     Linux-*-*
+
+USE_LANGUAGES= c fortran
+USE_TOOLS+=    gmake perl:build
+
+NO_CONFIGURE=  yes
+
+TEST_TARGET=   tests
+
+# Work around CFLAGS breakage:
+# https://github.com/xianyi/OpenBLAS/issues/818
+MAKE_FLAGS+=   CFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+=   CXXFLAGS=${CXXFLAGS:Q}
+MAKE_FLAGS+=   FFLAGS=${FFLAGS:Q}
+# Also set compilers explicitly, overriding Makefile.rule
+MAKE_FLAGS+=   CC=${CC:Q}
+MAKE_FLAGS+=   CXX=${CXX:Q}
+MAKE_FLAGS+=   FC=${FC:Q}
+
+# You may override the autodetected thread count limit.
+# Default is detected from build host, which may differ from run host.
+BUILD_DEFS+=   OPENBLAS_THREAD_LIMIT
+
+.include "../../mk/bsd.prefs.mk"
+
+# Default checks number of cores of build host.
+# Do we want a pkgsrc-wide default?
+OPENBLAS_THREAD_LIMIT?=        # empty
+.if !empty(OPENBLAS_THREAD_LIMIT)
+MAKE_FLAGS+=           NUM_THREADS=${OPENBLAS_THREAD_LIMIT:Q}
+.endif
+BENCHMARK_MAXTHREADS?= 8
+
+.if ${MACHINE_ARCH:M*64} == ""
+MAKE_FLAGS+=           BINARY32=1
+.else
+MAKE_FLAGS+=           BINARY64=1
+.endif
+# Those come in separate BLAS-agnostic packages.
+# ... except we start headaches about ILP64?
+MAKE_FLAGS+=           NO_CBLAS=1 NO_LAPACKE=1
+
+# Separate headers and cmake stuff.
+MAKE_FLAGS+=   OPENBLAS_INCLUDE_DIR=${PREFIX}/include/${OPENBLAS_VARIANT}
+MAKE_FLAGS+=   OPENBLAS_CMAKE_DIR=${PREFIX}/lib/cmake/${OPENBLAS_VARIANT}
+
+# TODO: Set INTERFACE64=1 with additional OPENBLAS_VARIANTs.
+# Need to settle on a convention for SYMBOLSUFFIX first, see
+# https://github.com/xianyi/OpenBLAS/issues/646 .
+.if ${OPENBLAS_VARIANT} == openblas
+MAKE_FLAGS+=   USE_OPENMP=0 USE_THREAD=0 USE_LOCKING=1
+BENCHMARK_ENV= USE_SIMPLE_THREADED_LEVEL3=1
+.elif ${OPENBLAS_VARIANT} == openblas_pthread
+BENCHMARK_ENV= OPENBLAS_NUM_THREADS=${BENCHMARK_MAXTHREADS}
+MAKE_FLAGS+=   LIBNAMESUFFIX=pthread USE_OPENMP=0 USE_THREAD=1
+.elif ${OPENBLAS_VARIANT} == openblas_openmp
+BENCHMARK_ENV= OMP_NUM_THREADS=${BENCHMARK_MAXTHREADS}
+MAKE_FLAGS+=   LIBNAMESUFFIX=openmp USE_OPENMP=1 NO_AFFINITY=1
+.endif
+
+SUBST_CLASSES+=                arch
+SUBST_STAGE.arch=      pre-build
+SUBST_SED.arch+=       -e "s+(ARCH)+(ARCH_)+"
+SUBST_FILES.arch+=     Makefile.tail
+SUBST_FILES.arch+=     driver/level3/Makefile
+SUBST_FILES.arch+=     driver/others/Makefile
+SUBST_FILES.arch+=     exports/Makefile
+SUBST_FILES.arch+=     interface/Makefile
+SUBST_FILES.arch+=     kernel/Makefile
+SUBST_FILES.arch+=     kernel/Makefile.L3
+SUBST_FILES.arch+=     lapack/laswp/Makefile
+SUBST_FILES.arch+=     lapack-netlib/SRC/Makefile
+SUBST_FILES.arch+=     lapack-netlib/SRC/VARIANTS/Makefile
+SUBST_FILES.arch+=     lapack-netlib/TESTING/MATGEN/Makefile
+SUBST_FILES.arch+=     lapack-netlib/LAPACKE/src/Makefile
+SUBST_FILES.arch+=     lapack-netlib/LAPACKE/utils/Makefile
+SUBST_FILES.arch+=     reference/Makefile
+SUBST_FILES.arch+=     Makefile.system
+
+SUBST_CLASSES+=                threads
+SUBST_STAGE.threads=   pre-build
+SUBST_SED.threads+=    -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g"
+SUBST_FILES.threads+=  test/Makefile
+SUBST_FILES.threads+=  ctest/Makefile
+
+# Fix up pkgconfig file installation.
+SUBST_CLASSES+=                pc
+SUBST_STAGE.pc=                pre-build
+SUBST_SED.pc+=         -e 's+-lopenblas+-l${OPENBLAS_VARIANT}+'
+SUBST_SED.pc+=         -e 's+openblas.pc"+${OPENBLAS_VARIANT}.pc"+'
+SUBST_FILES.pc+=       Makefile.install openblas.pc.in
+
+PLIST_SRC=     ${.CURDIR}/../../math/openblas/PLIST
+PLIST_SUBST+=  OPENBLAS_VARIANT=${OPENBLAS_VARIANT}
+
+post-extract:
+       (cd ${DISTDIR}/${DIST_SUBDIR} && \
+               ${CP} ${LARGE_FILE} ${TIMING_FILE} ${WRKSRC})
+
+# This builds some benchmark programs you can call from ${WRKSRC} afterwards.
+.PHONY: benchmark
+benchmark: build
+       (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${BENCHMARK_ENV} \
+               ${MAKE_PROGRAM} ${MAKE_FLAGS} hpl)
+       (cd ${WRKSRC}/benchmark && ${SETENV} ${MAKE_ENV} \
+               ${BENCHMARK_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS})
+
+.include "../../math/openblas/version.mk"
+
+.include "options.mk"
diff -r 25cf55a8a77d -r f5db207603e8 math/openblas/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/openblas/PLIST       Thu Nov 05 16:31:45 2020 +0000
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2020/11/05 16:31:45 bacon Exp $
+lib/lib${OPENBLAS_VARIANT}.a
+lib/lib${OPENBLAS_VARIANT}.so
+lib/lib${OPENBLAS_VARIANT}.so.0
+lib/pkgconfig/${OPENBLAS_VARIANT}.pc
+lib/cmake/${OPENBLAS_VARIANT}/OpenBLASConfig.cmake
+lib/cmake/${OPENBLAS_VARIANT}/OpenBLASConfigVersion.cmake
+include/${OPENBLAS_VARIANT}/openblas_config.h
+include/${OPENBLAS_VARIANT}/f77blas.h
diff -r 25cf55a8a77d -r f5db207603e8 math/openblas/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/openblas/buildlink3.mk       Thu Nov 05 16:31:45 2020 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+BUILDLINK_TREE+=       openblas
+
+.if !defined(OPENBLAS_BUILDLINK3_MK)
+OPENBLAS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.openblas+=       openblas>=0.3.5
+BUILDLINK_PKGSRCDIR.openblas?=         ../../math/openblas
+.endif # OPENBLAS_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -openblas
diff -r 25cf55a8a77d -r f5db207603e8 math/openblas/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/openblas/distinfo    Thu Nov 05 16:31:45 2020 +0000
@@ -0,0 +1,27 @@
+$NetBSD: distinfo,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+SHA1 (openblas-0.3.7/OpenBLAS-0.3.7.tar.gz) = 6a79b36d1bf73584a513139806d226f9189d621e
+RMD160 (openblas-0.3.7/OpenBLAS-0.3.7.tar.gz) = 72103fa62efaa9ab77f80f9ae70b1417fa6f2122
+SHA512 (openblas-0.3.7/OpenBLAS-0.3.7.tar.gz) = 9c4898301c675471bbce2bb99b6bbe7c90724784fac06504416d4bd5da3cd4488f727b0a118c9a38ea342daac2af9e32597a847004241cc57de693b58b856262
+Size (openblas-0.3.7/OpenBLAS-0.3.7.tar.gz) = 11986592 bytes
+SHA1 (openblas-0.3.7/large.tgz) = a689e5b180595b40c5719b0f358b31b15b57a2db
+RMD160 (openblas-0.3.7/large.tgz) = 8010ff4002ef42cf22a9ee9345011d68fc27d855
+SHA512 (openblas-0.3.7/large.tgz) = e24db2b8a4253ccff9ca196815901c1fefd55e882f4fe1085715ac84b8f318e1842a91072130c17fdd144344ffc80233a77500da9349acb54e504b3935825965
+Size (openblas-0.3.7/large.tgz) = 2595 bytes
+SHA1 (openblas-0.3.7/timing.tgz) = fd47fc3f26d142a791df51e4a422a49662507252
+RMD160 (openblas-0.3.7/timing.tgz) = f0fe220e7ab611d4db8d8cab960361955e2ab093
+SHA512 (openblas-0.3.7/timing.tgz) = be0abfcfffdf0e118ed7e25a8451639833cf0ad6bb04d101bbe194c16f656b6ce509b2f76acf4ad626d1fb5b126bd5498cfea262f2946c2d077751112a2906af
+Size (openblas-0.3.7/timing.tgz) = 1059485 bytes
+SHA1 (patch-Makefile) = 6029076c34765e53a26617fb4bd36b56ba413f1b
+SHA1 (patch-Makefile.install) = 08c80677f8040623eaf5277cf92b5f5969fb4a07
+SHA1 (patch-Makefile.system) = d9dec776fb0d2919850506f682f3623b68751c90
+SHA1 (patch-c_check) = c5990809434a259399c75e660aad5abe83899548
+SHA1 (patch-common__arm.h) = f08ec61bee8317daac267e90a79f46097b3431c9
+SHA1 (patch-cpuid__arm.c) = 20f95cede90cbe548c0cd09ed2e3d37d1d4aeabd
+SHA1 (patch-cpuid__arm64.c) = bbeb7222b32ec821511a6798fc27ff7269700662
+SHA1 (patch-cpuid_ia64.c) = 39649319b8c0a37b8d494e3c03b1ddb6fb616603
+SHA1 (patch-exports+Makefile) = 973016eae339d014d9f6f146e1e934793eb76145
+SHA1 (patch-f_check) = 9162d6a31f96c6af5aada82f6e78cf0385384215
+SHA1 (patch-getarch.c) = 3d0ea5b989c6402d9e2f03a6cc2de848f06ca16d
+SHA1 (patch-interface__ztrmv.c) = 6038946f8fb9542e680178ece2bd0d0d5853baad
+SHA1 (patch-utest_Makefile) = e6f816dfd5b905db93a1a963d86ae3afbeed81d3
diff -r 25cf55a8a77d -r f5db207603e8 math/openblas/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/openblas/options.mk  Thu Nov 05 16:31:45 2020 +0000
@@ -0,0 +1,18 @@
+# $NetBSD: options.mk,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.openblas
+# Auto-detect CPU features at runtime or use static features from build host
+PKG_SUPPORTED_OPTIONS= dynamic-arch
+PKG_SUGGESTED_OPTIONS= dynamic-arch
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdynamic-arch)
+MAKE_FLAGS+=   DYNAMIC_ARCH=1
+.else
+MAKE_FLAGS+=   DYNAMIC_ARCH=0
+.endif
+
+# Other options create variants of the library, not configurations of one.
+# Especially INTERFACE64, which changes the API!
diff -r 25cf55a8a77d -r f5db207603e8 math/openblas/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/openblas/patches/patch-Makefile      Thu Nov 05 16:31:45 2020 +0000
@@ -0,0 +1,72 @@
+$NetBSD: patch-Makefile,v 1.1 2020/11/05 16:31:45 bacon Exp $
+
+Remove special library names.
+
+--- Makefile.orig      2019-08-11 21:23:27.000000000 +0000
++++ Makefile
+@@ -100,7 +100,6 @@ ifneq ($(NO_SHARED), 1)
+ ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku))
+       @$(MAKE) -C exports so
+       @ln -fs $(LIBSONAME) $(LIBPREFIX).so
+-      @ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
+ endif
+ ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD OpenBSD NetBSD DragonFly))
+       @$(MAKE) -C exports so
+@@ -108,8 +107,6 @@ ifeq ($(OSNAME), $(filter $(OSNAME),Free
+ endif
+ ifeq ($(OSNAME), Darwin)
+       @$(MAKE) -C exports dyn
+-      @ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib
+-      @ln -fs $(LIBDYNNAME) $(LIBPREFIX).$(MAJOR_VERSION).dylib
+ endif
+ ifeq ($(OSNAME), WINNT)
+       @$(MAKE) -C exports dll
+@@ -146,7 +143,6 @@ ifeq ($(NO_SHARED), 1)
+       $(error OpenBLAS: neither static nor shared are enabled.)
+ endif
+ endif
+-      @-ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
+       @for d in $(SUBDIRS) ; \
+       do if test -d $$d; then \
+         $(MAKE) -C $$d $(@F) || exit 1 ; \
+@@ -180,7 +176,6 @@ endif
+ prof : prof_blas prof_lapack
+ 
+ prof_blas :
+-      ln -fs $(LIBNAME_P) $(LIBPREFIX)_p.$(LIBSUFFIX)
+       for d in $(SUBDIRS) ; \
+       do if test -d $$d; then \
+         $(MAKE) -C $$d prof || exit 1 ; \
+@@ -191,7 +186,6 @@ ifeq ($(DYNAMIC_ARCH), 1)
+ endif
+ 
+ blas :
+-      ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
+       for d in $(BLASDIRS) ; \
+       do if test -d $$d; then \
+         $(MAKE) -C $$d libs || exit 1 ; \
+@@ -199,7 +193,6 @@ blas :



Home | Main Index | Thread Index | Old Index