summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel2022-01-31 22:55:11 -0500
committerGuillaume Horel2022-01-31 22:55:11 -0500
commit76ec76fdd065b13f3145440996199edf2fffe2a2 (patch)
tree53afd66a49d213131b9f47a12428851b41b44dc1
parent9a12f169a4c69d76e9c3a032d4069cc17910bfa3 (diff)
downloadaur-76ec76fdd065b13f3145440996199edf2fffe2a2.tar.gz
save the patch locally
-rw-r--r--.SRCINFO6
-rw-r--r--3504.patch62
-rw-r--r--PKGBUILD6
3 files changed, 68 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f69b0e573225..7017d5ddec88 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = openblas-lapack
pkgdesc = Optimized BLAS library based on GotoBLAS2 1.13 BSD (providing blas, lapack, and cblas)
pkgver = 0.3.19
- pkgrel = 2
+ pkgrel = 3
url = http://www.openblas.net/
arch = x86_64
license = BSD
@@ -20,8 +20,8 @@ pkgbase = openblas-lapack
conflicts = lapacke
options = !emptydirs
source = OpenBLAS-0.3.19.tar.gz::https://github.com/xianyi/OpenBLAS/archive/v0.3.19.tar.gz
- source = https://patch-diff.githubusercontent.com/raw/xianyi/OpenBLAS/pull/3504.patch
+ source = 3504.patch
sha256sums = 947f51bfe50c2a0749304fbe373e00e7637600b0a47b78a51382aeb30ca08562
- sha256sums = 52a0ce2e8c7e3904cd1f2e65ab877d9370a6fcd23a1cd35e2e6a7ffa9fb4434c
+ sha256sums = 972aa53d2fbbe76b46a1cd1a9e53ddfeb42968e701e0cb8894a5bc3c1072847d
pkgname = openblas-lapack
diff --git a/3504.patch b/3504.patch
new file mode 100644
index 000000000000..42db2856196e
--- /dev/null
+++ b/3504.patch
@@ -0,0 +1,62 @@
+From b329e45288c2e7fc0ef15c4e8a7b3c8dfd74a930 Mon Sep 17 00:00:00 2001
+From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
+Date: Sat, 1 Jan 2022 00:46:23 +0100
+Subject: [PATCH] Guard against omp_get_num_places returning zero
+
+---
+ driver/others/memory.c | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/driver/others/memory.c b/driver/others/memory.c
+index bd0553ca9d..0f4cbb24d4 100644
+--- a/driver/others/memory.c
++++ b/driver/others/memory.c
+@@ -232,11 +232,11 @@ int get_num_procs(void);
+ #else
+ int get_num_procs(void) {
+ static int nums = 0;
+-
++ int ret;
+ #if defined(__GLIBC_PREREQ)
+ cpu_set_t cpuset,*cpusetp;
+ size_t size;
+- int ret;
++
+ #if !__GLIBC_PREREQ(2, 7)
+ int i;
+ #if !__GLIBC_PREREQ(2, 6)
+@@ -249,7 +249,8 @@ int get_num_procs(void) {
+
+ #if defined(USE_OPENMP)
+ #if _OPENMP >= 201511
+- nums = omp_get_num_places();
++ ret = omp_get_num_places();
++ if (ret >0 ) nums = ret;
+ #endif
+ return nums;
+ #endif
+@@ -1800,11 +1801,12 @@ int get_num_procs(void);
+ int get_num_procs(void) {
+
+ static int nums = 0;
+-
++ int ret;
++
+ #if defined(__GLIBC_PREREQ)
+ cpu_set_t cpuset,*cpusetp;
+ size_t size;
+- int ret;
++
+ #if !__GLIBC_PREREQ(2, 7)
+ int i;
+ #if !__GLIBC_PREREQ(2, 6)
+@@ -1818,7 +1820,8 @@ int get_num_procs(void) {
+ #if defined(USE_OPENMP)
+ /* if (omp_get_proc_bind() != omp_proc_bind_false) */
+ #if _OPENMP >= 201511
+- nums = omp_get_num_places();
++ ret = omp_get_num_places();
++ if (ret >0 ) nums = ret;
+ #endif
+ return nums;
+ #endif
diff --git a/PKGBUILD b/PKGBUILD
index c5a3f48a9a40..2bacd2910657 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ pkgver=0.3.19
# grep VERSION "${srcdir}/${_PkgName}-${pkgver}"/lapack-netlib/README.md | tail -n 1 | cut -d ' ' -f 2
_lapackver=3.9.0
_blasver=3.8.0
-pkgrel=2
+pkgrel=3
pkgdesc="Optimized BLAS library based on GotoBLAS2 1.13 BSD (providing blas, lapack, and cblas)"
arch=('x86_64')
url="http://www.openblas.net/"
@@ -21,9 +21,9 @@ provides=('openblas' "blas=${_blasver}" "lapack=${_lapackver}" "cblas=${_blasver
conflicts=('openblas' 'blas' 'lapack' 'cblas' 'lapacke')
options=(!emptydirs)
source=(${_PkgName}-${pkgver}.tar.gz::https://github.com/xianyi/${_PkgName}/archive/v${pkgver}.tar.gz
- https://patch-diff.githubusercontent.com/raw/xianyi/OpenBLAS/pull/3504.patch)
+ 3504.patch)
sha256sums=('947f51bfe50c2a0749304fbe373e00e7637600b0a47b78a51382aeb30ca08562'
- '52a0ce2e8c7e3904cd1f2e65ab877d9370a6fcd23a1cd35e2e6a7ffa9fb4434c')
+ '972aa53d2fbbe76b46a1cd1a9e53ddfeb42968e701e0cb8894a5bc3c1072847d')
# Add the following line to the _config variable if you want to set the number of make jobs
# MAKE_NB_JOBS=2 \