summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Eberspächer <alex.eberspaecher@gmail.com>2012-05-02 11:33:06 +0200
committerAlexander Eberspächer <alex.eberspaecher@gmail.com>2012-05-02 11:33:06 +0200
commit8218cbea2a2b706775c3c302ea1a4c361bd40bcc (patch)
tree5dc7e73749e99f2114c75a114ee87ee9f6ba24b1
parent0e39699c8c5618a54ce45fcf825c149307f8dfc9 (diff)
downloadopenblas-8218cbea2a2b706775c3c302ea1a4c361bd40bcc.tar.gz
openblas-8218cbea2a2b706775c3c302ea1a4c361bd40bcc.tar.bz2
openblas-8218cbea2a2b706775c3c302ea1a4c361bd40bcc.zip
Add Xianyi's patch for segfaults on kernel 2.6.32 and add documentation
accordingly.
-rw-r--r--GotoBLAS_03FAQ.txt8
-rw-r--r--segfaults.patch27
2 files changed, 35 insertions, 0 deletions
diff --git a/GotoBLAS_03FAQ.txt b/GotoBLAS_03FAQ.txt
index b6033fe53..b45e6d095 100644
--- a/GotoBLAS_03FAQ.txt
+++ b/GotoBLAS_03FAQ.txt
@@ -90,6 +90,14 @@
number of threads will consume extra resource. I recommend you to
specify minimum number of threads.
+1.9 Q I have segfaults when I compile with USE_OPENMP=1. What's wrong?
+
+ A This may be related to a bug in the Linux kernel 2.6.32. Try applying
+ the patch segaults.patch using
+
+ git am segfaults.patch
+
+ and see if the crashes persist.
2. Architecture Specific issue or Implementation
diff --git a/segfaults.patch b/segfaults.patch
new file mode 100644
index 000000000..9585fa04b
--- /dev/null
+++ b/segfaults.patch
@@ -0,0 +1,27 @@
+From ac40907baa90a0acc78139762ffa3c6f09274236 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alexander=20Ebersp=C3=A4cher?= <alex.eberspaecher@gmail.com>
+Date: Wed, 2 May 2012 11:22:52 +0200
+Subject: [PATCH] Fix segfaults with kernel 2.6.32. This comes at the price of many compiler warnings.
+
+---
+ common_linux.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/common_linux.h b/common_linux.h
+index b0381d9..40a94cb 100644
+--- a/common_linux.h
++++ b/common_linux.h
+@@ -76,8 +76,8 @@ static inline int my_mbind(void *addr, unsigned long len, int mode,
+ #endif
+ #else
+ //Fixed randomly SEGFAULT when nodemask==NULL with above Linux 2.6.34
+-// unsigned long null_nodemask=0;
+- return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags);
++ unsigned long null_nodemask=0;
++ return syscall(SYS_mbind, addr, len, mode, &nodemask, maxnode, flags);
+ #endif
+ }
+
+--
+1.7.1
+