[SCM] Packaging for numexpr branch, master, updated. debian/2.0.1-2-4-gf4aebde
Antonio Valentino
antonio.valentino at tiscali.it
Sun Apr 22 19:29:07 UTC 2012
The following commit has been merged in the master branch:
commit f4aebde605c2f27b21884abb2c7919cf12dbc8ec
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date: Sun Apr 22 21:18:59 2012 +0200
Set the default number of threads to 1 on sparc
diff --git a/debian/README.Debian b/debian/README.Debian
index cfeb3b8..2bf3764 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -9,4 +9,13 @@ A _detailed_ changelog is available at:
http://code.google.com/p/numexpr/wiki/ReleaseNotes
+Some issue related to threading have been reported on sparc machines.
+The problem is hard to reproduce and do not affects all installations.
+For this reason the default number of threads for computations is forced
+to one on sparc.
+You can verify if your sparc installation is affected by the problem by running
+the numexpr test suite.
+If you are not affected you can safely change the number of threads to be used
+for computations using the "numexpr.set_num_threads" function.
+
-- Wen Heping <wenheping at gmail.com> Wed, 14 Jul 2010 21:50:27 +0800
diff --git a/debian/changelog b/debian/changelog
index 5e0c8f8..d69945f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
numexpr (2.0.1-4) unstable; urgency=low
* Re-enable unittests at build time on sparc
+ * Set the default number of threads to 1 on sparc
- -- Antonio Valentino <antonio.valentino at tiscali.it> Sun, 22 Apr 2012 20:40:14 +0200
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sun, 22 Apr 2012 21:18:00 +0200
numexpr (2.0.1-3) unstable; urgency=low
diff --git a/debian/patches/0003-Set-default-nthreads-to-one-on-sparc.patch b/debian/patches/0003-Set-default-nthreads-to-one-on-sparc.patch
new file mode 100644
index 0000000..45a249a
--- /dev/null
+++ b/debian/patches/0003-Set-default-nthreads-to-one-on-sparc.patch
@@ -0,0 +1,36 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sun, 22 Apr 2012 20:57:19 +0200
+Subject: Set default nthreads to one on sparc
+
+---
+ numexpr/__init__.py | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+--- a/numexpr/__init__.py
++++ b/numexpr/__init__.py
+@@ -35,6 +35,7 @@
+ is_cpu_amd_intel = False
+
+ import os.path
++import platform
+ from numexpr.expressions import E
+ from numexpr.necompiler import NumExpr, disassemble, evaluate
+ from numexpr.tests import test, print_versions
+@@ -47,7 +48,16 @@
+ # Check that we don't surpass the MAX_THREADS in interpreter.c
+ if ncores > 4096:
+ ncores = 4096
+-set_num_threads(ncores)
++if 'sparc' in platform.machine():
++ import warnings
++ warnings.warn('The number of threads have been set to 1 because problems related '
++ 'to threading have been reported on some sparc machine. '
++ 'The number of threads can be changes using the "set_num_threads" '
++ 'function.')
++ set_num_threads(1)
++else:
++ set_num_threads(ncores)
++
+ # The default for VML is 1 thread (see #39)
+ set_vml_num_threads(1)
+
diff --git a/debian/patches/series b/debian/patches/series
index ce8959f..5236602 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-debian-changes-1.3.1-1.patch
0002-feature-forwarded-upstream-fix-FTBFS-on-Hurd-and-KFr.patch
+0003-Set-default-nthreads-to-one-on-sparc.patch
--
Packaging for numexpr
More information about the debian-science-commits
mailing list