diff --git a/openblas-0.3.2-threads.patch b/openblas-0.3.2-threads.patch new file mode 100644 index 0000000..0fa1d35 --- /dev/null +++ b/openblas-0.3.2-threads.patch @@ -0,0 +1,12 @@ +diff -up OpenBLAS-0.3.2/driver/others/memory.c.threads OpenBLAS-0.3.2/driver/others/memory.c +--- OpenBLAS-0.3.2/driver/others/memory.c.threads 2018-07-30 07:25:01.000000000 +0200 ++++ OpenBLAS-0.3.2/driver/others/memory.c 2018-08-24 18:45:36.826078344 +0200 +@@ -497,7 +497,7 @@ static const int allocation_block_size = + #if defined(SMP) && !defined(USE_OPENMP_UNUSED) + /* This is the number of threads than can be spawned by the server, which is the + server plus the number of threads in the thread pool */ +-# define MAX_ALLOCATING_THREADS MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER * 2 ++# define MAX_ALLOCATING_THREADS 8192 + static int next_memory_table_pos = 0; + # if defined(HAS_COMPILER_TLS) + /* Use compiler generated thread-local-storage */ diff --git a/openblas.spec b/openblas.spec index 13bfa2a..abc2d75 100644 --- a/openblas.spec +++ b/openblas.spec @@ -29,6 +29,8 @@ Patch1: openblas-0.2.5-libname.patch Patch2: openblas-0.2.15-constructor.patch # Supply the proper flags to the test makefile Patch3: openblas-0.3.2-tests.patch +# Crude hack to avoid problems with threading code (see https://github.com/xianyi/OpenBLAS/issues/1735) +Patch4: openblas-0.3.2-threads.patch BuildRequires: gcc BuildRequires: gcc-gfortran @@ -250,6 +252,7 @@ cd OpenBLAS-%{version} %patch2 -p1 -b .constructor %endif %patch3 -p1 -b .tests +%patch4 -p1 -b .threads # Fix source permissions find -name \*.f -exec chmod 644 {} \; @@ -689,6 +692,9 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig %endif %changelog +* Fri Aug 24 2018 Susi Lehtola - 0.3.2-4 +- Patch to avoid threading issues. + * Fri Aug 24 2018 Susi Lehtola - 0.3.2-3 - Add missing %%{optflags} to COMMON (see discussion in #1619074).