disable affinity to prevent crash on systems with fewer cpus

This commit is contained in:
Frantisek Kluknavsky 2013-09-24 16:33:16 +02:00
parent 381f2c21f2
commit 48e39087ac
2 changed files with 30 additions and 1 deletions

17
atlas-affinity.patch Normal file
View File

@ -0,0 +1,17 @@
diff -up wrk/src/threads/ATL_thread_start.c.wrk wrk/src/threads/ATL_thread_start.c
--- wrk/src/threads/ATL_thread_start.c.wrk 2013-09-23 13:46:51.881085276 +0200
+++ wrk/src/threads/ATL_thread_start.c 2013-09-24 16:13:59.021065418 +0200
@@ -101,9 +101,10 @@ int ATL_thread_start(ATL_thread_t *thr,
ATL_assert(!pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED));
pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); /* no chk, OK to fail */
#ifdef ATL_PAFF_SETAFFNP
- CPU_ZERO(&cpuset);
- CPU_SET(affID, &cpuset);
- ATL_assert(!pthread_attr_setaffinity_np(&attr, sizeof(cpuset), &cpuset));
+ //affinity crashes a machine with fewer processors than the builder
+ //CPU_ZERO(&cpuset);
+ //CPU_SET(affID, &cpuset);
+ //ATL_assert(!pthread_attr_setaffinity_np(&attr, sizeof(cpuset), &cpuset));
#elif defined(ATL_PAFF_SETPROCNP)
ATL_assert(!pthread_attr_setprocessor_np(&attr, (pthread_spu_t)affID,
PTHREAD_BIND_FORCED_NP));

View File

@ -5,7 +5,7 @@ Version: 3.10.1
%if "%{?enable_native_atlas}" != "0"
%define dist .native
%endif
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Automatically Tuned Linear Algebra Software
Group: System Environment/Libraries
@ -39,6 +39,8 @@ Patch4: atlas-throttling.patch
#credits Lukas Slebodnik
Patch5: atlas-shared_libraries.patch
Patch6: atlas-affinity.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-gfortran
@ -289,6 +291,9 @@ ix86 architecture.
%else
%global mode -b %{__isa_bits}
%global armflags %{nil}
%if "%{?enable_native_atlas}" == "0"
%define threads_option -t 16
%endif
%endif
%prep
@ -306,6 +311,10 @@ ix86 architecture.
%patch3 -p1 -b .melf
%patch4 -p1 -b .thrott
%patch5 -p2 -b .sharedlib
#affinity crashes with fewer processors than the builder but increases performance of locally builded library
%if "%{?enable_native_atlas}" == "0"
%patch6 -p1 -b .affinity
%endif
#%patch6 -p1 -b .m32
cp %{SOURCE1} CONFIG/ARCHS/
#cp %{SOURCE2} CONFIG/ARCHS/
@ -766,6 +775,9 @@ fi
%endif
%changelog
* Tue Sep 24 2013 Frantisek Kluknavsky <fkluknav@redhat.com> - 3.10.1-2
- disable affinity to prevent crash on systems with fewer cpus
* Fri Sep 20 2013 Frantisek Kluknavsky <fkluknav@redhat.com> - 3.10.1-1
- Rebase to 3.10.1
- Dropped x86_64-SSE2, ix86-SSE1, ix86-3DNow, z10, z196 (uncompilable).