The package rpms/qrmumps.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/qrmumps.git/commit/?id=2df22761c5....
Change:
+%ifarch %{openblas_arch}
Thanks.
Full change:
============
commit 2df22761c5e861f8866ad5d87a19466cd95de1f4
Author: sagitter <sagitter(a)fedoraproject.org>
Date: Wed Nov 8 12:47:41 2017 +0100
Rebuild against openblas
diff --git a/qrmumps-Makefile.inc b/qrmumps-Makefile.inc
index 9eeb2ff..1409790 100644
--- a/qrmumps-Makefile.inc
+++ b/qrmumps-Makefile.inc
@@ -63,8 +63,8 @@ RANLIB = ranlib
# LSTARPU = -L/path/to/starpu -lstarpu
# ISTARPU = -I/path/to/starpu/include
-LBLAS = -lblas
-LLAPACK = -llapack
+LBLAS = $(LIBBLAS)
+LLAPACK = $(LIBLAPACK)
# your COLAMD library
LCOLAMD = -lcolamd
diff --git a/qrmumps.spec b/qrmumps.spec
index 89d3daf..d8690cf 100644
--- a/qrmumps.spec
+++ b/qrmumps.spec
@@ -2,9 +2,21 @@
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
%endif
+# OpenBLAS available on these architectures
+# This is a custom macro
+# Tests are failed if compiled against OpenBlas on s390x
+%if 0%{?fedora} && 0%{?fedora} > 26
+%{!?openblas_arch:%global openblas_arch x86_64 %{ix86} armv7hl %{power64} aarch64}
+%else
+%{!?openblas_arch:%global openblas_arch x86_64 %{ix86} armv7hl %{power64} aarch64}
+%endif
+%if 0%{?rhel}
+%{!?openblas_arch:%global openblas_arch x86_64 %{ix86} armv7hl %{power64} aarch64}
+%endif
+
Name: qrmumps
Version: 2.0
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: A multithreaded multifrontal QR solver
License: LGPLv3+
Group: Development/Libraries
@@ -22,10 +34,15 @@ Source3:
http://www.cise.ufl.edu/research/sparse/MM/Meszaros/pltexpa.tar.gz
Source4:
http://www.cise.ufl.edu/research/sparse/MM/Yoshiyasu/image_interp.tar.gz
BuildRequires: gcc-gfortran
+%ifarch %{openblas_arch}
+BuildRequires: openblas-devel
+%else
BuildRequires: blas-devel
BuildRequires: lapack-devel
+%endif
BuildRequires: metis-devel >= 5.1.0-12
BuildRequires: scotch-devel
+BuildRequires: suitesparse-devel
BuildRequires: perl-devel
%if 0%{?fedora}
BuildRequires: perl-generators
@@ -71,19 +88,29 @@ PDF documentation files of %{name}.
cp -p %{SOURCE1} makeincs/Make.inc.fedora
%build
+
+%ifarch %{openblas_arch}
+export LIBBLAS=-lopenblas
+export INCBLAS=-I%{_includedir}/openblas
+%else
+export LIBBLAS=-lblas
+export LIBLAPACK=-llapack
+export INCBLAS=-I%{_includedir}
+%endif
+
# Parallel Make is not supported
make BUILD=build PLAT=fedora ARITH='d s c z' \
topdir=$PWD \
CC=gcc \
FC=gfortran \
- FCFLAGS="%{optflags} -I%{_fmoddir} -fopenmp -fPIC -Wl,-z,now" \
+ FCFLAGS="%{optflags} -Wno-unused-variable -I%{_fmoddir} -fopenmp -fPIC
-Wl,-z,now" \
CFLAGS="%{optflags} -fopenmp -fPIC -Wl,-z,now" \
- CDEFS=" -Dhave_metis -Dhave_scotch" \
- FDEFS=" -Dhave_metis -Dhave_scotch" \
- LCOLAMD="" \
- ICOLAMD="" \
- LBLAS=-lblas \
- LLAPACK=-llapack \
+ CDEFS=" -Dhave_metis -Dhave_scotch -Dhave_colamd" \
+ FDEFS=" -Dhave_metis -Dhave_scotch -Dhave_colamd" \
+ LCOLAMD=-lcolamd \
+ ICOLAMD=" -I%{_includedir}/suitesparse" \
+ LBLAS=$LIBBLAS \
+ LLAPACK=$LIBLAPACK \
LMETIS=" -lmetis" \
IMETIS=" -I%{_includedir}" \
LSCOTCH=" -lscotch -lscotcherr" \
@@ -91,15 +118,20 @@ make BUILD=build PLAT=fedora ARITH='d s c z' \
# Make shared libraries
pushd build/lib
-gfortran -shared %{__global_ldflags} -fPIC -Wl,-z,now -Wl,--whole-archive libqrm_common.a
-Wl,-no-whole-archive -Wl,--as-needed -L%{_libdir} -lmetis -lgfortran -lm -lrt
-Wl,-soname,libqrm_common.so.%{version} -o libqrm_common.so.%{version}
-gfortran -shared %{__global_ldflags} -fPIC -Wl,-z,now -Wl,--whole-archive libdqrm.a
libqrm_common.a -Wl,-no-whole-archive -L./ -lqrm_common -Wl,--as-needed -L%{_libdir}
-lblas -llapack -lscotch -lscotcherr -lmetis -lgfortran -lm -lrt
-Wl,-soname,libdqrm.so.%{version} -o libdqrm.so.%{version}
+export LCOLAMD=-lcolamd
+export LMETIS=-lmetis
+export LSCOTCH="-lscotch -lscotcherr"
-gfortran -shared %{__global_ldflags} -fPIC -Wl,-z,now -Wl,--whole-archive libcqrm.a
libqrm_common.a -Wl,-no-whole-archive -L./ -lqrm_common -Wl,--as-needed -L%{_libdir}
-lblas -llapack -lscotch -lscotcherr -lmetis -lgfortran -lm -lrt
-Wl,-soname,libcqrm.so.%{version} -o libcqrm.so.%{version}
+gfortran -shared %{__global_ldflags} -fPIC -Wl,-z,now -Wl,--whole-archive libqrm_common.a
-Wl,-no-whole-archive -L%{_libdir} $LMETIS $LCOLAMD -lgfortran -lm
-Wl,-soname,libqrm_common.so.%{version} -o libqrm_common.so.%{version}
-gfortran -shared %{__global_ldflags} -fPIC -Wl,-z,now -Wl,--whole-archive libzqrm.a
libqrm_common.a -Wl,-no-whole-archive -L./ -lqrm_common -Wl,--as-needed -L%{_libdir}
-lblas -llapack -lscotch -lscotcherr -lmetis -lgfortran -lm -lrt
-Wl,-soname,libzqrm.so.%{version} -o libzqrm.so.%{version}
+gfortran -shared %{__global_ldflags} -fPIC -Wl,-z,now -Wl,--whole-archive libdqrm.a
libqrm_common.a -Wl,-no-whole-archive -L./ -lqrm_common -L%{_libdir} $LIBBLAS $LIBLAPACK
$LSCOTCH $LMETIS $LCOLAMD -lgfortran -lm -Wl,-soname,libdqrm.so.%{version} -o
libdqrm.so.%{version}
-gfortran -shared %{__global_ldflags} -fPIC -Wl,-z,now -Wl,--whole-archive libsqrm.a
libqrm_common.a -Wl,-no-whole-archive -L./ -lqrm_common -Wl,--as-needed -L%{_libdir}
-lblas -llapack -lscotch -lscotcherr -lmetis -lgfortran -lm -lrt
-Wl,-soname,libsqrm.so.%{version} -o libsqrm.so.%{version}
+gfortran -shared %{__global_ldflags} -fPIC -Wl,-z,now -Wl,--whole-archive libcqrm.a
libqrm_common.a -Wl,-no-whole-archive -L./ -lqrm_common -L%{_libdir} $LIBBLAS $LIBLAPACK
$LSCOTCH $LMETIS $LCOLAMD -lgfortran -lm -Wl,-soname,libcqrm.so.%{version} -o
libcqrm.so.%{version}
+
+gfortran -shared %{__global_ldflags} -fPIC -Wl,-z,now -Wl,--whole-archive libzqrm.a
libqrm_common.a -Wl,-no-whole-archive -L./ -lqrm_common -L%{_libdir} $LIBBLAS $LIBLAPACK
$LSCOTCH $LMETIS $LCOLAMD -lgfortran -lm -Wl,-soname,libzqrm.so.%{version} -o
libzqrm.so.%{version}
+
+gfortran -shared %{__global_ldflags} -fPIC -Wl,-z,now -Wl,--whole-archive libsqrm.a
libqrm_common.a -Wl,-no-whole-archive -L./ -lqrm_common -L%{_libdir} $LIBBLAS $LIBLAPACK
$LSCOTCH $LMETIS $LCOLAMD -lgfortran -lm -Wl,-soname,libsqrm.so.%{version} -o
libsqrm.so.%{version}
popd
%post -p /sbin/ldconfig
@@ -107,18 +139,28 @@ popd
%check
pushd build/testing
-make \
+
+%ifarch %{openblas_arch}
+export LIBBLAS=-lopenblas
+export INCBLAS=-I%{_includedir}/openblas
+%else
+export LIBBLAS=-lblas
+export LIBLAPACK=-llapack
+export INCBLAS=-I%{_includedir}
+%endif
+
+make BUILD=./ PLAT=fedora ARITH='d s c z' \
topdir=../../ \
CC=gcc \
FC=gfortran \
- FCFLAGS="%{optflags} -I%{_fmoddir} -fopenmp -fPIC -Wl,-z,now" \
- CFLAGS="%{optflags} -fopenmp -fPIC -Wl,-z,now" \
- CDEFS=" -Dhave_metis -Dhave_scotch" \
- FDEFS=" -Dhave_metis -Dhave_scotch" \
- LCOLAMD="" \
- ICOLAMD="" \
- LBLAS=-lblas \
- LLAPACK=-llapack \
+ FCFLAGS="-O0 -g -Wno-unused-variable -I%{_fmoddir} -fopenmp -fPIC -Wl,-z,now"
\
+ CFLAGS="-O0 -g -fopenmp -fPIC -Wl,-z,now" \
+ CDEFS=" -Dhave_metis -Dhave_scotch -Dhave_colamd" \
+ FDEFS=" -Dhave_metis -Dhave_scotch -Dhave_colamd" \
+ LCOLAMD=-lcolamd \
+ ICOLAMD=" -I%{_includedir}/suitesparse" \
+ LBLAS=$LIBBLAS \
+ LLAPACK=$LIBLAPACK \
LMETIS=" -lmetis" \
IMETIS=" -I%{_includedir}" \
LSCOTCH=" -lscotch -lscotcherr" \
@@ -132,6 +174,9 @@ tar -zxf %{SOURCE4}; echo image_interp/image_interp.mtx >>
matfile.txt
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:%{_libdir}
export QRM_NUM_THREADS=2
./dqrm_testing
+./sqrm_testing
+./cqrm_testing
+./zqrm_testing
%install
mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name}
@@ -176,6 +221,11 @@ install -pm 644 build/include/*.mod
$RPM_BUILD_ROOT%{_fmoddir}/%{name}
%doc doc/pdf/*.pdf
%changelog
+* Sat Nov 04 2017 Antonio Trande <sagitterATfedoraproject.org> - 2.0-9
+- Rebuild against openblas
+- Set a custom macro for openblas arches
+- Rebuild against COLAMD except s390x arch
+
* Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.0-8
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild