Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package openblas for openSUSE:Factory checked in at 2022-04-05 19:54:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openblas (Old) and /work/SRC/openSUSE:Factory/.openblas.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openblas" Tue Apr 5 19:54:57 2022 rev:46 rq:966746 version:0.3.20 Changes: -------- --- /work/SRC/openSUSE:Factory/openblas/openblas.changes 2022-02-03 23:17:04.592371104 +0100 +++ /work/SRC/openSUSE:Factory/.openblas.new.1900/openblas.changes 2022-04-05 19:55:01.470520513 +0200 @@ -1,0 +2,156 @@ +Wed Mar 30 12:00:30 UTC 2022 - Egbert Eich <e...@suse.com> + +- Build PPC64LE libraries with the lastest gcc available to + take advantage of instruction sets in later CPUs used in + the CPU specific kernels (jsc#SLE-18143, bsc#1197721). + For fortran use the stock compiler to avoid compatibility + issues between different versions of libfortran. + This is relevant for Leap/SLE only. It may be dropped once + gcc < 10 is no longer supported. +- Do the same for x86_64 on SLE to make sure Cooperlake support + is built properly. +- Remove: + * Do-not-attempt-to-check-host-CPU-if-TARGET-is-set.patch + * Create-independent-kernel-Makfile-configuration-when-building-DYNAMIC_ARCH.patch + * For-DYNAMIC_ARCH-don-t-use-sbgemm_r-as-parameter.c-doesn-t-get-build.patch + Instead, add from upstream: + * Define-sbgemm_r-to-fix-DYNAMIC_ARCH-builds.patch + * Remove-extraneous-and-wrong-definition-of-sbgemm_r-on-x86_64.patch + * Fix-checks-for-AVX512-and-atomics.patch + * Revert-AVX512-capability-check-from-PR-1980-moved-to-build.patch + * Use-CC-and-full-command-line-instead-of-hard-coding-gcc-for-AVX512-checking.patch + * Utilize-compiler-AVX512-capability-info-from-c_check-when-building-getarch.patch + +------------------------------------------------------------------- +Fri Feb 25 20:10:04 UTC 2022 - Egbert Eich <e...@suse.com> + +- Update to v0.3.20: + * general: + some code cleanup, with added casts etc. + fixed obtaining the cpu count with OpenMP and OMP_PROC_BIND unset + fixed pivot index calculation by ?LASWP for negative increments other + than one + fixed input argument check in LAPACK ? GEQRT2 + improved the check for a Fortran compiler in CMAKE builds + disabled building OpenBLAS' optimized versions of LAPACK complex SPMV, + SPR,SYMV,SYR with NO_LAPACK=1 + fixed building of LAPACK on certain distributed filesystems with parallel + gmake + fixed building the shared library on MacOS with classic flang + (v0.3.19) + reverted unsafe TRSV/ZRSV optimizations introduced in 0.3.16 + fixed a potential thread race in the thread buffer reallocation routines + that were introduced in 0.3.18 + fixed miscounting of thread pool size on Linux with OMP_PROC_BIND=TRUE + fixed CBLAS interfaces for CSROT/ZSROT and CROTG/ZROTG + made automatic library suffix for CMAKE builds with INTERFACE64 available + to CBLAS-only builds + (v0.3.18) + when the build-time number of preconfigured threads is exceeded + at runtime (by an external program calling BLAS functions from + a larger number of threads), OpenBLAS will now allocate an + auxiliary control structure for up to 512 additional threads + instead of aborting + added support for Loongson's LoongArch64 cpu architecture + fixed building OpenBLAS with CMAKE and -DBUILD_BFLOAT16=ON + added support for building OpenBLAS as a CMAKE subproject + added support for building for Windows/ARM64 targets with clang + improved support for building with the IBM xlf compiler + imported Reference-LAPACK PR 625 (out-of-bounds access in ?LARRV) + imported Reference-LAPACK PR 597 for testsuite compatibility with + LLVM's libomp + * x86_64: + fixed cross-compilation with CMAKE for CORE2 target + fixed miscompilation of AVX512 code in DYNAMIC_ARCH builds + added support for the "incidental" AVX512 hardware in Alder Lake when + enabled in BIOS + (v0.3.19) + DYNAMIC_ARCH builds now fall back to the cpu with most similar capabilities + when an unknown CPUID is encountered, instead of defaulting to Prescott + added cpu detection for Intel Alder Lake + added cpu detection for Intel Sapphire Rapids + added an optimized SBGEMM kernel for Sapphire Rapids + fixed DYNAMIC_ARCH builds on OSX with CMAKE + worked around DYNAMIC_ARCH builds made on Sandybridge failing on SkylakeX + fixed missing thread initialization for static builds on Windows/MSVC + fixed an excessive read in ZSYMV + (v0.3.18) + added SkylakeX S/DGEMM kernels for small problem sizes (MNK<=1000000) + added optimized SBGEMM for Intel Cooper Lake + reinstated the performance patch for AVX512 SGEMV_T with a proper fix + added a workaround for a gcc11 tree-vectorizer bug that caused spurious + failures in the test programs for complex BLAS3 when compiling at -O3 + (the default for cmake "release" builds) + added support for runtime cpu count detection under Haiku OS + worked around a long-standing miscompilation issue of the Haswell DGEMV_T + kernel with gcc that could produce NaN output in some corner cases + * Power: + added support for POWER10 in big-endian mode + added support for building with CMAKE + added optimized SGEMM and DGEMM kernels for small matrix sizes + (v0.3.18) + improved performance of DASUM on POWER10 + * ARMV8: + added SVE-enabled CGEMM and ZGEMM kernels for ARMV8SVE and A64FX + added support for Neoverse N2 and V1 cpus + (v0.3.19) + added basic support and cputype detection for Fujitsu A64FX + added a generic ARMV8SVE target + added SVE-enabled SGEMM and DGEMM kernels for ARMV8SVE and A64FX + added optimized CGEMM and ZGEMM kernels for Cortex A53 and A55 cpus + fixed cpuid detection for Apple M1 and improved performance + improved compiler flag setting in CMAKE builds + (v0.3.18) + fixed crashes (use of reserved register x18) on Apple M1 under OSX + fixed building with gcc releases earlier than 5.1 +- Fix out of bounds read in ?llarv + LAPACK Reference: PR 625 + CVE-2021-4048, bsc#1196513 +- Limit parallel builds according to available memory. + Do NOT use %%_smp_mflags with top level 'make', set MAKE_NB_JOBS + instead and let the build do the work. + Also change -flto=auto to -flto=1: spawning even more parallel builds + on top of parallel build treads will wreak havok. +- Move calls to 'update-alternatives --remove' to %%postun instead + of %%preun as suggested by rpmlint. +- Since we build with DYNAMIC_ARCH, create separate config files for + the different target kernels to help debugging + Add Create-independent-kernel-Makfile-configuration-when-building-DYNAMIC_ARCH.patch +- Remove compiler feature detection when not using auto-detection. + Add Do-not-attempt-to-check-host-CPU-if-TARGET-is-set.patch +- Do not depend in variables which are not available when building + DYNAMIC_ARCH. + Add For-DYNAMIC_ARCH-don-t-use-sbgemm_r-as-parameter.c-doesn-t-get-build.patch +- Do not include symbols defined in driver/others/parameter.c in + DYNAMIC_BUILD to generate more conclusive error messages earlier. + Add Do-not-include-symbols-defined-in-driver-others-parameter.c-in-DYNAMIC_BUILD.patch +- Install lapack and blas libraries to an openblas-flavor + specific subdirectory of %%_libdir and set up the alternatives + to point to this directory. Set the system-wide BLAS/LAPACK + default directory to %%_libdir/openblas-default. + This way, the blas/lapack libraries will remain consistent + and from the same source. The user is able to override this + easily by setting the LD_LIBRARY_PATH to include the preferred + BLAS/LAPACK implementation (boo#1177260). +- Consolidate packages 'openblas-devel' and 'openblas-devel-headers' + into 'openblas-common-devel' (these are built for the serial + flavor only). + 'openblas-common-devel' will provide the removed 'openblas-devel-headers' + while the arch specific 'preferred' flavor will provide the removed + 'openblas-devel'. +- Fix the openblas default flavor selection: + # /usr/sbin/update-alternatives --config libopenblas.so.0 +- Add cmake and pkgconfig files. + +------------------------------------------------------------------- +Sun Feb 13 16:02:01 UTC 2022 - Egbert Eich <e...@suse.com> + +- Fixed bsc#1195232 for good: found and removed offending entry. + This reintroduces part of: + Thu Jul 8 12:35:35 UTC 2021 - Dominique Leuenberger <dims...@opensuse.org> + + - Do not create dummy symlinks on $self in /etc/alternatives: those + files are packages as %ghost and any real file existance only + confuses brp-checks, as it detects circular symlinks. + +------------------------------------------------------------------- Old: ---- OpenBLAS-0.3.17.tar.gz New: ---- Define-sbgemm_r-to-fix-DYNAMIC_ARCH-builds.patch Do-not-include-symbols-defined-in-driver-others-parameter.c-in-DYNAMIC_BUILD.patch Fix-checks-for-AVX512-and-atomics.patch OpenBLAS-0.3.20.tar.gz Remove-extraneous-and-wrong-definition-of-sbgemm_r-on-x86_64.patch Revert-AVX512-capability-check-from-PR-1980-moved-to-build.patch Use-CC-and-full-command-line-instead-of-hard-coding-gcc-for-AVX512-checking.patch Utilize-compiler-AVX512-capability-info-from-c_check-when-building-getarch.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openblas.spec ++++++ --- /var/tmp/diff_new_pack.1GZQgb/_old 2022-04-05 19:55:02.166512754 +0200 +++ /var/tmp/diff_new_pack.1GZQgb/_new 2022-04-05 19:55:02.170512709 +0200 @@ -1,5 +1,5 @@ # -# spec file for package openblas +# spec file # # Copyright (c) 2022 SUSE LLC # @@ -18,8 +18,8 @@ %global flavor @BUILD_FLAVOR@%{nil} -%define _vers 0_3_17 -%define vers 0.3.17 +%define _vers 0_3_20 +%define vers 0.3.20 %define pname openblas %bcond_with ringdisabled @@ -31,6 +31,16 @@ %global build_flags USE_THREAD=1 USE_OPENMP=1 +%ifarch ppc64le x86_64 +# Per request by IBM, always use latest gcc but 'stock' fortran +%if 0%{?sle_version} == 150400 +%define cc_v 11 +%endif +%if 0%{?sle_version} == 150300 +%define cc_v 10 +%endif +%endif + %if "%flavor" == "serial" %define build_flags USE_THREAD=0 USE_OPENMP=0 %define openblas_so_prio 20 @@ -42,6 +52,7 @@ %if "%flavor" == "pthreads" %define build_flags USE_THREAD=1 USE_OPENMP=0 %ifarch %ix86 x86_64 + %define arch_flavor 1 %define openblas_so_prio 50 %else %define openblas_so_prio 20 @@ -53,6 +64,7 @@ %ifarch %ix86 x86_64 %define openblas_so_prio 20 %else + %define arch_flavor 1 %define openblas_so_prio 50 %endif %{bcond_with hpc} @@ -135,7 +147,7 @@ %define so_v 0 %define p_prefix %_prefix %define p_includedir %_includedir/%pname -%define p_libdir %_libdir +%define p_libdir %_libdir/openblas%{?flavor:-%{flavor}} %define p_cmakedir %{p_libdir}/cmake/%{pname} %define num_threads 64 @@ -167,6 +179,14 @@ Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}.tar.gz#/OpenBLAS-%{version}.tar.gz Source1: README.SUSE Source2: README.HPC.SUSE +Patch1: Define-sbgemm_r-to-fix-DYNAMIC_ARCH-builds.patch +Patch2: Remove-extraneous-and-wrong-definition-of-sbgemm_r-on-x86_64.patch +Patch3: Do-not-include-symbols-defined-in-driver-others-parameter.c-in-DYNAMIC_BUILD.patch +Patch4: Utilize-compiler-AVX512-capability-info-from-c_check-when-building-getarch.patch +Patch5: Revert-AVX512-capability-check-from-PR-1980-moved-to-build.patch +Patch6: Fix-checks-for-AVX512-and-atomics.patch +Patch7: Use-CC-and-full-command-line-instead-of-hard-coding-gcc-for-AVX512-checking.patch + # PATCH-FIX-UPSTREAM openblas-noexecstack.patch Patch101: openblas-noexecstack.patch # PATCH port @@ -175,8 +195,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build +#BuildRequires: cmake +BuildRequires: memory-constraints %if %{without hpc} BuildRequires: gcc-fortran +%if 0%{?cc_v:1} +BuildRequires: gcc%{?cc_v}-fortran +%endif BuildRequires: update-alternatives Requires(post): update-alternatives Requires(preun):update-alternatives @@ -212,12 +237,6 @@ %hpc_requires %endif -%if %{without hpc} -%define libname %name -%else -%define libname %pname -%endif - %description -n lib%{name}%{?so_v} OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. @@ -228,7 +247,10 @@ Group: Development/Libraries/C and C++ Requires: lib%{name}%{?so_v} = %{version} %if %{without hpc} -Requires: %{pname}-devel-headers = %{version} +Requires: %{pname}-common-devel = %{version} +%if 0%{?arch_flavor} +Provides: %{pname}-devel +%endif %else %hpc_requires_devel %endif @@ -243,37 +265,20 @@ %package devel-static Summary: Static version of OpenBLAS Group: Development/Libraries/C and C++ -%if %{without hpc} -Requires: %{pname}-devel = %{version} -%else Requires: lib%{name}-devel = %{version} -%endif %description devel-static OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. This package contains the static libraries. -%package -n %{pname}-devel +%package -n %{pname}-common-devel Summary: Development headers and libraries for OpenBLAS Group: Development/Libraries/C and C++ -Requires: %{pname}-devel-headers = %{version} -%ifarch %ix86 x86_64 -Requires: lib%{pname}_pthreads-devel = %{version} -%else -Requires: lib%{pname}_openmp-devel = %{version} -%endif +Provides: %{pname}-devel-headers +Provides: pkgconfig(openblas) -%description -n %{pname}-devel -OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. - -%package -n %{pname}-devel-headers -Summary: Development headers for OpenBLAS -Group: Development/Libraries/C and C++ -Conflicts: %{pname}-devel < %{version} -BuildArch: noarch - -%description -n %{pname}-devel-headers +%description -n %{pname}-common-devel OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. This package contains headers for OpenBLAS. @@ -281,9 +286,7 @@ %prep %setup -q -n OpenBLAS-%{version} -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 +%autopatch -p1 %ifarch s390 sed -i -e "s@m32@m31@" Makefile.system %endif @@ -295,8 +298,11 @@ %endif %build + +# Limit lto jobs to 1 - -flto=auto together with make -j<m> +# would cause a huge number of build jobs spawned in parallel %if "%{?_lto_cflags}" != "" -%global _lto_cflags %{_lto_cflags} -ffat-lto-objects +%global _lto_cflags -flto=1 -ffat-lto-objects %endif # disable lto for ppc64le, boo#1181733 @@ -310,6 +316,9 @@ %endif # Use DYNAMIC_ARCH everywhere - not sure about PPC? +# Use DYNAMIC_ARCH to build for multiple targets, use TARGET to specify +# the CPU model assumed for the common code. It should be set to the +# oldest CPU model one expects to encounter. %global openblas_target DYNAMIC_ARCH=1 # We specify TARGET= to avoid compile-time CPU-detection (boo#1100677) %ifarch %ix86 x86_64 @@ -337,17 +346,27 @@ # ../kernel/power/sasum_microk_power8.c:41:3: error: '__vector' undeclared (first use in this function); did you mean '__cpow'? # TODO why is it required ? (and not for ppc64le) %ifarch ppc64 -%define addopt -mvsx +%global addopt -mvsx %endif +%global addopt %{?addopt} -fno-strict-aliasing + # Make serial, threaded and OpenMP versions -make %{?_smp_mflags} %{?openblas_target} %{?build_flags} \ - %{?openblas_opt} COMMON_OPT="%{optflags} %{?addopt}" \ + +# Calculate process limits +%limit_build -m 1500 +[[ -n $_threads ]] && jobs=$_threads +[[ -z $jobs ]] && jobs=1 +# NEVER use %%_smp_mflags with top level make: +# set MAKE_NB_JOBS instead and let the build do the work! +make MAKE_NB_JOBS=$jobs %{?openblas_target} %{?build_flags} \ + %{?openblas_opt} \ + COMMON_OPT="%{optflags} %{?addopt}" \ NUM_THREADS=%{num_threads} V=1 \ OPENBLAS_LIBRARY_DIR=%{p_libdir} \ - OPENBLAS_INCLUDE_DIR=%{hpc_includedir} \ + OPENBLAS_INCLUDE_DIR=%{p_includedir} \ OPENBLAS_CMAKE_DIR=%{p_cmakedir} \ PREFIX=%{p_prefix} \ - %{!?with_hpc:LIBNAMESUFFIX=%flavor FC=gfortran CC=gcc} + %{!?with_hpc:LIBNAMESUFFIX=%flavor FC=gfortran CC=gcc%{?cc_v:-%{cc_v}} %{?cc_v:CEXTRALIB=""}} %install %if %{with hpc} @@ -373,45 +392,39 @@ %if 0%{!?build_devel:1} # We need the includes only once rm -rf %{buildroot}%{p_includedir}/ -rm -rf %{buildroot}%{p_libdir}/cmake/ -%else +%endif + # Fix cmake config file sed -i 's|%{buildroot}||g' %{buildroot}%{p_cmakedir}/*.cmake -sed -i 's|_serial||g' %{buildroot}%{p_cmakedir}/*.cmake -%endif +sed -i 's|_%{flavor}||g' %{buildroot}%{p_cmakedir}/*.cmake # Put libraries in correct location rm -rf %{buildroot}%{p_libdir}/lib%{name}* # Install the serial library -install -D -p -m 755 lib%{name}.so %{buildroot}%{p_libdir}/lib%{name}.so.0 -install -D -p -m 644 lib%{name}.a %{buildroot}%{p_libdir}/lib%{name}.a +install -D -p -m 755 lib%{name}.so %{buildroot}%{p_libdir}/lib%{pname}.so.0 +install -D -p -m 644 lib%{name}.a %{buildroot}%{p_libdir}/lib%{pname}.a # Fix source permissions (also applies to LAPACK) find -name \*.f -exec chmod 644 {} + -# Remove pkgconfig file, it can't be configured for different library suffixes we use and, as such, is useless -rm -fr %{buildroot}%{p_libdir}/pkgconfig/ - # Dummy target for update-alternatives install -d %{buildroot}/%{_sysconfdir}/alternatives -ln -s lib%{libname}.so.0 %{buildroot}/%{p_libdir}/lib%{pname}.so.0 -ln -s lib%{pname}.so.0 %{buildroot}/%{p_libdir}/libblas.so.3 -ln -s lib%{pname}.so.0 %{buildroot}/%{p_libdir}/libcblas.so.3 -ln -s lib%{pname}.so.0 %{buildroot}/%{p_libdir}/liblapack.so.3 -%if 0%{?suse_version} <= 1500 -ln -s lib%{pname}.so.0 %{buildroot}/%{_sysconfdir}/alternatives/lib%{pname}.so.0 -ln -s lib%{pname}.so.0 %{buildroot}/%{_sysconfdir}/alternatives/libblas.so.3 -ln -s lib%{pname}.so.0 %{buildroot}/%{_sysconfdir}/alternatives/libcblas.so.3 -ln -s lib%{pname}.so.0 %{buildroot}/%{_sysconfdir}/alternatives/liblapack.so.3 -%endif - -# Fix symlinks -pushd %{buildroot}%{p_libdir} +ln -sf %{_sysconfdir}/alternatives/libblas.so.3 %{buildroot}/%{_libdir}/libblas.so.3 +ln -sf %{_sysconfdir}/alternatives/libcblas.so.3 %{buildroot}/%{_libdir}/libcblas.so.3 +ln -sf %{_sysconfdir}/alternatives/liblapack.so.3 %{buildroot}/%{_libdir}/liblapack.so.3 +ln -sf %{_sysconfdir}/alternatives/liblapacke.so.3 %{buildroot}/%{_libdir}/liblapacke.so.3 +ln -sf %{_sysconfdir}/alternatives/openblas-default %{buildroot}/%{_libdir}/openblas-default +ln -s lib%{pname}.so.%{so_v} %{buildroot}%{p_libdir}/lib%{pname}.so +ln -s %{_libdir}/openblas-default %{buildroot}%{_sysconfdir}/alternatives/openblas-default +ln -s %{_sysconfdir}/alternatives/openblas-default/lib%{pname}.so.%{so_v} %{buildroot}%{_libdir}/lib%{pname}.so.%{so_v} %if 0%{?build_devel} -ln -sf lib%{pname}.so.0 lib%{pname}.so +ln -s lib%{pname}.so.%{so_v} %{buildroot}%{_libdir}/lib%{pname}.so +install -d %{buildroot}%{_libdir}/pkgconfig/ +ln -s %{_sysconfdir}/alternatives/openblas-default/pkgconfig/openblas.pc %{buildroot}%{_libdir}/pkgconfig/ +install -d %{buildroot}/%{_libdir}/cmake +ln -s %{_sysconfdir}/alternatives/openblas-default/cmake/openblas %{buildroot}/%{_libdir}/cmake/ %endif -ln -sf lib%{name}.so.0 lib%{name}.so %else # with hpc @@ -462,30 +475,34 @@ %post -n lib%{name}%{so_v} %{_sbindir}/update-alternatives --install \ - %{p_libdir}/libblas.so.3 libblas.so.3 %{p_libdir}/lib%{name}.so.%{so_v} 20 -%{_sbindir}/update-alternatives --install \ - %{p_libdir}/libcblas.so.3 libcblas.so.3 %{p_libdir}/lib%{name}.so.%{so_v} 20 -%{_sbindir}/update-alternatives --install \ - %{p_libdir}/liblapack.so.3 liblapack.so.3 %{p_libdir}/lib%{name}.so.%{so_v} 20 -%{_sbindir}/update-alternatives --install \ - %{p_libdir}/lib%{pname}.so.%{so_v} lib%{name}.so.%{so_v} %{p_libdir}/lib%{name}.so.%{so_v} %openblas_so_prio + %{_libdir}/openblas-default openblas-default %{p_libdir} %openblas_so_prio +for lib in libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3; do + %{_sbindir}/update-alternatives --install \ + %{_libdir}/${lib} ${lib} %{_libdir}/lib%{pname}.so.%{so_v} 20 +done /sbin/ldconfig -%preun -n lib%{name}%{so_v} -if [ "$1" = 0 ] ; then - %{_sbindir}/update-alternatives --remove libblas.so.3 %{p_libdir}/lib%{name}.so.%{so_v} - %{_sbindir}/update-alternatives --remove libcblas.so.3 %{p_libdir}/lib%{name}.so.%{so_v} - %{_sbindir}/update-alternatives --remove liblapack.so.3 %{p_libdir}/lib%{name}.so.%{so_v} - %{_sbindir}/update-alternatives --remove lib%{name}.so.0 %{p_libdir}/lib%{name}.so.%{so_v} +%postun -n lib%{name}%{so_v} +if [ ! -f %{p_libdir}/lib%{pname}.so.%{so_v} ]; then + for lib in libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3; do + %{_sbindir}/update-alternatives --remove ${lib} %{_libdir}/lib%{pname}.so.%{so_v} + done fi - -%postun -n lib%{name}%{so_v} -p /sbin/ldconfig +if [ ! -d %{p_libdir} ]; then + %{_sbindir}/update-alternatives --remove openblas-default %{p_libdir} +fi +/sbin/ldconfig %posttrans -n lib%{name}%{so_v} if [ "$1" = 0 ] ; then - if ! [ -f %{p_libdir}/lib%{name}.so.%{so_v} ] ; then - %{_sbindir}/update-alternatives --auto lib%{pname}.so.%{so_v} + if [ ! -d %{_libdir}/openblas-default ] ; then + %{_sbindir}/update-alternatives --auto openblas-default fi + for lib in libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3; do + if ! [ -f %{_libdir}/${lib} ] ; then + %{_sbindir}/update-alternatives --auto ${lib} + fi + done fi %else @@ -497,16 +514,20 @@ %files -n lib%{name}%{?so_v} %defattr(-,root,root,-) -%{p_libdir}/lib%{libname}.so.0 +%{p_libdir}/lib%{pname}.so.0 %if %{without hpc} -%ghost %{p_libdir}/lib%{pname}.so.%{so_v} -%ghost %{p_libdir}/libblas.so.3 -%ghost %{p_libdir}/libcblas.so.3 -%ghost %{p_libdir}/liblapack.so.3 -%ghost %{_sysconfdir}/alternatives/lib%{pname}.so.%{so_v} +%dir %{p_libdir} +%{_libdir}/openblas-default +%{_libdir}/lib%{pname}.so.%{so_v} +%ghost %{_libdir}/libblas.so.3 +%ghost %{_libdir}/libcblas.so.3 +%ghost %{_libdir}/liblapack.so.3 +%ghost %{_libdir}/liblapacke.so.3 +%ghost %{_sysconfdir}/alternatives/openblas-default %ghost %{_sysconfdir}/alternatives/libblas.so.3 %ghost %{_sysconfdir}/alternatives/libcblas.so.3 %ghost %{_sysconfdir}/alternatives/liblapack.so.3 +%ghost %{_sysconfdir}/alternatives/liblapacke.so.3 %else %hpc_dirs %{p_libdir}/libopenblas*r*.so @@ -514,33 +535,31 @@ %endif %files -n lib%{name}-devel -%defattr(-,root,root,-) -%{p_libdir}/lib%{libname}.so +%{p_libdir}/lib%{pname}.so +%{p_cmakedir}/ %if %{with hpc} %license LICENSE %doc Changelog.txt GotoBLAS* README.md README.HPC.SUSE %hpc_pkgconfig_file -%{p_cmakedir}/ %{p_includedir}/ +%else +%dir %{p_libdir}/cmake +%dir %{p_libdir}/pkgconfig +%{p_libdir}/pkgconfig %endif %files devel-static -%defattr(-,root,root,-) -#%%{p_libdir}/lib%{libname}.a %{p_libdir}/libopenblas*.a %if 0%{?build_devel} -%files -n %{pname}-devel -%defattr(-,root,root,-) +%files -n %{pname}-common-devel %license LICENSE %doc Changelog.txt GotoBLAS* README.md README.SUSE -%{p_libdir}/libopenblas.so -%dir %{p_libdir}/cmake -%{p_cmakedir}/ - -%files -n %{pname}-devel-headers -%defattr(-,root,root,-) +%{_libdir}/lib%{pname}.so %{p_includedir}/ +%{_libdir}/pkgconfig/openblas.pc +%dir %{_libdir}/cmake +%{_libdir}/cmake/openblas %endif %changelog ++++++ Define-sbgemm_r-to-fix-DYNAMIC_ARCH-builds.patch ++++++ From: Martin Kroeker <mar...@ruby.chemie.uni-freiburg.de> Date: Fri Feb 25 10:04:00 2022 +0100 Subject: Define sbgemm_r to fix DYNAMIC_ARCH builds Patch-mainline: Not yet Git-repo: https://github.com/xianyi/OpenBLAS Git-commit: d9894f45d30e82fd1491ae38477a1fcd79faeed1 References: Signed-off-by: Egbert Eich <e...@suse.de> --- kernel/setparam-ref.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/setparam-ref.c b/kernel/setparam-ref.c index fe796be6..a81b32dd 100644 --- a/kernel/setparam-ref.c +++ b/kernel/setparam-ref.c @@ -1824,6 +1824,13 @@ static void init_parameter(void) { fprintf(stderr, "L2 = %8d DGEMM_P .. %d\n", l2, TABLE_NAME.dgemm_p); #endif +#if BUILD_BFLOAT16==1 + TABLE_NAME.sbgemm_r = (((BUFFER_SIZE - + ((TABLE_NAME.sbgemm_p * TABLE_NAME.sbgemm_q * 4 + TABLE_NAME.offsetA + + TABLE_NAME.align) & ~TABLE_NAME.align) + ) / (TABLE_NAME.sbgemm_q * 4) - 15) & ~15); +#endif + #if BUILD_SINGLE==1 TABLE_NAME.sgemm_r = (((BUFFER_SIZE - ((TABLE_NAME.sgemm_p * TABLE_NAME.sgemm_q * 4 + TABLE_NAME.offsetA ++++++ Do-not-include-symbols-defined-in-driver-others-parameter.c-in-DYNAMIC_BUILD.patch ++++++ From: Egbert Eich <e...@suse.com> Date: Sun Mar 13 10:57:59 2022 +0100 Subject: Do not include symbols defined in driver/others/parameter.c in DYNAMIC_BUILD Patch-mainline: Not yet Git-repo: https://github.com/xianyi/OpenBLAS Git-commit: 53cd07b0201c94ea50a499867382dcf39d1b8766 References: driver/others/parameter.c does not get build during DYNAMIC_BUILD, thus, do not declare its symbols. This will make the build fail early and in an obvious way if functions are trying to use these symbols. Signed-off-by: Egbert Eich <e...@suse.com> Signed-off-by: Egbert Eich <e...@suse.de> --- common_macro.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common_macro.h b/common_macro.h index 9826f180..d2fa822c 100644 --- a/common_macro.h +++ b/common_macro.h @@ -2610,8 +2610,9 @@ #endif #ifndef ASSEMBLER -#if defined(ARCH_X86) || defined(ARCH_X86_64) || defined(ARCH_IA64) || defined(ARCH_MIPS64) || defined(ARCH_ARM64)\ -|| defined(ARCH_LOONGARCH64) || defined(ARCH_E2K) +#if !defined(DYNAMIC_ARCH) \ + && (defined(ARCH_X86) || defined(ARCH_X86_64) || defined(ARCH_IA64) || defined(ARCH_MIPS64) || defined(ARCH_ARM64) \ + || defined(ARCH_LOONGARCH64) || defined(ARCH_E2K)) extern BLASLONG gemm_offset_a; extern BLASLONG gemm_offset_b; extern BLASLONG sbgemm_p; ++++++ Fix-checks-for-AVX512-and-atomics.patch ++++++ From: Martin Kroeker <mar...@ruby.chemie.uni-freiburg.de> Date: Wed Mar 23 15:48:58 2022 +0100 Subject: Fix checks for AVX512 and atomics Patch-mainline: Not yet Git-repo: https://github.com/xianyi/OpenBLAS Git-commit: c87a4dbf35c809ebe6bc88c7d8dce8f2e7b135ea References: Signed-off-by: Egbert Eich <e...@suse.de> --- c_check | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c_check b/c_check index 999f5a7a..e10ddfeb 100644 --- a/c_check +++ b/c_check @@ -254,7 +254,7 @@ if (($architecture eq "x86") || ($architecture eq "x86_64")) { # $tmpf = new File::Temp( UNLINK => 1 ); ($fh,$tmpf) = tempfile( SUFFIX => '.c' , UNLINK => 1 ); $code = '"vbroadcastss -4 * 4(%rsi), %zmm2"'; - print $tmpf "#include <immintrin.h>\n\nint main(void){ __asm__ volatile($code); }\n"; + print $fh "#include <immintrin.h>\n\nint main(void){ __asm__ volatile($code); }\n"; $args = " -march=skylake-avx512 -c -o $tmpf.o $tmpf"; if ($compiler eq "PGI") { $args = " -tp skylake -c -o $tmpf.o $tmpf"; @@ -278,7 +278,7 @@ if ($data =~ /HAVE_C11/) { $c11_atomics = 0; } else { ($fh,$tmpf) = tempfile( SUFFIX => '.c' , UNLINK => 1 ); - print $tmpf "#include <stdatomic.h>\nint main(void){}\n"; + print $fh "#include <stdatomic.h>\nint main(void){}\n"; $args = " -c -o $tmpf.o $tmpf"; my @cmd = ("$compiler_name $flags $args >/dev/null 2>/dev/null"); system(@cmd) == 0; ++++++ OpenBLAS-0.3.17.tar.gz -> OpenBLAS-0.3.20.tar.gz ++++++ /work/SRC/openSUSE:Factory/openblas/OpenBLAS-0.3.17.tar.gz /work/SRC/openSUSE:Factory/.openblas.new.1900/OpenBLAS-0.3.20.tar.gz differ: char 12, line 1 ++++++ Remove-extraneous-and-wrong-definition-of-sbgemm_r-on-x86_64.patch ++++++ From: Martin Kroeker <mar...@ruby.chemie.uni-freiburg.de> Date: Wed Mar 23 20:05:32 2022 +0100 Subject: Remove extraneous (and wrong) definition of sbgemm_r on x86_64 Patch-mainline: Not yet Git-repo: https://github.com/xianyi/OpenBLAS Git-commit: 40302558ed3d3c3f100e96dd042a5996c3d16bbd References: Signed-off-by: Egbert Eich <e...@suse.de> --- kernel/setparam-ref.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/setparam-ref.c b/kernel/setparam-ref.c index a81b32dd..9f5d34d9 100644 --- a/kernel/setparam-ref.c +++ b/kernel/setparam-ref.c @@ -1239,7 +1239,6 @@ static void init_parameter(void) { #ifdef BUILD_BFLOAT16 TABLE_NAME.sbgemm_p = SBGEMM_DEFAULT_P; - TABLE_NAME.sbgemm_r = SBGEMM_DEFAULT_R; TABLE_NAME.sbgemm_q = SBGEMM_DEFAULT_Q; #endif #if (BUILD_SINGLE==1) || (BUILD_COMPLEX==1) ++++++ Revert-AVX512-capability-check-from-PR-1980-moved-to-build.patch ++++++ From: Martin Kroeker <mar...@ruby.chemie.uni-freiburg.de> Date: Wed Mar 23 15:22:13 2022 +0100 Subject: Revert AVX512 capability check from PR #1980 (moved to build) Patch-mainline: Not yet Git-repo: https://github.com/xianyi/OpenBLAS Git-commit: 93a81856ae6a34c4329054744237d46ed347ccec References: Signed-off-by: Egbert Eich <e...@suse.de> --- getarch.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/getarch.c b/getarch.c index 00e544bc..e49eac1a 100644 --- a/getarch.c +++ b/getarch.c @@ -94,14 +94,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <sys/sysinfo.h> #endif -#if defined(__x86_64__) || defined(_M_X64) -#if (( defined(__GNUC__) && __GNUC__ > 6 && defined(__AVX2__)) || (defined(__clang__) && __clang_major__ >= 6)) -#else -#ifndef NO_AVX512 -#define NO_AVX512 -#endif -#endif -#endif /* #define FORCE_P2 */ /* #define FORCE_KATMAI */ /* #define FORCE_COPPERMINE */ ++++++ Use-CC-and-full-command-line-instead-of-hard-coding-gcc-for-AVX512-checking.patch ++++++ From: Egbert Eich <e...@suse.com> Date: Mon Mar 28 08:14:52 2022 +0200 Subject: Use CC and full command line instead of hard-coding gcc for AVX512 checking Patch-mainline: Not yet Git-repo: https://github.com/xianyi/OpenBLAS Git-commit: 0b69fa6ddf7fc6d92bc42ef085f39337a4489f3c References: Hard-coding gcc may not provide incorrect results when a different compiler for the target build is used. To remain in sync with the main call to c_check, pass the full command line. Signed-off-by: Egbert Eich <e...@suse.com> Signed-off-by: Egbert Eich <e...@suse.de> --- Makefile.prebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.prebuild b/Makefile.prebuild index 4dad74d6..5e8874d4 100644 --- a/Makefile.prebuild +++ b/Makefile.prebuild @@ -71,7 +71,7 @@ endif getarch : getarch.c cpuid.S dummy $(CPUIDEMU) - avx512=$$(perl c_check - - gcc | grep NO_AVX512); \ + avx512=$$(perl c_check - - $(CC) $(TARGET_FLAGS) $(CFLAGS) | grep NO_AVX512); \ $(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) $${avx512:+-D$${avx512}} -o $(@F) getarch.c cpuid.S $(CPUIDEMU) getarch_2nd : getarch_2nd.c config.h dummy ++++++ Utilize-compiler-AVX512-capability-info-from-c_check-when-building-getarch.patch ++++++ From: Martin Kroeker <mar...@ruby.chemie.uni-freiburg.de> Date: Wed Mar 23 15:19:55 2022 +0100 Subject: Utilize compiler AVX512 capability info from c_check when building getarch Patch-mainline: Not yet Git-repo: https://github.com/xianyi/OpenBLAS Git-commit: 9fbeb88fb87dcc418c9ef01c5f24c85029dfbbef References: Signed-off-by: Egbert Eich <e...@suse.de> --- Makefile.prebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.prebuild b/Makefile.prebuild index 399db956..4dad74d6 100644 --- a/Makefile.prebuild +++ b/Makefile.prebuild @@ -71,7 +71,8 @@ endif getarch : getarch.c cpuid.S dummy $(CPUIDEMU) - $(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) -o $(@F) getarch.c cpuid.S $(CPUIDEMU) + avx512=$$(perl c_check - - gcc | grep NO_AVX512); \ + $(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) $${avx512:+-D$${avx512}} -o $(@F) getarch.c cpuid.S $(CPUIDEMU) getarch_2nd : getarch_2nd.c config.h dummy ifndef TARGET_CORE ++++++ _multibuild ++++++ --- /var/tmp/diff_new_pack.1GZQgb/_old 2022-04-05 19:55:02.330510925 +0200 +++ /var/tmp/diff_new_pack.1GZQgb/_new 2022-04-05 19:55:02.334510881 +0200 @@ -1,7 +1,7 @@ <multibuild> <package>serial</package> - <package>openmp</package> <package>pthreads</package> + <package>openmp</package> <package>gnu-hpc</package> <package>gnu-hpc-pthreads</package> </multibuild>