Update to 0.2.9, added 64-bit interface support.
This commit is contained in:
parent
b6733edd34
commit
058c89d58c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/v0.2.5.tar.gz
|
||||
/v0.2.7.tar.gz
|
||||
/v0.2.8.tar.gz
|
||||
/v0.2.9.tar.gz
|
||||
|
140
openblas-0.2.9-lapacke.patch
Normal file
140
openblas-0.2.9-lapacke.patch
Normal file
@ -0,0 +1,140 @@
|
||||
diff -up OpenBLAS-0.2.9/exports/gensymbol.lapacke OpenBLAS-0.2.9/exports/gensymbol
|
||||
--- OpenBLAS-0.2.9/exports/gensymbol.lapacke 2014-06-10 16:55:47.000000000 +0300
|
||||
+++ OpenBLAS-0.2.9/exports/gensymbol 2014-06-18 10:42:45.852966229 +0300
|
||||
@@ -170,7 +170,7 @@
|
||||
sggglm, sgghrd, sgglse, sggqrf,
|
||||
sggrqf, sggsvd, sggsvp, sgtcon, sgtrfs, sgtsv,
|
||||
sgtsvx, sgttrf, sgttrs, sgtts2, shgeqz,
|
||||
- shsein, shseqr, slabrd, slacon, slacn2,
|
||||
+ shsein, shseqr, slabrd, slacon,
|
||||
slaein, slaexc, slag2, slags2, slagtm, slagv2, slahqr,
|
||||
slahrd, slahr2, slaic1, slaln2, slals0, slalsa, slalsd,
|
||||
slangb, slange, slangt, slanhs, slansb, slansp,
|
||||
@@ -251,7 +251,7 @@
|
||||
chpevx, chpgst, chpgv, chpgvd, chpgvx, chprfs, chpsv,
|
||||
chpsvx,
|
||||
chptrd, chptrf, chptri, chptrs, chsein, chseqr, clabrd,
|
||||
- clacgv, clacon, clacn2, clacp2, clacpy, clacrm, clacrt, cladiv,
|
||||
+ clacgv, clacon, clacpy, clacrm, clacrt, cladiv,
|
||||
claed0, claed7, claed8,
|
||||
claein, claesy, claev2, clags2, clagtm,
|
||||
clahef, clahqr,
|
||||
@@ -318,7 +318,7 @@
|
||||
dggglm, dgghrd, dgglse, dggqrf,
|
||||
dggrqf, dggsvd, dggsvp, dgtcon, dgtrfs, dgtsv,
|
||||
dgtsvx, dgttrf, dgttrs, dgtts2, dhgeqz,
|
||||
- dhsein, dhseqr, dlabrd, dlacon, dlacn2,
|
||||
+ dhsein, dhseqr, dlabrd, dlacon,
|
||||
dlaein, dlaexc, dlag2, dlags2, dlagtm, dlagv2, dlahqr,
|
||||
dlahrd, dlahr2, dlaic1, dlaln2, dlals0, dlalsa, dlalsd,
|
||||
dlangb, dlange, dlangt, dlanhs, dlansb, dlansp,
|
||||
@@ -393,7 +393,7 @@
|
||||
zhpevx, zhpgst, zhpgv, zhpgvd, zhpgvx, zhprfs, zhpsv,
|
||||
zhpsvx,
|
||||
zhptrd, zhptrf, zhptri, zhptrs, zhsein, zhseqr, zlabrd,
|
||||
- zlacgv, zlacon, zlacn2, zlacp2, zlacpy, zlacrm, zlacrt, zladiv,
|
||||
+ zlacgv, zlacon, zlacpy, zlacrm, zlacrt, zladiv,
|
||||
zlaed0, zlaed7, zlaed8,
|
||||
zlaein, zlaesy, zlaev2, zlags2, zlagtm,
|
||||
zlahef, zlahqr,
|
||||
@@ -840,10 +840,6 @@
|
||||
LAPACKE_chseqr_work,
|
||||
LAPACKE_clacgv,
|
||||
LAPACKE_clacgv_work,
|
||||
- LAPACKE_clacn2,
|
||||
- LAPACKE_clacn2_work,
|
||||
- LAPACKE_clacp2,
|
||||
- LAPACKE_clacp2_work,
|
||||
LAPACKE_clacpy,
|
||||
LAPACKE_clacpy_work,
|
||||
LAPACKE_clag2z,
|
||||
@@ -979,8 +975,6 @@
|
||||
LAPACKE_csyrfs,
|
||||
LAPACKE_csyrfs_work,
|
||||
LAPACKE_csysv,
|
||||
- LAPACKE_csysv_rook,
|
||||
- LAPACKE_csysv_rook_work,
|
||||
LAPACKE_csysv_work,
|
||||
LAPACKE_csysvx,
|
||||
LAPACKE_csysvx_work,
|
||||
@@ -1254,8 +1248,6 @@
|
||||
LAPACKE_dhsein_work,
|
||||
LAPACKE_dhseqr,
|
||||
LAPACKE_dhseqr_work,
|
||||
- LAPACKE_dlacn2,
|
||||
- LAPACKE_dlacn2_work,
|
||||
LAPACKE_dlacpy,
|
||||
LAPACKE_dlacpy_work,
|
||||
LAPACKE_dlag2s,
|
||||
@@ -1505,8 +1497,6 @@
|
||||
LAPACKE_dsyrfs,
|
||||
LAPACKE_dsyrfs_work,
|
||||
LAPACKE_dsysv,
|
||||
- LAPACKE_dsysv_rook,
|
||||
- LAPACKE_dsysv_rook_work,
|
||||
LAPACKE_dsysv_work,
|
||||
LAPACKE_dsysvx,
|
||||
LAPACKE_dsysvx_work,
|
||||
@@ -1744,8 +1734,6 @@
|
||||
LAPACKE_shsein_work,
|
||||
LAPACKE_shseqr,
|
||||
LAPACKE_shseqr_work,
|
||||
- LAPACKE_slacn2,
|
||||
- LAPACKE_slacn2_work,
|
||||
LAPACKE_slacpy,
|
||||
LAPACKE_slacpy_work,
|
||||
LAPACKE_slag2d,
|
||||
@@ -1991,8 +1979,6 @@
|
||||
LAPACKE_ssyrfs,
|
||||
LAPACKE_ssyrfs_work,
|
||||
LAPACKE_ssysv,
|
||||
- LAPACKE_ssysv_rook,
|
||||
- LAPACKE_ssysv_rook_work,
|
||||
LAPACKE_ssysv_work,
|
||||
LAPACKE_ssysvx,
|
||||
LAPACKE_ssysvx_work,
|
||||
@@ -2316,10 +2302,6 @@
|
||||
LAPACKE_zhseqr_work,
|
||||
LAPACKE_zlacgv,
|
||||
LAPACKE_zlacgv_work,
|
||||
- LAPACKE_zlacn2,
|
||||
- LAPACKE_zlacn2_work,
|
||||
- LAPACKE_zlacp2,
|
||||
- LAPACKE_zlacp2_work,
|
||||
LAPACKE_zlacpy,
|
||||
LAPACKE_zlacpy_work,
|
||||
LAPACKE_zlag2c,
|
||||
@@ -2455,8 +2437,6 @@
|
||||
LAPACKE_zsyrfs,
|
||||
LAPACKE_zsyrfs_work,
|
||||
LAPACKE_zsysv,
|
||||
- LAPACKE_zsysv_rook,
|
||||
- LAPACKE_zsysv_rook_work,
|
||||
LAPACKE_zsysv_work,
|
||||
LAPACKE_zsysvx,
|
||||
LAPACKE_zsysvx_work,
|
||||
@@ -2700,20 +2680,20 @@
|
||||
#These function may need 2 underscores.
|
||||
@lapack_embeded_underscore_objs=(xerbla_array, chla_transtype, slasyf_rook,
|
||||
ssytf2_rook, ssytrf_rook, ssytrs_rook,
|
||||
- ssytri_rook, ssycon_rook, ssysv_rook,
|
||||
+ ssytri_rook, ssycon_rook,
|
||||
chetf2_rook, chetrf_rook, chetri_rook,
|
||||
chetrs_rook, checon_rook, chesv_rook,
|
||||
clahef_rook, clasyf_rook,
|
||||
csytf2_rook, csytrf_rook, csytrs_rook,
|
||||
- csytri_rook, csycon_rook, csysv_rook,
|
||||
+ csytri_rook, csycon_rook,
|
||||
dlasyf_rook,
|
||||
dsytf2_rook, dsytrf_rook, dsytrs_rook,
|
||||
- dsytri_rook, dsycon_rook, dsysv_rook,
|
||||
+ dsytri_rook, dsycon_rook,
|
||||
zhetf2_rook, zhetrf_rook, zhetri_rook,
|
||||
zhetrs_rook, zhecon_rook, zhesv_rook,
|
||||
zlahef_rook, zlasyf_rook,
|
||||
zsytf2_rook, zsytrf_rook, zsytrs_rook,
|
||||
- zsytri_rook, zsycon_rook, zsysv_rook,
|
||||
+ zsytri_rook, zsycon_rook,
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up serial/Makefile.system_lapack serial/Makefile
|
||||
--- serial/Makefile.system_lapack 2013-07-20 18:05:36.000000000 +0300
|
||||
+++ serial/Makefile 2013-07-23 12:28:02.961948050 +0300
|
||||
@@ -202,74 +202,8 @@ hpl_p :
|
||||
diff -up OpenBLAS-0.2.9/Makefile.system_lapack OpenBLAS-0.2.9/Makefile
|
||||
--- OpenBLAS-0.2.9/Makefile.system_lapack 2014-06-11 16:16:33.024212839 +0300
|
||||
+++ OpenBLAS-0.2.9/Makefile 2014-06-11 16:19:02.742528480 +0300
|
||||
@@ -205,51 +205,8 @@ hpl_p :
|
||||
fi; \
|
||||
done
|
||||
|
||||
@ -12,6 +12,7 @@ diff -up serial/Makefile.system_lapack serial/Makefile
|
||||
-netlib : lapack_prebuild
|
||||
-ifndef NOFORTRAN
|
||||
- @$(MAKE) -C $(NETLIB_LAPACK_DIR) lapacklib
|
||||
- @$(MAKE) -C $(NETLIB_LAPACK_DIR) tmglib
|
||||
-endif
|
||||
-ifndef NO_LAPACKE
|
||||
- @$(MAKE) -C $(NETLIB_LAPACK_DIR) lapackelib
|
||||
@ -24,10 +25,10 @@ diff -up serial/Makefile.system_lapack serial/Makefile
|
||||
-lapack_prebuild :
|
||||
-ifndef NOFORTRAN
|
||||
- -@echo "FORTRAN = $(FC)" > $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "OPTS = $(FFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "POPTS = $(FPFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "NOOPT = $(FFLAGS) -O0" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "PNOOPT = $(FPFLAGS) -O0" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "OPTS = $(LAPACK_FFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "POPTS = $(LAPACK_FPFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "NOOPT = $(LAPACK_FFLAGS) -O0" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "PNOOPT = $(LAPACK_FPFLAGS) -O0" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@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
|
||||
@ -35,52 +36,28 @@ diff -up serial/Makefile.system_lapack serial/Makefile
|
||||
- -@echo "ARCHFLAGS = -ru" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "RANLIB = $(RANLIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "LAPACKLIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "TMGLIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "BLASLIB = ../../../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "LAPACKELIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "LAPACKLIB_P = ../$(LIBNAME_P)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "SUFFIX = $(SUFFIX)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "PSUFFIX = $(PSUFFIX)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
- -@echo "CEXTRALIB = $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
-ifeq ($(F_COMPILER), GFORTRAN)
|
||||
- -@echo "TIMER = INT_ETIME" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
-else
|
||||
- -@echo "TIMER = NONE" >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
-endif
|
||||
- -@cat make.inc >> $(NETLIB_LAPACK_DIR)/make.inc
|
||||
-endif
|
||||
-
|
||||
-lapack-3.4.2 : lapack-3.4.2.tgz
|
||||
-ifndef NOFORTRAN
|
||||
-ifndef NO_LAPACK
|
||||
- @if test `$(MD5SUM) $< | $(AWK) '{print $$1}'` = 61bf1a8a4469d4bdb7604f5897179478; then \
|
||||
- echo $(TAR) zxf $< ;\
|
||||
- $(TAR) zxf $< && (cd $(NETLIB_LAPACK_DIR); $(PATCH) -p1 < ../patch.for_lapack-3.4.2) ;\
|
||||
- rm -f $(NETLIB_LAPACK_DIR)/lapacke/make.inc ;\
|
||||
- else \
|
||||
- rm -rf $(NETLIB_LAPACK_DIR) ;\
|
||||
- echo " Cannot download lapack-3.4.2.tgz or the MD5 check sum is wrong (Please use orignal)."; \
|
||||
- exit 1; \
|
||||
- fi
|
||||
-endif
|
||||
-endif
|
||||
-
|
||||
-LAPACK_URL=http://www.netlib.org/lapack/lapack-3.4.2.tgz
|
||||
-
|
||||
-lapack-3.4.2.tgz :
|
||||
-ifndef NOFORTRAN
|
||||
-#http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or
|
||||
-ifeq ($(OSNAME), $(filter $(OSNAME),Darwin NetBSD))
|
||||
- curl -O $(LAPACK_URL);
|
||||
-else
|
||||
-ifeq ($(OSNAME), FreeBSD)
|
||||
- fetch $(LAPACK_URL);
|
||||
-else
|
||||
- wget -O $@ $(LAPACK_URL);
|
||||
-endif
|
||||
-endif
|
||||
-endif
|
||||
+netlib :
|
||||
+ @$(MAKE) -C $(NETLIB_LAPACK_DIR)
|
||||
|
||||
large.tgz :
|
||||
ifndef NOFORTRAN
|
||||
diff -up serial/Makefile.system.system_lapack serial/Makefile.system
|
||||
--- serial/Makefile.system.system_lapack 2013-07-20 18:05:36.000000000 +0300
|
||||
+++ serial/Makefile.system 2013-07-23 12:29:00.084410995 +0300
|
||||
diff -up OpenBLAS-0.2.9/Makefile.system.system_lapack OpenBLAS-0.2.9/Makefile.system
|
||||
--- OpenBLAS-0.2.9/Makefile.system.system_lapack 2014-06-10 16:55:47.000000000 +0300
|
||||
+++ OpenBLAS-0.2.9/Makefile.system 2014-06-11 16:16:33.024212839 +0300
|
||||
@@ -9,7 +9,7 @@ ifndef TOPDIR
|
||||
TOPDIR = .
|
||||
endif
|
203
openblas.spec
203
openblas.spec
@ -1,15 +1,17 @@
|
||||
Name: openblas
|
||||
Version: 0.2.8
|
||||
Release: 2%{?dist}
|
||||
Version: 0.2.9
|
||||
Release: 1%{?dist}
|
||||
Summary: An optimized BLAS library based on GotoBLAS2
|
||||
Group: Development/Libraries
|
||||
License: BSD
|
||||
URL: https://github.com/xianyi/OpenBLAS/
|
||||
Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}.tar.gz
|
||||
# Use system lapack
|
||||
Patch0: openblas-0.2.7-system_lapack.patch
|
||||
Patch0: openblas-0.2.9-system_lapack.patch
|
||||
# Drop extra p from threaded library name
|
||||
Patch1: openblas-0.2.5-libname.patch
|
||||
# Don't test link against functions in lapacke 3.5.0 if only 3.4.0 is available
|
||||
Patch2: openblas-0.2.9-lapacke.patch
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
BuildRequires: gcc-gfortran
|
||||
@ -34,6 +36,22 @@ BuildRequires: lapack-static%{?_isa}
|
||||
%global lapacke 0
|
||||
%endif
|
||||
|
||||
# Build 64-bit interface binaries?
|
||||
%if 0%{?rhel} == 5 || 0%{?rhel} == 6
|
||||
# RPM too old to know __isa_bits in RHEL 5, and lapack64 doesn't exist in RHEL 6
|
||||
%global build64 0
|
||||
%else
|
||||
%if 0%{?__isa_bits} == 64
|
||||
%global build64 1
|
||||
%else
|
||||
%global build64 0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %build64
|
||||
BuildRequires: lapack64-static
|
||||
%endif
|
||||
|
||||
# Upstream supports the package only on these architectures.
|
||||
# Runtime processor detection is not available on other archs.
|
||||
ExclusiveArch: x86_64 %{ix86}
|
||||
@ -51,7 +69,6 @@ Computational Science, ISCAS. http://www.rdcps.ac.cn
|
||||
Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
|
||||
Group: Development/Libraries
|
||||
|
||||
|
||||
%description openmp
|
||||
%{base_description}
|
||||
|
||||
@ -66,12 +83,50 @@ Group: Development/Libraries
|
||||
|
||||
This package contains the library compiled with threading support.
|
||||
|
||||
%if %build64
|
||||
%package serial64
|
||||
Summary: An optimized BLAS library based on GotoBLAS2, serial version
|
||||
Group: Development/Libraries
|
||||
|
||||
%description serial64
|
||||
%{base_description}
|
||||
|
||||
This package contains the sequential library compiled with a 64-bit
|
||||
interface.
|
||||
|
||||
%package openmp64
|
||||
Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
|
||||
Group: Development/Libraries
|
||||
|
||||
%description openmp64
|
||||
%{base_description}
|
||||
|
||||
This package contains the library compiled with OpenMP support and
|
||||
64-bit interface.
|
||||
|
||||
%package threads64
|
||||
Summary: An optimized BLAS library based on GotoBLAS2, pthreads version
|
||||
Group: Development/Libraries
|
||||
|
||||
%description threads64
|
||||
%{base_description}
|
||||
|
||||
This package contains the library compiled with threading support and
|
||||
64-bit interface.
|
||||
%endif
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development headers and libraries for OpenBLAS
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-openmp%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-threads%{?_isa} = %{version}-%{release}
|
||||
%if %build64
|
||||
Requires: %{name}-openmp64%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-threads64%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-serial64%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
%{base_description}
|
||||
@ -96,11 +151,25 @@ tar zxf %{SOURCE0}
|
||||
cd OpenBLAS-%{version}
|
||||
%patch0 -p1 -b .system_lapack
|
||||
%patch1 -p1 -b .libname
|
||||
%if 0%{?fedora} > 0 && 0%{?fedora} < 21
|
||||
%patch2 -p1 -b .lapacke
|
||||
%endif
|
||||
|
||||
# Get rid of bundled LAPACK sources
|
||||
rm -rf lapack-netlib
|
||||
|
||||
# Setup LAPACK
|
||||
# Make serial, threaded and OpenMP versions; as well as 64-bit versions
|
||||
cd ..
|
||||
cp -ar OpenBLAS-%{version} openmp
|
||||
cp -ar OpenBLAS-%{version} threaded
|
||||
%if %build64
|
||||
cp -ar OpenBLAS-%{version} openmp64
|
||||
cp -ar OpenBLAS-%{version} threaded64
|
||||
cp -ar OpenBLAS-%{version} serial64
|
||||
%endif
|
||||
mv OpenBLAS-%{version} serial
|
||||
|
||||
# Setup 32-bit interface LAPACK
|
||||
mkdir netliblapack
|
||||
cd netliblapack
|
||||
ar x %{_libdir}/liblapack_pic.a
|
||||
@ -129,11 +198,49 @@ cp -a %{_includedir}/lapacke .
|
||||
%endif
|
||||
cd ..
|
||||
|
||||
# Make serial, threaded and OpenMP versions
|
||||
# Copy in place
|
||||
for d in serial threaded openmp; do
|
||||
cp -pr netliblapack $d
|
||||
done
|
||||
rm -rf netliblapack
|
||||
|
||||
|
||||
# Setup 64-bit interface LAPACK
|
||||
%if %build64
|
||||
mkdir netliblapack64
|
||||
cd netliblapack64
|
||||
ar x %{_libdir}/liblapack64_pic.a
|
||||
# Get rid of duplicate functions. See list in Makefile of lapack directory
|
||||
for f in laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs; do
|
||||
\rm {c,d,s,z}$f.o
|
||||
done
|
||||
|
||||
# LAPACKE, no 64-bit interface
|
||||
%if %{lapacke}
|
||||
ar x %{_libdir}/liblapacke.a
|
||||
%endif
|
||||
|
||||
# Create makefile
|
||||
echo "TOPDIR = .." > Makefile
|
||||
echo "include ../Makefile.system" >> Makefile
|
||||
echo "COMMONOBJS = \\" >> Makefile
|
||||
for i in *.o; do
|
||||
echo "$i \\" >> Makefile
|
||||
done
|
||||
echo -e "\n\ninclude \$(TOPDIR)/Makefile.tail" >> Makefile
|
||||
|
||||
%if %{lapacke}
|
||||
# Copy include files
|
||||
cp -a %{_includedir}/lapacke .
|
||||
%endif
|
||||
cd ..
|
||||
cp -ar OpenBLAS-%{version} openmp
|
||||
cp -ar OpenBLAS-%{version} threaded
|
||||
mv OpenBLAS-%{version} serial
|
||||
|
||||
# Copy in place
|
||||
for d in serial64 threaded64 openmp64; do
|
||||
cp -pr netliblapack64 $d/netliblapack
|
||||
done
|
||||
rm -rf netliblapack64
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if %{lapacke}
|
||||
@ -142,11 +249,19 @@ LAPACKE="NO_LAPACKE=0"
|
||||
LAPACKE="NO_LAPACKE=1"
|
||||
%endif
|
||||
|
||||
make -C serial TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags}" NUM_THREADS=32 %{?avxflag} $LAPACKE
|
||||
make -C threaded TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags}" NUM_THREADS=32 LIBPREFIX="libopenblasp" %{?avxflag} $LAPACKE
|
||||
# USE_THREAD determines use of SMP, not of pthreads
|
||||
make -C openmp TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags}" NUM_THREADS=32 LIBPREFIX="libopenblaso" %{?avxflag} $LAPACKE
|
||||
# Maximum possible amount of processors
|
||||
NMAX="NUM_THREADS=128"
|
||||
|
||||
make -C serial TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags}" $NMAX LIBPREFIX="libopenblas" %{?avxflag} $LAPACKE INTERFACE64=0
|
||||
make -C threaded TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags}" $NMAX LIBPREFIX="libopenblasp" %{?avxflag} $LAPACKE INTERFACE64=0
|
||||
# USE_THREAD determines use of SMP, not of pthreads
|
||||
make -C openmp TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags}" $NMAX LIBPREFIX="libopenblaso" %{?avxflag} $LAPACKE INTERFACE64=0
|
||||
|
||||
%if %build64
|
||||
make -C serial64 TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags}" $NMAX LIBPREFIX="libopenblas64" %{?avxflag} $LAPACKE INTERFACE64=1
|
||||
make -C threaded64 TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags}" $NMAX LIBPREFIX="libopenblasp64" %{?avxflag} $LAPACKE INTERFACE64=1
|
||||
make -C openmp64 TARGET=CORE2 DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags}" $NMAX LIBPREFIX="libopenblaso64" %{?avxflag} $LAPACKE INTERFACE64=1
|
||||
%endif
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
@ -182,6 +297,21 @@ plibname=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p|g"`
|
||||
install -D -p -m 755 threaded/${plibname}.so %{buildroot}%{_libdir}/${plibname}.so
|
||||
install -D -p -m 644 threaded/${plibname}.a %{buildroot}%{_libdir}/lib%{name}p.a
|
||||
|
||||
# Install the 64-bit interface libraries
|
||||
%if %build64
|
||||
slibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64|g"`
|
||||
install -D -p -m 755 serial64/${slibname64}.so %{buildroot}%{_libdir}/${slibname64}.so
|
||||
install -D -p -m 644 serial64/${slibname64}.a %{buildroot}%{_libdir}/lib%{name}64.a
|
||||
|
||||
olibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o64|g"`
|
||||
install -D -p -m 755 openmp64/${olibname64}.so %{buildroot}%{_libdir}/${olibname64}.so
|
||||
install -D -p -m 644 openmp64/${olibname64}.a %{buildroot}%{_libdir}/lib%{name}o64.a
|
||||
|
||||
plibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p64|g"`
|
||||
install -D -p -m 755 threaded64/${plibname64}.so %{buildroot}%{_libdir}/${plibname64}.so
|
||||
install -D -p -m 644 threaded64/${plibname64}.a %{buildroot}%{_libdir}/lib%{name}p64.a
|
||||
%endif
|
||||
|
||||
# Fix source permissions (also applies to LAPACK)
|
||||
find -name \*.f -exec chmod 644 {} \;
|
||||
|
||||
@ -197,6 +327,19 @@ ln -sf ${olibname}.so lib%{name}o.so.0
|
||||
ln -sf ${plibname}.so lib%{name}p.so
|
||||
ln -sf ${plibname}.so lib%{name}p.so.0
|
||||
|
||||
%if %build64
|
||||
# Serial libraries
|
||||
ln -sf ${slibname64}.so lib%{name}64.so
|
||||
ln -sf ${slibname64}.so lib%{name}64.so.0
|
||||
# OpenMP libraries
|
||||
ln -sf ${olibname64}.so lib%{name}o64.so
|
||||
ln -sf ${olibname64}.so lib%{name}o64.so.0
|
||||
# Threaded libraries
|
||||
ln -sf ${plibname64}.so lib%{name}p64.so
|
||||
ln -sf ${plibname64}.so lib%{name}p64.so.0
|
||||
%endif
|
||||
|
||||
|
||||
# Get rid of executable stacks
|
||||
for lib in %{buildroot}%{_libdir}/libopenblas{,o,p}-*.so; do
|
||||
execstack -c $lib
|
||||
@ -230,20 +373,52 @@ rm -rf %{buildroot}
|
||||
%{_libdir}/lib%{name}p-*.so
|
||||
%{_libdir}/lib%{name}p.so.*
|
||||
|
||||
%if %build64
|
||||
%files serial64
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/lib%{name}64-*.so
|
||||
%{_libdir}/lib%{name}64.so.*
|
||||
|
||||
%files openmp64
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/lib%{name}o64-*.so
|
||||
%{_libdir}/lib%{name}o64.so.*
|
||||
|
||||
%files threads64
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/lib%{name}p64-*.so
|
||||
%{_libdir}/lib%{name}p64.so.*
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/%{name}/
|
||||
%{_libdir}/lib%{name}.so
|
||||
%{_libdir}/lib%{name}o.so
|
||||
%{_libdir}/lib%{name}p.so
|
||||
%{_includedir}/%{name}/
|
||||
%if %build64
|
||||
%{_libdir}/lib%{name}64.so
|
||||
%{_libdir}/lib%{name}o64.so
|
||||
%{_libdir}/lib%{name}p64.so
|
||||
%endif
|
||||
|
||||
%files static
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/lib%{name}.a
|
||||
%{_libdir}/lib%{name}o.a
|
||||
%{_libdir}/lib%{name}p.a
|
||||
%if %build64
|
||||
%{_libdir}/lib%{name}64.a
|
||||
%{_libdir}/lib%{name}o64.a
|
||||
%{_libdir}/lib%{name}p64.a
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Jun 11 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.9-1
|
||||
- Increase maximum amount of cores from 32 to 128.
|
||||
- Add 64-bit interface support. (BZ #1088256)
|
||||
- Update to 0.2.9. (BZ #1043083)
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user