math/openblas: Update to 0.3.7

While here, improve formatting and fix build of dependant ports.

PR:		231371
Submitted by:	yuri (initial version), pkubaj (ppc fixes)
Approved by:	Eijiro Shibusawa <phd_kimberlite@yahoo.co.jp> (maintainer)
This commit is contained in:
Steve Wills 2020-01-21 22:03:19 +00:00
parent 68eac340c5
commit 033b9daecd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=523749
32 changed files with 97 additions and 359 deletions

View File

@ -41,8 +41,8 @@ _BLASLIB= blas
LAPACKLIB= -llapack
.elif ${blaslapack_ARGS} == openblas
LIB_DEPENDS+= libopenblas.so:math/openblas
_BLASLIB= openblasp
LAPACKLIB= -lopenblasp
_BLASLIB= openblas
LAPACKLIB= -lopenblas
.else
IGNORE= USES=blaslapack: invalid arguments: ${blaslapack_ARGS}
.endif

View File

@ -22,7 +22,7 @@ GH_PROJECT= GEMMA
MAKEFILE= ${FILESDIR}/Makefile
# Assuming openblas is built with pthreads, not openmp
CXXFLAGS+= -I${LOCALBASE}/include/eigen3 -DOPENBLAS -pthread
LDFLAGS+= -lopenblasp -pthread
LDFLAGS+= -lopenblas -pthread
OPTIONS_DEFINE= EXAMPLES

View File

@ -12,8 +12,7 @@ COMMENT= Go engine without human-provided knowledge based on AlphaGo Zero paper
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= cblas>0:math/cblas \
opencl>0:devel/opencl
BUILD_DEPENDS= opencl>0:devel/opencl
LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \
libopenblas.so:math/openblas \
libOpenCL.so:devel/ocl-icd

View File

@ -113,7 +113,7 @@ OPENBLAS_DESC= Private OpenBLAS v0.3.0\
(ports tree: v${:!${MAKE} -C ${PORTSDIR}/math/openblas -V PORTVERSION!})
OPENBLAS_MAKE_ARGS= USE_SYSTEM_BLAS=0 OPENBLAS_DYNAMIC_ARCH=1
OPENBLAS_MAKE_ARGS_OFF= USE_SYSTEM_BLAS=1
OPENBLAS_LIB_DEPENDS_OFF= libopenblasp.so:math/openblas
OPENBLAS_LIB_DEPENDS_OFF= libopenblas.so:math/openblas
.include <bsd.port.options.mk>
@ -156,8 +156,8 @@ post-patch-OPENBLAS-on:
${CP} ${FILESDIR}/extra-patch-openblas-fix-arch.patch ${WRKSRC}/deps/patches/openblas-fix-arch.patch
post-patch-OPENBLAS-off:
echo "LIBBLAS= -lopenblasp -L${LOCALBASE}/lib" >> ${WRKSRC}/Make.user
echo "LIBBLASNAME=libopenblasp" >> ${WRKSRC}/Make.user
echo "LIBBLAS= -lopenblas -L${LOCALBASE}/lib" >> ${WRKSRC}/Make.user
echo "LIBBLASNAME=libopenblas" >> ${WRKSRC}/Make.user
echo 'LIBLAPACK= $$(LIBBLAS)' >> ${WRKSRC}/Make.user
echo 'LIBLAPACKNAME= $$(LIBBLASNAME)' >> ${WRKSRC}/Make.user

View File

@ -102,7 +102,7 @@ OPENBLAS_DESC= Private OpenBLAS v0.3.2\
(ports tree: v${:!${MAKE} -C ${PORTSDIR}/math/openblas -V PORTVERSION!})
OPENBLAS_MAKE_ARGS= USE_SYSTEM_BLAS=0 OPENBLAS_DYNAMIC_ARCH=1
OPENBLAS_MAKE_ARGS_OFF= USE_SYSTEM_BLAS=1
OPENBLAS_LIB_DEPENDS_OFF= libopenblasp.so:math/openblas
OPENBLAS_LIB_DEPENDS_OFF= libopenblas.so:math/openblas
.include <bsd.port.options.mk>
@ -145,8 +145,8 @@ post-patch-OPENBLAS-on:
${CP} ${FILESDIR}/extra-patch-openblas-fix-arch.patch ${WRKSRC}/deps/patches/openblas-fix-arch.patch
post-patch-OPENBLAS-off:
echo "LIBBLAS= -lopenblasp -L${LOCALBASE}/lib" >> ${WRKSRC}/Make.user
echo "LIBBLASNAME=libopenblasp" >> ${WRKSRC}/Make.user
echo "LIBBLAS= -lopenblas -L${LOCALBASE}/lib" >> ${WRKSRC}/Make.user
echo "LIBBLASNAME=libopenblas" >> ${WRKSRC}/Make.user
echo 'LIBLAPACK= $$(LIBBLAS)' >> ${WRKSRC}/Make.user
echo 'LIBLAPACKNAME= $$(LIBBLASNAME)' >> ${WRKSRC}/Make.user

