Skip to content

Commit 11cc9dc

Browse files
committed
Merge pull request #104 from aeberspaecher/develop
Fixed #85. Add the patch for segfaults on kernel 2.6.32 and add documentation accordingly.
2 parents 0e39699 + 4236d0d commit 11cc9dc

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

GotoBLAS_03FAQ.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@
9090
number of threads will consume extra resource. I recommend you to
9191
specify minimum number of threads.
9292

93+
1.9 Q I have segfaults when I compile with USE_OPENMP=1. What's wrong?
94+
95+
A This may be related to a bug in the Linux kernel 2.6.32. Try applying
96+
the patch segaults.patch using
97+
98+
git am segfaults.patch
99+
100+
and see if the crashes persist. Note that this patch will lead to many
101+
compiler warnings.
93102

94103
2. Architecture Specific issue or Implementation
95104

segfaults.patch

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From ac40907baa90a0acc78139762ffa3c6f09274236 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Alexander=20Ebersp=C3=A4cher?= <[email protected]>
3+
Date: Wed, 2 May 2012 11:22:52 +0200
4+
Subject: [PATCH] Fix segfaults with kernel 2.6.32. This comes at the price of many compiler warnings.
5+
6+
---
7+
common_linux.h | 4 ++--
8+
1 files changed, 2 insertions(+), 2 deletions(-)
9+
10+
diff --git a/common_linux.h b/common_linux.h
11+
index b0381d9..40a94cb 100644
12+
--- a/common_linux.h
13+
+++ b/common_linux.h
14+
@@ -76,8 +76,8 @@ static inline int my_mbind(void *addr, unsigned long len, int mode,
15+
#endif
16+
#else
17+
//Fixed randomly SEGFAULT when nodemask==NULL with above Linux 2.6.34
18+
-// unsigned long null_nodemask=0;
19+
- return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags);
20+
+ unsigned long null_nodemask=0;
21+
+ return syscall(SYS_mbind, addr, len, mode, &nodemask, maxnode, flags);
22+
#endif
23+
}
24+
25+
--
26+
1.7.1
27+

0 commit comments

Comments
 (0)