diff --git a/Mk/Uses/blaslapack.mk b/Mk/Uses/blaslapack.mk index b0e10225c38d..69b7fc572d24 100644 --- a/Mk/Uses/blaslapack.mk +++ b/Mk/Uses/blaslapack.mk @@ -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 diff --git a/biology/gemma/Makefile b/biology/gemma/Makefile index 6dec370bd0fc..1bd1e734d115 100644 --- a/biology/gemma/Makefile +++ b/biology/gemma/Makefile @@ -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 diff --git a/games/leela-zero/Makefile b/games/leela-zero/Makefile index 4059c2f4f9dc..8d5c0e069e5f 100644 --- a/games/leela-zero/Makefile +++ b/games/leela-zero/Makefile @@ -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 diff --git a/lang/julia06/Makefile b/lang/julia06/Makefile index 15109b7c4973..0f8fefe70eb5 100644 --- a/lang/julia06/Makefile +++ b/lang/julia06/Makefile @@ -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 @@ -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 diff --git a/lang/julia07/Makefile b/lang/julia07/Makefile index eaa9afed575d..1e4ba9fbb63f 100644 --- a/lang/julia07/Makefile +++ b/lang/julia07/Makefile @@ -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 @@ -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 diff --git a/lang/julia10/Makefile b/lang/julia10/Makefile index 5d7dd3a79cf7..b381b0bbca7b 100644 --- a/lang/julia10/Makefile +++ b/lang/julia10/Makefile @@ -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 @@ -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 diff --git a/lang/julia11/Makefile b/lang/julia11/Makefile index cbf37e504b38..4c30093e5a23 100644 --- a/lang/julia11/Makefile +++ b/lang/julia11/Makefile @@ -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 @@ -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 diff --git a/math/armadillo/Makefile b/math/armadillo/Makefile index 648cf50beb1e..d083146389dc 100644 --- a/math/armadillo/Makefile +++ b/math/armadillo/Makefile @@ -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 \ diff --git a/math/hmat-oss/Makefile b/math/hmat-oss/Makefile index fc34d5daf56a..35d86b0cc0a5 100644 --- a/math/hmat-oss/Makefile +++ b/math/hmat-oss/Makefile @@ -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 diff --git a/math/octave-forge-ltfat/Makefile b/math/octave-forge-ltfat/Makefile index 01aaa31f7fe3..9a7e6bffe230 100644 --- a/math/octave-forge-ltfat/Makefile +++ b/math/octave-forge-ltfat/Makefile @@ -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}. diff --git a/math/openblas/Makefile b/math/openblas/Makefile index 963e6823dba5..1a7ea1c331e8 100644 --- a/math/openblas/Makefile +++ b/math/openblas/Makefile @@ -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 .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 + +.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 +.include diff --git a/math/openblas/distinfo b/math/openblas/distinfo index 1e4fac8f5207..a8e4a69d3894 100644 --- a/math/openblas/distinfo +++ b/math/openblas/distinfo @@ -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 diff --git a/math/openblas/files/patch-Makefile b/math/openblas/files/patch-Makefile deleted file mode 100644 index 40d2c20099ea..000000000000 --- a/math/openblas/files/patch-Makefile +++ /dev/null @@ -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 diff --git a/math/openblas/files/patch-Makefile.rule b/math/openblas/files/patch-Makefile.rule deleted file mode 100644 index f85e73064fa8..000000000000 --- a/math/openblas/files/patch-Makefile.rule +++ /dev/null @@ -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. - diff --git a/math/openblas/files/patch-Makefile.system b/math/openblas/files/patch-Makefile.system deleted file mode 100644 index aed8055a68c7..000000000000 --- a/math/openblas/files/patch-Makefile.system +++ /dev/null @@ -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 diff --git a/math/openblas/files/patch-c_check b/math/openblas/files/patch-c_check index e2254a3081e2..817371d8f62f 100644 --- a/math/openblas/files/patch-c_check +++ b/math/openblas/files/patch-c_check @@ -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"; diff --git a/math/openblas/files/patch-common__arm.h b/math/openblas/files/patch-common__arm.h index f42591543dc0..7c6e402278e2 100644 --- a/math/openblas/files/patch-common__arm.h +++ b/math/openblas/files/patch-common__arm.h @@ -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 diff --git a/math/openblas/files/patch-common__power.h b/math/openblas/files/patch-common__power.h deleted file mode 100644 index cf1ac03278e5..000000000000 --- a/math/openblas/files/patch-common__power.h +++ /dev/null @@ -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 diff --git a/math/openblas/files/patch-cpuid__arm64.c b/math/openblas/files/patch-cpuid__arm64.c index a0d2451ebe22..592272acf705 100644 --- a/math/openblas/files/patch-cpuid__arm64.c +++ b/math/openblas/files/patch-cpuid__arm64.c @@ -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) } diff --git a/math/openblas/files/patch-cpuid_ia64.c b/math/openblas/files/patch-cpuid_ia64.c deleted file mode 100644 index c7092465ec12..000000000000 --- a/math/openblas/files/patch-cpuid_ia64.c +++ /dev/null @@ -1,12 +0,0 @@ ---- cpuid_ia64.c.orig 2015-10-27 20:44:50 UTC -+++ cpuid_ia64.c -@@ -38,7 +38,9 @@ - - #include - #include -+#ifdef linux - #include -+#endif - #include "cpuid.h" - - #ifdef __ECC diff --git a/math/openblas/files/patch-cpuid_sparc.c b/math/openblas/files/patch-cpuid_sparc.c deleted file mode 100644 index f9d8239fc0e5..000000000000 --- a/math/openblas/files/patch-cpuid_sparc.c +++ /dev/null @@ -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"); - } diff --git a/math/openblas/files/patch-cpuid_x86.c b/math/openblas/files/patch-cpuid_x86.c deleted file mode 100644 index 38f6a1b7da3c..000000000000 --- a/math/openblas/files/patch-cpuid_x86.c +++ /dev/null @@ -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 diff --git a/math/openblas/files/patch-driver_others_memory.c b/math/openblas/files/patch-driver_others_memory.c deleted file mode 100644 index 4dbbb1d80c0a..000000000000 --- a/math/openblas/files/patch-driver_others_memory.c +++ /dev/null @@ -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 diff --git a/math/openblas/files/patch-exports+Makefile b/math/openblas/files/patch-exports+Makefile deleted file mode 100644 index fa147ae47437..000000000000 --- a/math/openblas/files/patch-exports+Makefile +++ /dev/null @@ -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 diff --git a/math/openblas/files/patch-f_check b/math/openblas/files/patch-f_check index 72113d19766b..9a193257937d 100644 --- a/math/openblas/files/patch-f_check +++ b/math/openblas/files/patch-f_check @@ -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 ( diff --git a/math/openblas/files/patch-interface__ztrmv.c b/math/openblas/files/patch-interface__ztrmv.c index f11da94c6e1c..854a83bf42ea 100644 --- a/math/openblas/files/patch-interface__ztrmv.c +++ b/math/openblas/files/patch-interface__ztrmv.c @@ -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 { diff --git a/math/openblas/files/patch-param.h b/math/openblas/files/patch-param.h deleted file mode 100644 index d5ccfefc9a5c..000000000000 --- a/math/openblas/files/patch-param.h +++ /dev/null @@ -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 diff --git a/math/openblas/pkg-plist b/math/openblas/pkg-plist index 908883c637d2..963ef1569157 100644 --- a/math/openblas/pkg-plist +++ b/math/openblas/pkg-plist @@ -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 diff --git a/math/py-numpy/Makefile b/math/py-numpy/Makefile index df6a35018b8a..5ebb23e9b2d4 100644 --- a/math/py-numpy/Makefile +++ b/math/py-numpy/Makefile @@ -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: diff --git a/misc/mxnet/Makefile b/misc/mxnet/Makefile index 9432f294fd10..ebcebfc836a3 100644 --- a/misc/mxnet/Makefile +++ b/misc/mxnet/Makefile @@ -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 \ diff --git a/science/erkale/Makefile b/science/erkale/Makefile index 401f1ca66c55..844b8de1038c 100644 --- a/science/erkale/Makefile +++ b/science/erkale/Makefile @@ -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 diff --git a/science/libcint/files/patch-CMakeLists.txt b/science/libcint/files/patch-CMakeLists.txt deleted file mode 100644 index a568548498f6..000000000000 --- a/science/libcint/files/patch-CMakeLists.txt +++ /dev/null @@ -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)