#2 Build against FlexiBLAS
Merged 3 years ago by spot. Opened 3 years ago by iucar.
rpms/ iucar/scalapack master  into  master

file modified
+20 -17
@@ -24,23 +24,25 @@ 

    %bcond_without mpich

  %endif

  

- %{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64}

- %ifarch %{openblas_arches}

- # matches openblas ExclusiveArch

- %bcond_without openblas

+ %bcond_without optimized_blas

+ 

+ %if 0%{?fedora} >= 33 || 0%{?rhel} >= 9

+ %global blaslib flexiblas

+ %else

+ %global blaslib openblas

  %endif

  

  Summary: A subset of LAPACK routines redesigned for heterogeneous computing

  Name: scalapack

  Version: 2.1.0

- Release: 6%{?dist}

+ Release: 7%{?dist}

  # This is freely distributable without any restrictions.

  License: Public Domain

  URL: http://www.netlib.org/scalapack/

  Source0: https://github.com/Reference-ScaLAPACK/scalapack/archive/v%{version}.tar.gz

  BuildRequires: cmake

- %if %{with openblas}

- BuildRequires: openblas-devel

+ %if %{with optimized_blas}

+ BuildRequires: %{blaslib}-devel

  %else

  BuildRequires: lapack-devel

  BuildRequires: blas-devel
@@ -323,20 +325,18 @@ 

  done

  

  %build

+ %if %{with optimized_blas}

+ %global blasflags -DLAPACK_LIBRARIES=-l%{blaslib} -DBLAS_LIBRARIES=-l%{blaslib}

+ %else

+ %global blasflags -DLAPACK_LIBRARIES=-llapack -DBLAS_LIBRARIES=-lblas

+ %endif

+ 

  %global build_fflags %(echo %build_fflags -fallow-argument-mismatch| sed 's|-Werror=format-security||g')

  %global dobuild() \

  cd %{name}-%{version}-$MPI_COMPILER_NAME ; \

- %if %{with openblas} \

- %cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON -DMPI_BASE_DIR=%{_libdir}/$MPI_COMPILER_NAME -DLAPACK_LIBRARIES=-lopenblas -DBLAS_LIBRARIES=-lopenblas ; \

- %else \

- %cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON -DMPI_BASE_DIR=%{_libdir}/$MPI_COMPILER_NAME -DLAPACK_LIBRARIES=-llapack -DBLAS_LIBRARIES=-lblas ; \

- %endif \

+ %cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON -DMPI_BASE_DIR=%{_libdir}/$MPI_COMPILER_NAME %{blasflags} ; \

  %cmake_build ;\

- %if %{with openblas} \

- %cmake -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DMPI_BASE_DIR=%{_libdir}/$MPI_COMPILER_NAME -DLAPACK_LIBRARIES=-lopenblas -DBLAS_LIBRARIES=-lopenblas ; \

- %else \

- %cmake -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DMPI_BASE_DIR=%{_libdir}/$MPI_COMPILER_NAME -DLAPACK_LIBRARIES=-llapack -DBLAS_LIBRARIES=-lblas ; \

- %endif \

+ %cmake -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DMPI_BASE_DIR=%{_libdir}/$MPI_COMPILER_NAME %{blasflags} ; \

  %cmake_build ;\

  cd ..

  
@@ -438,6 +438,9 @@ 

  %endif

  

  %changelog

+ * Fri Aug 28 2020 Iñaki Úcar <iucar@fedoraproject.org> - 2.1.0-7

+ - https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager

+ 

  * Thu Aug  6 2020 Tom Callaway <spot@fedoraproject.org> - 2.1.0-6

  - use new cmake macros

  

This PR is part of a F33 System-Wide Change Proposal that aims to set FlexiBLAS
as the default BLAS/LAPACK manager for all consumers of these APIs. For further
information, see https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager

You'll find a successful scratch build for this PR in
https://koji.fedoraproject.org/koji/taskinfo?taskID=50339345

I kindly ask you to merge this PR and build the package in rawhide and F33. Please,
report any issues you may found in https://bugzilla.redhat.com/show_bug.cgi?id=1860504

Note: upon merge in F33, this needs to be built in the f33-build-side-28767 side tag, where FlexiBLAS 3.0.3 sits for an update.

@decathorpe ready!

Pull-Request has been merged by spot

3 years ago

Builds are done, lemme know if you need anything else.