From 39aa839398d6b5187983feef4f1c389a371ac074 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Wed, 13 Jan 2016 21:15:11 +0100 Subject: [PATCH 1/7] Update constructor priority patch --- openblas-0.2.15-constructor.patch | 39 ++++++++++++++----------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/openblas-0.2.15-constructor.patch b/openblas-0.2.15-constructor.patch index 19ad242..6b6a092 100644 --- a/openblas-0.2.15-constructor.patch +++ b/openblas-0.2.15-constructor.patch @@ -1,22 +1,19 @@ -diff -up OpenBLAS-0.2.15/driver/others/memory.c.orig OpenBLAS-0.2.15/driver/others/memory.c ---- OpenBLAS-0.2.15/driver/others/memory.c.orig 2015-10-27 21:44:50.000000000 +0100 -+++ OpenBLAS-0.2.15/driver/others/memory.c 2016-01-12 20:22:14.935338309 +0100 -@@ -1338,7 +1338,7 @@ static void gotoblas_memory_init(void) { +diff -up OpenBLAS-0.2.15/driver/others/memory.c.priority OpenBLAS-0.2.15/driver/others/memory.c +--- OpenBLAS-0.2.15/driver/others/memory.c.priority 2015-10-27 21:44:50.000000000 +0100 ++++ OpenBLAS-0.2.15/driver/others/memory.c 2016-01-13 21:12:01.862225898 +0100 +@@ -146,8 +146,15 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF + #define CONSTRUCTOR __attribute__ ((constructor)) + #define DESTRUCTOR __attribute__ ((destructor)) + #else ++#if __GNUC__ && INIT_PRIORITY && ((GCC_VERSION >= 40300) || (CLANG_VERSION >= 20900)) + #define CONSTRUCTOR __attribute__ ((constructor(101))) + #define DESTRUCTOR __attribute__ ((destructor(101))) ++#elif __GNUC__ && INIT_PRIORITY ++#define CONSTRUCTOR __attribute__ ((constructor)) ++#define DESTRUCTOR __attribute__ ((destructor)) ++#else ++#define CONSTRUCTOR ++#define DESTRUCTOR + #endif - static int gotoblas_initialized = 0; - --void CONSTRUCTOR gotoblas_init(void) { -+void gotoblas_init(void) { - - if (gotoblas_initialized) return; - -@@ -1381,7 +1381,7 @@ void CONSTRUCTOR gotoblas_init(void) { - - } - --void DESTRUCTOR gotoblas_quit(void) { -+void gotoblas_quit(void) { - - if (gotoblas_initialized == 0) return; - -diff -up OpenBLAS-0.2.15/getarch.c.orig OpenBLAS-0.2.15/getarch.c + #ifdef DYNAMIC_ARCH From 67bd963bb88ff05fe387c30723942cf4dedc5075 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Wed, 13 Jan 2016 21:24:14 +0100 Subject: [PATCH 2/7] No -frecursive on el5. --- openblas.spec | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/openblas.spec b/openblas.spec index 40236a6..5f210f1 100644 --- a/openblas.spec +++ b/openblas.spec @@ -331,20 +331,27 @@ TARGET="TARGET=ARMV7 DYNAMIC_ARCH=0" TARGET="TARGET=POWER8 DYNAMIC_ARCH=0" %endif +%if 0{%?rhel} == 5 +# Gfortran too old to recognize -frecursive +FCOMMON="" +%else +FCOMMON="\"-frecursive\"" +%endif + # Declare some necessary build flags -make -C serial $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="-frecursive" $NMAX LIBPREFIX="libopenblas" $AVX $LAPACKE INTERFACE64=0 -make -C threaded $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="-frecursive" $NMAX LIBPREFIX="libopenblasp" $AVX $LAPACKE INTERFACE64=0 +make -C serial $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" 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="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblasp" $AVX $LAPACKE INTERFACE64=0 # USE_THREAD determines use of SMP, not of pthreads -make -C openmp $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="-frecursive" $NMAX LIBPREFIX="libopenblaso" $AVX $LAPACKE INTERFACE64=0 +make -C openmp $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblaso" $AVX $LAPACKE INTERFACE64=0 %if %build64 -make -C serial64 $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="-frecursive" $NMAX LIBPREFIX="libopenblas64" $AVX $LAPACKE INTERFACE64=1 -make -C threaded64 $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="-frecursive" $NMAX LIBPREFIX="libopenblasp64" $AVX $LAPACKE INTERFACE64=1 -make -C openmp64 $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="-frecursive" $NMAX LIBPREFIX="libopenblaso64" $AVX $LAPACKE INTERFACE64=1 +make -C serial64 $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" 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="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblasp64" $AVX $LAPACKE INTERFACE64=1 +make -C openmp64 $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblaso64" $AVX $LAPACKE INTERFACE64=1 -make -C serial64_ $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="-frecursive" $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="%{optflags} -fPIC" FCOMMON_OPT="-frecursive" $NMAX LIBPREFIX="libopenblasp64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_ -make -C openmp64_ $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="-frecursive" $NMAX LIBPREFIX="libopenblaso64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_ +make -C serial64_ $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" 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="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblasp64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_ +make -C openmp64_ $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblaso64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_ %endif %install From 1b0177b4651bfac9e44f8eb981d6527d1b660f20 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Wed, 13 Jan 2016 21:25:34 +0100 Subject: [PATCH 3/7] Typo --- openblas.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openblas.spec b/openblas.spec index 5f210f1..2d0e934 100644 --- a/openblas.spec +++ b/openblas.spec @@ -331,7 +331,7 @@ TARGET="TARGET=ARMV7 DYNAMIC_ARCH=0" TARGET="TARGET=POWER8 DYNAMIC_ARCH=0" %endif -%if 0{%?rhel} == 5 +%if 0%{?rhel} == 5 # Gfortran too old to recognize -frecursive FCOMMON="" %else From 8d9c22fb97a04c4d4c4d8812349a6ef899c85a9b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 11:24:24 +0000 Subject: [PATCH 4/7] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- openblas.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openblas.spec b/openblas.spec index 2d0e934..6e8a23f 100644 --- a/openblas.spec +++ b/openblas.spec @@ -4,7 +4,7 @@ Name: openblas Version: 0.2.15 -Release: 5%{?dist} +Release: 6%{?dist} Summary: An optimized BLAS library based on GotoBLAS2 Group: Development/Libraries License: BSD @@ -595,6 +595,9 @@ rm -rf %{buildroot} %endif %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 0.2.15-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Tue Jan 12 2016 Susi Lehtola - 0.2.15-5 - Need to use -frecursive to make LAPACK thread safe. From 2ef5f34624f3d2699e536151206fb7f153b4aca7 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Wed, 16 Mar 2016 02:49:41 +0100 Subject: [PATCH 5/7] Update to 0.2.16. --- .gitignore | 1 + openblas.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e2228b4..5f3f6bc 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /v0.2.13.tar.gz /v0.2.14.tar.gz /v0.2.15.tar.gz +/v0.2.16.tar.gz diff --git a/openblas.spec b/openblas.spec index 6e8a23f..6d3a373 100644 --- a/openblas.spec +++ b/openblas.spec @@ -3,8 +3,8 @@ %global lapackver 3.5.0 Name: openblas -Version: 0.2.15 -Release: 6%{?dist} +Version: 0.2.16 +Release: 1%{?dist} Summary: An optimized BLAS library based on GotoBLAS2 Group: Development/Libraries License: BSD @@ -595,6 +595,9 @@ rm -rf %{buildroot} %endif %changelog +* Tue Mar 15 2016 Susi Lehtola - 0.2.16-1 +- Update to 0.2.16. + * Thu Feb 04 2016 Fedora Release Engineering - 0.2.15-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index fbc0d17..25cee0a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b1190f3d3471685f17cfd1ec1d252ac9 v0.2.15.tar.gz +fef46ab92463bdbb1479dcec594ef6dc v0.2.16.tar.gz From ad29f98b6d9b214855960827c4e85ab1953a6b2b Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Wed, 16 Mar 2016 03:29:41 +0100 Subject: [PATCH 6/7] Let's try if it works with fPIC. --- openblas.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openblas.spec b/openblas.spec index 6d3a373..6872376 100644 --- a/openblas.spec +++ b/openblas.spec @@ -333,9 +333,9 @@ TARGET="TARGET=POWER8 DYNAMIC_ARCH=0" %if 0%{?rhel} == 5 # Gfortran too old to recognize -frecursive -FCOMMON="" +FCOMMON="\"-frecursive -fPIC\"" %else -FCOMMON="\"-frecursive\"" +FCOMMON="\"-frecursive -fPIC\"" %endif # Declare some necessary build flags From 9cbcb452aa5ff5d2cccea9611bca301beb089078 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Wed, 16 Mar 2016 03:36:20 +0100 Subject: [PATCH 7/7] Let's try if it works with fPIC. --- openblas.spec | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/openblas.spec b/openblas.spec index 6872376..987a7f7 100644 --- a/openblas.spec +++ b/openblas.spec @@ -333,25 +333,25 @@ TARGET="TARGET=POWER8 DYNAMIC_ARCH=0" %if 0%{?rhel} == 5 # Gfortran too old to recognize -frecursive -FCOMMON="\"-frecursive -fPIC\"" +FCOMMON="" %else -FCOMMON="\"-frecursive -fPIC\"" +FCOMMON="-frecursive" %endif # Declare some necessary build flags -make -C serial $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" 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="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblasp" $AVX $LAPACKE INTERFACE64=0 +make -C serial $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="$FCOMMON -fPIC" $NMAX LIBPREFIX="libopenblas" $AVX $LAPACKE INTERFACE64=0 +make -C threaded $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="$FCOMMON -fPIC" $NMAX LIBPREFIX="libopenblasp" $AVX $LAPACKE INTERFACE64=0 # USE_THREAD determines use of SMP, not of pthreads -make -C openmp $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblaso" $AVX $LAPACKE INTERFACE64=0 +make -C openmp $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="$FCOMMON -fPIC" $NMAX LIBPREFIX="libopenblaso" $AVX $LAPACKE INTERFACE64=0 %if %build64 -make -C serial64 $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" 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="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblasp64" $AVX $LAPACKE INTERFACE64=1 -make -C openmp64 $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblaso64" $AVX $LAPACKE INTERFACE64=1 +make -C serial64 $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="$FCOMMON -fPIC" $NMAX LIBPREFIX="libopenblas64" $AVX $LAPACKE INTERFACE64=1 +make -C threaded64 $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="$FCOMMON -fPIC" $NMAX LIBPREFIX="libopenblasp64" $AVX $LAPACKE INTERFACE64=1 +make -C openmp64 $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="$FCOMMON -fPIC" $NMAX LIBPREFIX="libopenblaso64" $AVX $LAPACKE INTERFACE64=1 -make -C serial64_ $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" 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="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblasp64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_ -make -C openmp64_ $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblaso64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_ +make -C serial64_ $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="$FCOMMON -fPIC" $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="%{optflags} -fPIC" FCOMMON_OPT="$FCOMMON -fPIC" $NMAX LIBPREFIX="libopenblasp64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_ +make -C openmp64_ $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT="$FCOMMON -fPIC" $NMAX LIBPREFIX="libopenblaso64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_ %endif %install