View File

@ -106,7 +106,7 @@ OPENBLAS_DESC= Private OpenBLAS v0.3.2\
(ports tree: v${:!${MAKE} -C ${PORTSDIR}/math/openblas -V PORTVERSION!})
OPENBLAS_MAKE_ARGS= USE_SYSTEM_BLAS=0 OPENBLAS_DYNAMIC_ARCH=1
OPENBLAS_MAKE_ARGS_OFF= USE_SYSTEM_BLAS=1
OPENBLAS_LIB_DEPENDS_OFF= libopenblasp.so:math/openblas
OPENBLAS_LIB_DEPENDS_OFF= libopenblas.so:math/openblas
.include <bsd.port.options.mk>
@ -150,8 +150,8 @@ post-patch-OPENBLAS-on:
${CP} ${FILESDIR}/extra-patch-openblas-fix-arch.patch ${WRKSRC}/deps/patches/openblas-fix-arch.patch
post-patch-OPENBLAS-off:
echo "LIBBLAS= -lopenblasp -L${LOCALBASE}/lib" >> ${WRKSRC}/Make.user
echo "LIBBLASNAME=libopenblasp" >> ${WRKSRC}/Make.user
echo "LIBBLAS= -lopenblas -L${LOCALBASE}/lib" >> ${WRKSRC}/Make.user
echo "LIBBLASNAME=libopenblas" >> ${WRKSRC}/Make.user
echo 'LIBLAPACK= $$(LIBBLAS)' >> ${WRKSRC}/Make.user
echo 'LIBLAPACKNAME= $$(LIBBLASNAME)' >> ${WRKSRC}/Make.user

View File

@ -106,7 +106,7 @@ OPENBLAS_DESC= Private OpenBLAS v0.3.3\
(ports tree: v${:!${MAKE} -C ${PORTSDIR}/math/openblas -V PORTVERSION!})
OPENBLAS_MAKE_ARGS= USE_SYSTEM_BLAS=0 OPENBLAS_DYNAMIC_ARCH=1
OPENBLAS_MAKE_ARGS_OFF= USE_SYSTEM_BLAS=1
OPENBLAS_LIB_DEPENDS_OFF= libopenblasp.so:math/openblas
OPENBLAS_LIB_DEPENDS_OFF= libopenblas.so:math/openblas
.include <bsd.port.options.mk>
@ -150,8 +150,8 @@ post-patch-OPENBLAS-on:
${CP} ${FILESDIR}/extra-patch-openblas-fix-arch.patch ${WRKSRC}/deps/patches/openblas-fix-arch.patch
post-patch-OPENBLAS-off:
echo "LIBBLAS= -lopenblasp -L${LOCALBASE}/lib" >> ${WRKSRC}/Make.user
echo "LIBBLASNAME=libopenblasp" >> ${WRKSRC}/Make.user
echo "LIBBLAS= -lopenblas -L${LOCALBASE}/lib" >> ${WRKSRC}/Make.user
echo "LIBBLASNAME=libopenblas" >> ${WRKSRC}/Make.user
echo 'LIBLAPACK= $$(LIBBLAS)' >> ${WRKSRC}/Make.user
echo 'LIBLAPACKNAME= $$(LIBBLASNAME)' >> ${WRKSRC}/Make.user

View File

@ -15,7 +15,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt
BROKEN_powerpc64= Does not build
LIB_DEPENDS= libboost_date_time.so:devel/boost-libs \
libopenblasp.so:math/openblas \
libopenblas.so:math/openblas \
libarpack.so:math/arpack-ng \
libhdf5.so:science/hdf5 \
libsuperlu.so:math/superlu \

View File

@ -12,8 +12,7 @@ COMMENT= Hierarchical matrix C/C++ library
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE.md
LIB_DEPENDS= libcblas.so:math/cblas \
libopenblas.so:math/openblas
LIB_DEPENDS= libopenblas.so:math/openblas
USES= cmake compiler:openmp
USE_GITHUB= yes
@ -21,8 +20,7 @@ GH_ACCOUNT= jeromerobert
USE_LDCONFIG= yes
CMAKE_ARGS= -DBLAS_LIBRARIES:STRING=${LOCALBASE}/lib/libopenblas.so \
-DLAPACK_LIBRARIES:STRING=${LOCALBASE}/lib/libopenblas.so \
-DCBLAS_LIBRARIES:STRING=${LOCALBASE}/lib/libcblas.so
-DLAPACK_LIBRARIES:STRING=${LOCALBASE}/lib/libopenblas.so
post-configure: # fix the error in math/openturns: /usr/local/lib/libhmat-oss.so.1: undefined reference to `openblas_set_num_threads(int)'
@${REINPLACE_CMD} "s|#define OPENBLAS_DISABLE_THREADS|\/\/&|" ${BUILD_WRKSRC}/config.h # OPENBLAS_DISABLE_THREADS enables openblas_set_num_threads(int) here

