import openblas-0.3.15-2.el8

This commit is contained in:
CentOS Sources 2021-11-08 12:23:19 +00:00 committed by Stepan Oksanichenko
parent 4e5c5ab532
commit c8f5042ddc

View File

@ -2,6 +2,9 @@
# Version of bundled lapack
%global lapackver 3.9.1
# Use strip from gcc-toolset-11
%global __strip "scl enable gcc-toolset-11 -- strip"
# DO NOT "CLEAN UP" OR MODIFY THIS SPEC FILE WITHOUT ASKING THE
# MAINTAINER FIRST!
#
@ -15,7 +18,7 @@
Name: openblas
Version: 0.3.15
Release: 1%{?dist}
Release: 2%{?dist}
Summary: An optimized BLAS library based on GotoBLAS2
Group: Development/Libraries
License: BSD
@ -349,7 +352,7 @@ LAPACKE="NO_LAPACKE=1"
NMAX="NUM_THREADS=128"
%ifarch %{ix86} x86_64
TARGET="TARGET=CORE2 DYNAMIC_ARCH=1"
TARGET="TARGET=CORE2 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
# Compability for old versions of GCC
%if 0%{?rhel} == 5
@ -361,22 +364,23 @@ export AVX="NO_AVX2=1"
%endif
%ifarch armv7hl
# ARM v7 still doesn't have runtime cpu detection...
TARGET="TARGET=ARMV7 DYNAMIC_ARCH=0"
%endif
%ifarch ppc64
TARGET="TARGET=POWER6 DYNAMIC_ARCH=0"
TARGET="TARGET=POWER6 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
%endif
%ifarch ppc64p7
TARGET="TARGET=POWER7 DYNAMIC_ARCH=0"
TARGET="TARGET=POWER7 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
%endif
%ifarch ppc64le
TARGET="TARGET=POWER8 DYNAMIC_ARCH=0"
TARGET="TARGET=POWER8 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
%endif
%ifarch aarch64
TARGET="TARGET=ARMV8 DYNAMIC_ARCH=0"
TARGET="TARGET=ARMV8 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
%endif
%ifarch s390x
TARGET="TARGET=ZARCH_GENERIC DYNAMIC_ARCH=1"
TARGET="TARGET=ZARCH_GENERIC DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
%endif
%if 0%{?rhel} == 5
@ -398,7 +402,7 @@ make -C Rblas $TARGET USE_THREAD=0 USEOPENMP=0 FC=gfortran CC=gcc COMMON_OP
# Declare some necessary build flags
COMMON="%{optflags} -fPIC"
FCOMMON="$COMMON -frecursive -cpp"
make -C serial $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas" $AVX $LAPACKE INTERFACE64=0
make -C serial $TARGET USE_THREAD=0 USE_LOCKING=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas" $AVX $LAPACKE INTERFACE64=0
make -C threaded $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblasp" $AVX $LAPACKE INTERFACE64=0
# USE_THREAD determines use of SMP, not of pthreads
@ -409,7 +413,7 @@ make -C openmp $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_O
%if %build64
COMMON="%{optflags} -fPIC"
FCOMMON="$COMMON -frecursive -fdefault-integer-8 -cpp"
make -C serial64 $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas64" $AVX $LAPACKE INTERFACE64=1
make -C serial64 $TARGET USE_THREAD=0 USE_LOCKING=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas64" $AVX $LAPACKE INTERFACE64=1
make -C threaded64 $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblasp64" $AVX $LAPACKE INTERFACE64=1
COMMON="%{optflags} -fPIC -fopenmp -pthread"
@ -418,7 +422,7 @@ make -C openmp64 $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_O
COMMON="%{optflags} -fPIC"
FCOMMON="$COMMON -frecursive -fdefault-integer-8 -cpp"
make -C serial64_ $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
make -C serial64_ $TARGET USE_THREAD=0 USE_LOCKING=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
make -C threaded64_ $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblasp64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
COMMON="%{optflags} -fPIC -fopenmp -pthread"
@ -439,22 +443,12 @@ cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name}
# Fix i686-x86_64 multilib difference
%multilib_fix_c_header --file %{_includedir}/openblas/openblas_config.h
# Fix name of libraries
# Fix name of libraries: runtime CPU detection has none
suffix=""
# but archs that don't have it do have one
%ifarch armv7hl
suffix="_armv7"
%endif
%ifarch ppc64
suffix="_power6"
%endif
%ifarch ppc64p7
suffix="_power7"
%endif
%ifarch ppc64le
suffix="_power8"
%endif
%ifarch aarch64
suffix="_armv8"
%endif
slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a
if [[ "$suffix" != "" ]]; then
@ -680,6 +674,10 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
%endif
%changelog
* Thu Oct 21 2021 Nikola Forró <nforro@redhat.com> - 0.3.15-2
- Enable dynamic cpu detection on all supported architectures
related: #1983218
* Wed Sep 15 2021 Nikola Forró <nforro@redhat.com> - 0.3.15-1
- Rebase to version 0.3.15
- Use gcc-toolset-11 to benefit from POWER 10 optimizations