View File

@ -15,7 +15,7 @@ LICENSE_FILE= ${WRKDIR}/${OCTSRC}/COPYING
LIB_DEPENDS= libfftw3.so:math/fftw3 \
libportaudio.so:audio/portaudio \
libcblas.so:math/cblas
libopenblas.so:math/openblas
# OCTSRC is the name of the directory of the package.
# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.

View File

@ -2,13 +2,13 @@
# $FreeBSD$
PORTNAME= openblas
PORTVERSION= 0.2.20
PORTREVISION= 11
PORTVERSION= 0.3.7
DISTVERSIONPREFIX= v
PORTEPOCH= 1
CATEGORIES= math
MASTER_SITES= NL/lapack/timing/:lapack_tmg
DISTFILES= large.tgz:lapack_tmg timing.tgz:lapack_tmg
DISTFILES= large.tgz:lapack_tmg \
timing.tgz:lapack_tmg
DIST_SUBDIR= openblas
MAINTAINER= phd_kimberlite@yahoo.co.jp
@ -17,7 +17,9 @@ COMMENT= Optimized BLAS library based on GotoBLAS2
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= fortran gmake perl5
USES= fortran gmake perl5 pkgconfig
CONFLICTS_INSTALL= cblas lapacke
USE_GITHUB= yes
GH_ACCOUNT= xianyi
@ -28,19 +30,15 @@ TIMING_FILE= timing.tgz
USE_LDCONFIG= yes
USE_PERL5= build
OPENBLAS_SUFX= r${PORTVERSION}
OPENBLAS_LIBS= libopenblas libopenblasp
OPENBLAS_SVER= 0
OPENBLAS_FILES= ${OPENBLAS_LIBS:S|$|.so|} ${OPENBLAS_LIBS:S|$|.so.${OPENBLAS_SVER}|} ${OPENBLAS_LIBS:S|$|.a|}
PLIST_FILES= ${OPENBLAS_FILES:S|^|lib/|}
TEST_TARGET= tests
BUILDFLAGS= FCOMMON_OPT=-frecursive MAKE_NB_JOBS=-1
OPTIONS_DEFINE= INTERFACE64 OPENMP
OPTIONS_DEFINE_i386= DYNAMIC_ARCH AVX AVX2
OPTIONS_DEFINE_amd64= ${OPTIONS_DEFINE_i386}
OPTIONS_DEFINE_powerpc64= POWER6
OPTIONS_DEFINE= INTERFACE64 OPENMP
OPTIONS_DEFINE_i386= AVX AVX2 DYNAMIC_ARCH
OPTIONS_DEFINE_amd64= AVX AVX2 DYNAMIC_ARCH
OPTIONS_DEFINE_powerpc64= POWER8
OPTIONS_EXCLUDE_powerpc64= OPENMP
.if defined(BATCH) || defined(PACKAGE_BUILDING)
@ -53,14 +51,14 @@ INTERFACE64_DESC= Use 8 byte integers on 64-bit architectures
OPENMP_DESC= Use OpenMP for threading
AVX_DESC= Support Advanced Vector Extensions (AVX)
AVX2_DESC= Support Advanced Vector Extensions 2 (AVX2)
POWER6_DESC= Optimize for POWER6, instead of the default PPC970
POWER8_DESC= Optimize for POWER8, instead of the default PPC970
.include <bsd.port.options.mk>
.if ${ARCH} == powerpc64
USE_GCC= yes
. if ${PORT_OPTIONS:MPOWER6}
TARGET_CPU_ARCH= POWER6
USE_GCC= yes
. if ${PORT_OPTIONS:MPOWER8}
TARGET_CPU_ARCH= POWER8
.else
TARGET_CPU_ARCH= PPC970
. endif
@ -68,9 +66,10 @@ TARGET_CPU_ARCH= PPC970
.if defined(TARGET_CPU_ARCH)
BUILDFLAGS+= TARGET=${TARGET_CPU_ARCH}
MAKE_ENV+= TARGET=${TARGET_CPU_ARCH}
.endif
MAXTHREADS?= 64
MAXTHREADS?= 64
BUILDFLAGS_THREAD+= NUM_THREADS=${MAXTHREADS} USE_THREAD=1
.if ${ARCH:M*64} == ""
@ -94,13 +93,6 @@ PLIST_SUB+= DYNARCH="@comment "
BUILDFLAGS+= INTERFACE64=1
.endif
.if ${PORT_OPTIONS:MOPENMP}
USES+= compiler:openmp
BUILDFLAGS_THREAD+= USE_OPENMP=1
.else
USES+= compiler:c11
.endif
.if ! ${PORT_OPTIONS:MAVX}
BUILDFLAGS+= NO_AVX=1
.endif
@ -109,69 +101,35 @@ BUILDFLAGS+= NO_AVX=1
BUILDFLAGS+= NO_AVX2=1
.endif
.if ${PORT_OPTIONS:MOPENMP}
USES+= compiler:openmp
BUILDFLAGS_THREAD+= USE_OPENMP=1
.else
USES+= compiler:c11
.endif
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MOPENMP}
.if ${CHOSEN_COMPILER_TYPE} == gcc
USE_GCC= yes
.endif
.endif
post-extract:
cd ${DISTDIR}/${DIST_SUBDIR} ; \
${CP} ${LARGE_FILE} ${TIMING_FILE} ${WRKSRC}
${MKDIR} ${WRKDIR}/lib
post-patch:
${REINPLACE_CMD} -e "s+%%FIND%%+${FIND}+" \
-e "s+%%XARGS%%+${XARGS}+" \
-e "s+%%REINPLACE_CMD%%+${REINPLACE_CMD}+" \
${WRKSRC}/Makefile
${REINPLACE_CMD} -e "s+%%FC%%+${FC}+" -e "s+%%CC%%+${CC}+" \
${WRKSRC}/Makefile.rule
${REINPLACE_CMD} -e "s+(ARCH)+(ARCH_)+" \
${WRKSRC}/Makefile.rule \
${WRKSRC}/Makefile.tail \
${WRKSRC}/driver/level3/Makefile \
${WRKSRC}/driver/others/Makefile \
${WRKSRC}/exports/Makefile \
${WRKSRC}/interface/Makefile \
${WRKSRC}/kernel/Makefile \
${WRKSRC}/kernel/Makefile.L3 \
${WRKSRC}/lapack/laswp/Makefile \
${WRKSRC}/lapack-netlib/SRC/Makefile \
${WRKSRC}/lapack-netlib/SRC/VARIANTS/Makefile \
${WRKSRC}/lapack-netlib/TESTING/MATGEN/Makefile \
${WRKSRC}/lapack-netlib/LAPACKE/src/Makefile \
${WRKSRC}/lapack-netlib/LAPACKE/utils/Makefile \
${WRKSRC}/reference/Makefile
${REINPLACE_CMD} -e "s+(ARCH)+(ARCH_)+" \
-e 's+%%LDFLAGS%%+${LDFLAGS}+' \
-e 's+%%LOCALBASE%%+${LOCALBASE}+' \
-e 's+%%FIND%%+${FIND}+' \
-e 's+%%XARGS%%+${XARGS}+' \
-e 's+%%REINPLACE_CMD%%+${REINPLACE_CMD}+' \
-e 's+$${CROSS_SUFFIX}+${LOCALBASE}/bin/+' \
-e '/Clang.*OpenMP/g' \
${WRKSRC}/Makefile.system
${REINPLACE_CMD} \
-e 's/defined(linux)/(defined(linux) || defined(__FreeBSD__))/g' \
-e 's/ifdef linux/if defined(linux) || defined(__FreeBSD__)/g' \
${WRKSRC}/kernel/power/*.S
post-patch-OPENMP-on:
${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \
@${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \
${WRKSRC}/test/Makefile \
${WRKSRC}/ctest/Makefile
do-build:
cd ${WRKSRC} ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=1 USE_THREAD=0 \
${MAKE_CMD} ${MAKE_ARGS}
${CP} ${WRKSRC}/libopenblas-${OPENBLAS_SUFX}.a ${WRKDIR}/lib/libopenblas.a
${CP} ${WRKSRC}/libopenblas-${OPENBLAS_SUFX}.so ${WRKDIR}/lib/libopenblas.so.${OPENBLAS_SVER}
cd ${WRKSRC} ; ${MAKE_CMD} ${MAKE_ARGS} clean
cd ${WRKSRC} ; ${SETENV} ${BUILDFLAGS} ${BUILDFLAGS_THREAD} \
${MAKE_CMD} ${MAKE_ARGS}
${CP} ${WRKSRC}/libopenblasp-${OPENBLAS_SUFX}.a ${WRKDIR}/lib/libopenblasp.a
${CP} ${WRKSRC}/libopenblasp-${OPENBLAS_SUFX}.so ${WRKDIR}/lib/libopenblasp.so.${OPENBLAS_SVER}
BENCHMARK_MAXTHREADS?= ${MAXTHREADS}
.if ${PORT_OPTIONS:MOPENMP}
BENCHMARK_THREADS_FLAG= OMP_NUM_THREADS=${BENCHMARK_MAXTHREADS}
BENCHMARK_THREADS_FLAG= OMP_NUM_THREADS=${BENCHMARK_MAXTHREADS}
.else
BENCHMARK_THREADS_FLAG= OPENBLAS_NUM_THREADS=${BENCHMARK_MAXTHREADS}
BENCHMARK_THREADS_FLAG= OPENBLAS_NUM_THREADS=${BENCHMARK_MAXTHREADS}
.endif
benchmark: build
@ -180,12 +138,7 @@ benchmark: build
cd ${WRKSRC}/benchmark ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=${MAXTHREADS} \
USE_THREAD=1 ${BENCHMARK_THREADS_FLAG} ${MAKE_CMD} ${MAKE_ARGS}
do-install:
.for L in ${OPENBLAS_LIBS}
${INSTALL_DATA} ${WRKDIR}/lib/${L}.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_LIB} ${WRKDIR}/lib/${L}.so.${OPENBLAS_SVER} ${STAGEDIR}${PREFIX}/lib
${LN} -sf ${L}.so.${OPENBLAS_SVER} ${STAGEDIR}${PREFIX}/lib/${L}.so
.endfor
post-install:
cd ${WRKSRC} && \
${FIND} . -name 'common*.h' -print | ${XARGS} ${BASENAME} | ${XARGS} -I {} ${MV} {} openblas_{}
${MV} ${WRKSRC}/version.h ${WRKSRC}/openblas_version.h
@ -206,8 +159,9 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/openblas_*.h ${STAGEDIR}${PREFIX}/include/openblas
${INSTALL_DATA} ${WRKSRC}/cblas.h ${WRKSRC}/config_last.h ${WRKSRC}/l1param.h ${WRKSRC}/l2param.h ${WRKSRC}/symcopy.h \
${STAGEDIR}${PREFIX}/include/openblas
${MV} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}_*-r${PORTVERSION}.a ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.a
${MV} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}_*-r${PORTVERSION}.so ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so.${OPENBLAS_SVER}
${RM} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so
${LN} -sf lib${PORTNAME}.so.${OPENBLAS_SVER} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so
do-install-DYNAMIC_ARCH-on:
${INSTALL_DATA} ${WRKSRC}/config_kernel.h ${STAGEDIR}${PREFIX}/include/openblas
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -1,7 +1,7 @@
TIMESTAMP = 1503123719
TIMESTAMP = 1571670934
SHA256 (openblas/large.tgz) = f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1
SIZE (openblas/large.tgz) = 2595
SHA256 (openblas/timing.tgz) = 999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af
SIZE (openblas/timing.tgz) = 1059485
SHA256 (openblas/xianyi-OpenBLAS-v0.2.20_GH0.tar.gz) = 5ef38b15d9c652985774869efd548b8e3e972e1e99475c673b25537ed7bcf394
SIZE (openblas/xianyi-OpenBLAS-v0.2.20_GH0.tar.gz) = 11637301
SHA256 (openblas/xianyi-OpenBLAS-v0.3.7_GH0.tar.gz) = bde136122cef3dd6efe2de1c6f65c10955bbb0cc01a520c2342f5287c28f9379
SIZE (openblas/xianyi-OpenBLAS-v0.3.7_GH0.tar.gz) = 11986592

View File

@ -1,11 +0,0 @@
--- Makefile.orig 2015-10-27 20:44:50 UTC
+++ Makefile
@@ -238,7 +238,7 @@ ifndef NOFORTRAN
-@echo "LOADOPTS = $(FFLAGS) $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "CC = $(CC)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "override CFLAGS = $(LAPACK_CFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
- -@echo "ARCH = $(AR)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "ARCH_ = $(AR)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "ARCHFLAGS = -ru" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "RANLIB = $(RANLIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
-@echo "LAPACKLIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc

View File

@ -1,15 +0,0 @@
--- Makefile.rule.orig 2015-10-27 20:44:50 UTC
+++ Makefile.rule
@@ -19,10 +19,10 @@ VERSION = 0.2.15
# C compiler including binary type(32bit / 64bit). Default is gcc.
# Don't use Intel Compiler or PGI, it won't generate right codes as I expect.
-# CC = gcc
+CC = %%CC%%
# Fortran compiler. Default is g77.
-# FC = gfortran
+FC = %%FC%%
# Even you can specify cross compiler. Meanwhile, please set HOSTCC.

View File

@ -1,62 +0,0 @@
--- Makefile.system.orig 2015-10-27 20:44:50 UTC
+++ Makefile.system
@@ -218,6 +218,7 @@ MD5SUM = md5 -r
endif
ifeq ($(OSNAME), FreeBSD)
+EXTRALIB += -lm %%LDFLAGS%%
MD5SUM = md5 -r
endif
@@ -889,9 +890,17 @@ SYMBOLSUFFIX =
endif
ifndef LIBNAMESUFFIX
+ifndef SMP
LIBPREFIX = lib$(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)
else
+LIBPREFIX = lib$(SYMBOLPREFIX)openblasp$(SYMBOLSUFFIX)
+endif
+else
+ifndef SMP
LIBPREFIX = lib$(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
+else
+LIBPREFIX = lib$(SYMBOLPREFIX)openblasp$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
+endif
endif
KERNELDIR = $(TOPDIR)/kernel/$(ARCH)
@@ -1020,24 +1029,8 @@ ifndef LIBSUFFIX
LIBSUFFIX = a
endif
-ifneq ($(DYNAMIC_ARCH), 1)
-ifndef SMP
-LIBNAME = $(LIBPREFIX)_$(LIBCORE)$(REVISION).$(LIBSUFFIX)
-LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)$(REVISION)_p.$(LIBSUFFIX)
-else
-LIBNAME = $(LIBPREFIX)_$(LIBCORE)p$(REVISION).$(LIBSUFFIX)
-LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)p$(REVISION)_p.$(LIBSUFFIX)
-endif
-else
-ifndef SMP
LIBNAME = $(LIBPREFIX)$(REVISION).$(LIBSUFFIX)
LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX)
-else
-LIBNAME = $(LIBPREFIX)p$(REVISION).$(LIBSUFFIX)
-LIBNAME_P = $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX)
-endif
-endif
-
LIBDLLNAME = $(LIBPREFIX).dll
LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so)
@@ -1067,7 +1060,7 @@ LIB_COMPONENTS = CBLAS
endif
export OSNAME
-export ARCH
+export ARCH_
export CORE
export LIBCORE
export PGCPATH

View File

@ -1,6 +1,6 @@
--- c_check.orig 2015-10-27 20:44:50 UTC
--- c_check.orig 2019-04-29 17:22:19 UTC
+++ c_check
@@ -235,7 +235,7 @@ open(CONFFILE, "> $config" ) || die "Ca
@@ -320,7 +320,7 @@ open(CONFFILE, "> $config" ) || die "Can't create $co
# print $data, "\n";
print MAKEFILE "OSNAME=$os\n";

View File

@ -1,6 +1,6 @@
--- common_arm.h.orig 2016-09-01 03:58:42 UTC
--- common_arm.h.orig 2018-08-30 22:07:48 UTC
+++ common_arm.h
@@ -93,6 +93,17 @@ static inline int blas_quickdivide(blasint x, blasint
@@ -93,6 +93,17 @@ static inline int blas_quickdivide(blasint x, blasint
#endif

View File

@ -1,38 +0,0 @@
--- common_power.h.orig 2017-07-24 04:03:35 UTC
+++ common_power.h
@@ -241,7 +241,7 @@ static inline int blas_quickdivide(blasint x, blasint
#define HAVE_PREFETCH
#endif
-#if defined(POWER3) || defined(POWER6) || defined(PPCG4) || defined(CELL) || defined(POWER8)
+#if defined(POWER3) || defined(POWER6) || defined(PPCG4) || defined(CELL) || defined(POWER8) || defined(PPC970)
#define DCBT_ARG 0
#else
#define DCBT_ARG 8
@@ -499,7 +499,7 @@ static inline int blas_quickdivide(blasint x, blasint
#if defined(ASSEMBLER) && !defined(NEEDPARAM)
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_FREEBSD)
#ifndef __64BIT__
#define PROLOGUE \
.section .text;\
@@ -774,7 +774,7 @@ Lmcount$lazy_ptr:
#define HALT mfspr r0, 1023
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_FREEBSD)
#if defined(PPC440) || defined(PPC440FP2)
#undef MAX_CPU_NUMBER
#define MAX_CPU_NUMBER 1
@@ -819,7 +819,7 @@ Lmcount$lazy_ptr:
#define MAP_ANONYMOUS MAP_ANON
#endif
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_FREEBSD)
#ifndef __64BIT__
#define FRAMESLOT(X) (((X) * 4) + 8)
#else

View File

@ -1,6 +1,6 @@
--- cpuid_arm64.c.orig 2016-09-01 03:58:42 UTC
--- cpuid_arm64.c.orig 2019-04-29 17:22:19 UTC
+++ cpuid_arm64.c
@@ -132,6 +132,8 @@ int detect(void)
@@ -180,6 +180,8 @@ int detect(void)
}

View File

@ -1,12 +0,0 @@
--- cpuid_ia64.c.orig 2015-10-27 20:44:50 UTC
+++ cpuid_ia64.c
@@ -38,7 +38,9 @@
#include <stdio.h>
#include <string.h>
+#ifdef linux
#include <sys/sysinfo.h>
+#endif
#include "cpuid.h"
#ifdef __ECC

View File

@ -1,10 +0,0 @@
--- cpuid_sparc.c.orig 2015-10-27 20:44:50 UTC
+++ cpuid_sparc.c
@@ -49,6 +49,7 @@ void get_subdirname(void){
}
void get_cpuconfig(void){
+ printf("#define SPARC\n");
printf("#define V9\n");
printf("#define DTB_DEFAULT_ENTRIES 32\n");
}

View File

@ -1,18 +0,0 @@
--- cpuid_x86.c.orig 2017-07-24 04:03:35 UTC
+++ cpuid_x86.c
@@ -1329,6 +1329,7 @@ int get_cpuname(void){
case 8:
switch (model) {
case 1:
+ case 8:
// AMD Ryzen
if(support_avx())
#ifndef NO_AVX2
@@ -1865,6 +1866,7 @@ int get_coretype(void){
} else if (exfamily == 8) {
switch (model) {
case 1:
+ case 8:
// AMD Ryzen
if(support_avx())
#ifndef NO_AVX2

View File

@ -1,13 +0,0 @@
Passing a priority level to constructor/destructor only works on GCC >= 4.3.0;
improve the upstream check so that the build works with base GCC.
--- driver/others/memory.c.orig 2016-04-12 19:29:19 UTC
+++ driver/others/memory.c
@@ -144,7 +144,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF
#if defined(_MSC_VER) && !defined(__clang__)
#define CONSTRUCTOR __cdecl
#define DESTRUCTOR __cdecl
-#elif (defined(OS_DARWIN) || defined(OS_SUNOS)) && defined(C_GCC)
+#elif (defined(OS_DARWIN) || defined(OS_SUNOS)) || (defined(C_GCC) && ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3)))
#define CONSTRUCTOR __attribute__ ((constructor))
#define DESTRUCTOR __attribute__ ((destructor))
#else

View File

@ -1,18 +0,0 @@
--- exports/Makefile.orig 2015-10-27 20:44:50 UTC
+++ exports/Makefile
@@ -140,6 +140,7 @@ endif
#http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or
ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD NetBSD))
+EXTRALIB += -lgfortran
so : ../$(LIBSONAME)
ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
@@ -151,6 +152,7 @@ else
endif
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
-Wl,--whole-archive $< -Wl,--no-whole-archive \
+ -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) \
$(FEXTRALIB) $(EXTRALIB)
$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
rm -f linktest

View File

@ -1,6 +1,6 @@
--- f_check.orig 2015-10-27 20:44:50 UTC
--- f_check.orig 2018-12-02 22:41:17 UTC
+++ f_check
@@ -261,7 +261,7 @@ if ($link ne "") {
@@ -288,7 +288,7 @@ if ($link ne "") {
foreach $flags (@flags) {
if (
@ -9,7 +9,7 @@
&& ($flags !~ /^-LIST:/)
&& ($flags !~ /^-LANG:/)
) {
@@ -292,7 +292,7 @@ if ($link ne "") {
@@ -317,7 +317,7 @@ if ($link ne "") {
}
if (

View File

@ -1,6 +1,6 @@
--- interface/ztrmv.c.orig 2016-09-01 03:58:42 UTC
--- interface/ztrmv.c.orig 2019-04-29 17:22:19 UTC
+++ interface/ztrmv.c
@@ -242,7 +242,7 @@ void CNAME(enum CBLAS_ORDER order, enum
@@ -245,7 +245,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Upl
else
#endif
{

View File

@ -1,11 +0,0 @@
--- param.h.orig 2019-06-28 14:19:50 UTC
+++ param.h
@@ -1877,7 +1877,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILI
#define ZGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_N 2
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_FREEBSD)
#if L2_SIZE == 1024976
#define SGEMM_DEFAULT_P 320
#define DGEMM_DEFAULT_P 256

View File

@ -1,4 +1,13 @@
include/cblas.h
include/f77blas.h
include/lapacke.h
include/lapacke_config.h
include/lapacke_mangling.h
include/lapacke_utils.h
include/openblas/cblas.h
include/openblas/config_last.h
include/openblas/l1param.h
include/openblas/l2param.h
include/openblas/openblas_common.h
include/openblas/openblas_common_alpha.h
include/openblas/openblas_common_arm.h
@ -29,12 +38,15 @@ include/openblas/openblas_common_x86_64.h
include/openblas/openblas_common_z.h
include/openblas/openblas_common_zarch.h
include/openblas/openblas_config.h
%%DYNARCH%%include/openblas/config_kernel.h
include/openblas/config_last.h
include/openblas/openblas_cpuid.h
include/openblas/l1param.h
include/openblas/l2param.h
include/openblas/openblas_config_template.h
include/openblas/openblas_param.h
include/openblas/symcopy.h
include/openblas/openblas_version.h
include/openblas/symcopy.h
include/openblas_config.h
lib/cmake/openblas/OpenBLASConfig.cmake
lib/cmake/openblas/OpenBLASConfigVersion.cmake
lib/libopenblas.a
lib/libopenblas.so
lib/libopenblas.so.0
libdata/pkgconfig/openblas.pc

View File

@ -3,7 +3,7 @@
PORTNAME= numpy
PORTVERSION= 1.16.5
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= math python
MASTER_SITES= CHEESESHOP \
@ -44,7 +44,7 @@ NETLIB_USES= blaslapack:netlib
NETLIB_VARS= BLASLIBS="blas, cblas" BLASNAME=atlas LAPACKLIBS=lapack LIBRARIES=atlas_libs
NETLIB_LIB_DEPENDS= libcblas.so:math/cblas
OPENBLAS_USES= blaslapack:openblas
OPENBLAS_VARS= BLASLIBS="openblasp, gfortran" BLASNAME=openblas LAPACKLIBS="openblasp, gfortran" LIBRARIES=libraries
OPENBLAS_VARS= BLASLIBS="openblas, gfortran" BLASNAME=openblas LAPACKLIBS="openblas, gfortran" LIBRARIES=libraries
SUITESPARSE_LIB_DEPENDS=libumfpack.so:math/suitesparse
post-extract:

View File

@ -3,7 +3,7 @@
PORTNAME= mxnet
DISTVERSION= 1.6.0
DISTVERSIONSUFFIX= .rc0
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= misc # machine-learning
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
@ -16,7 +16,6 @@ COMMENT= Apache MXNet: Ultra-scalable deep learning framework
LICENSE= APACHE20
BUILD_DEPENDS= googletest>0:devel/googletest \
${LOCALBASE}/include/cblas.h:math/cblas \
${LOCALBASE}/include/dnnl.h:math/mkl-dnn
LIB_DEPENDS= libdmlc.so:devel/dmlc-core \
liblapack.so:math/lapack \

View File

@ -17,7 +17,6 @@ LIB_DEPENDS= libderiv.so:science/libint \
libgsl.so:math/gsl \
libhdf5.so:science/hdf5 \
libint.so:science/libint \
libopenblas.so:math/openblas \
libsz.so:science/szip \
libxc.so:science/libxc
RUN_DEPENDS= ${LOCALBASE}/share/erkale/basis/6-21G.gbs:science/erkale-pseudopotentials
@ -49,7 +48,7 @@ LIB_DEPENDS+= libomp.so:devel/llvm${LLVM_DEFAULT}
OPTIONS_SINGLE= LINALG
OPTIONS_SINGLE_LINALG= NETLIB OPENBLAS
OPTIONS_DEFAULT= NETLIB
OPTIONS_DEFAULT= OPENBLAS
LINALG_DESC= Linear algebra library
NETLIB_USES= blaslapack:netlib
@ -58,8 +57,8 @@ NETLIB_LDFLAGS= ${LOCALBASE}/lib/libcblas.so ${LOCALBASE}/lib/liblapack.so ${LO
NETLIB_LIB_DEPENDS= libcblas.so:math/cblas
OPENBLAS_USES= blaslapack:openblas
OPENBLAS_CMAKE_ON= -DLAPACK_LIBRARIES:STRING=-lopenblas -DBLAS_LIBRARIES:STRING=-lopenblasp
OPENBLAS_BROKEN= hits the number of threads limit: https://github.com/xianyi/OpenBLAS/issues/1882
OPENBLAS_CMAKE_ON= -DLAPACK_LIBRARIES:STRING=-lopenblas -DBLAS_LIBRARIES:STRING=-lopenblas
OPENBLAS_LIB_DEPENDS= libopenblas.so:math/openblas
# use clang from ports because cmake can't find OpenMP with base clang, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223678
# have the same compiler for both serial and parallel flavors so that performance numbers can be compared

View File

@ -1,15 +0,0 @@
--- CMakeLists.txt.orig 2018-03-26 22:49:26 UTC
+++ CMakeLists.txt
@@ -25,7 +25,11 @@ if(QUADMATH_FOUND)
set(HAVE_QUADMATH_H 1 CACHE INTERNAL "Have QUADMATH")
endif()
-find_package(BLAS REQUIRED)
+# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226959
+#find_package(BLAS REQUIRED)
+set(BLAS_FOUND ON)
+set(BLAS_LINKER_FLAGS -L${CMAKE_INSTALL_PREFIX}/lib -lopenblas -lopenblasp)
+set(BLAS_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/libopenblas.so ${CMAKE_INSTALL_PREFIX}/lib/libopenblasp.so)
include(CheckFunctionExists)
set(CMAKE_REQUIRED_INCLUDES math.h)