Martin Kroeker
fd7da56965
Move definitions that are neither needed nor supported on SUNOS
2020-10-25 12:01:50 +01:00
Martin Kroeker
ac653c94f3
Merge branch 'develop' into issue2588-cmake
2020-10-11 13:57:07 +02:00
Alexander Grund
3c05f54df8
Avoid out of bounds access on invalid memory free
2020-10-01 10:48:45 +02:00
Alexander Grund
dee7c49938
Fix TABs and trailing space
2020-10-01 10:43:16 +02:00
Martin Kroeker
357bff06b5
Add BUILD_vartype defines
2020-09-22 23:24:22 +02:00
Martin Kroeker
09eb9d2584
Update conditional for atomics to HAVE_C11
2020-07-18 17:07:38 +00:00
Martin Kroeker
f4248af26e
Fix compiler warnings
2020-04-28 10:43:12 +02:00
Martin Kroeker
f41600e66f
Add a read barrier in the traversing of the buffer list
...
Needed on systems with weak memory ordering - the inferior, partially working fix from #2544 was already removed in #2551
2020-04-13 12:34:02 +02:00
Martin Kroeker
2a28448a96
Add safeguards for sufficient BUFFER_SIZE
2020-04-12 19:45:36 +02:00
Martin Kroeker
69f277f8ee
Add another memory barrier for ARM and a multicore test run on ThunderX to help detect such issues ( #2544 )
...
* Add another memory barrier in memory.c to prevent races in memory slot allocation
* Add an all-core test on Drone.io's ThunderX platform and modify dgemm_tester to use all 96 cores
2020-04-08 11:04:51 +02:00
Martin Kroeker
78100b8093
Free Windows thread memory with MEM_RELEASE rather than MEM_DECOMMIT
...
as suggested by hjmndv in #2370
2020-01-18 15:06:39 +01:00
Martin Kroeker
1b90989662
Add NetBSD to the xBSD conditionals
2019-10-25 12:52:49 +02:00
Martin Kroeker
1776ad82c0
Add files via upload
2019-08-09 00:08:11 +02:00
Martin Kroeker
4e2f81cfa1
Provide more information on mmap/munmap failure
...
for #2207
2019-08-08 23:15:35 +02:00
Martin Kroeker
21d05a4835
Merge pull request #2140 from martin-frbg/pgi19
...
Do not try ancient PGI hacks with recent versions of that compiler
2019-05-26 12:39:20 +02:00
Martin Kroeker
1778fd4219
Do not try ancient PGI hacks with recent versions of that compiler
...
should fix #2139
2019-05-22 13:48:27 +02:00
Martin Kroeker
86dda5c2fa
Add option USE_LOCKING for SMP-like locking in USE_THREAD=0 builds
2019-05-15 23:21:20 +02:00
Martin Kroeker
a387a23518
Merge pull request #2101 from luzpaz/misc-typos
...
Misc. typo fixes in comments and documentation
2019-05-04 22:28:29 +02:00
Martin Kroeker
b43c8382c8
Correct argument of CPU_ISSET for glibc <2.5
...
fixes #2104
2019-05-01 10:46:46 +02:00
luz.paz
daf2fec12d
Misc. typo fixes
...
Found via `codespell -q 3 -w -L ith,als,dum,nd,amin,nto,wis,ba -S ./relapack,./kernel,./lapack-netlib`
2019-04-29 17:03:56 -04:00
Erik M. Bray
4ad694eda1
Fix for #2063 : The DllMain used in Cygwin did not run the thread memory
...
pool cleanup upon THREAD_DETACH which is needed when compiled with
USE_TLS=1.
2019-03-19 09:26:50 +01:00
Martin Kroeker
d7b2c53c0b
Merge pull request #2039 from brada4/meminit
...
Address warning in memory.c
2019-03-05 12:11:15 +01:00
Martin Kroeker
6c83b878f6
Merge pull request #2040 from martin-frbg/locks2002
...
Restore locking optimizations for OpenMP case
2019-03-04 15:07:14 +01:00
Martin Kroeker
af480b02a4
Restore locking optimizations for OpenMP case
...
restore another accidentally dropped part of #1468 that was missed in #2004 to address performance regression reported in #1461
2019-03-03 14:17:07 +01:00
Andrew
e4a79be6bb
address warning introed with #1814 et al
2019-03-03 09:05:11 +02:00
Martin Kroeker
03a2bf2602
Fix potential memory leak in cpu enumeration on Linux ( #2008 )
...
* Fix potential memory leak in cpu enumeration with glibc
An early return after a failed call to sched_getaffinity would leak the previously allocated cpu_set_t. Wrong calculation of the size argument in that call increased the likelyhood of that failure. Fixes #2003
2019-02-10 23:24:45 +01:00
Martin Kroeker
69edc5bbe7
Restore dropped patches in the non-TLS branch of memory.c ( #2004 )
...
* Restore dropped patches in the non-TLS branch of memory.c
As discovered in #2002 , the reintroduction of the "original" non-TLS version of memory.c as an alternate branch had inadvertently used ba1f91f
rather than a8002e2
, thereby dropping the commits for #1450 , #1468 , #1501 , #1504 and #1520 .
2019-02-07 20:06:13 +01:00
Martin Kroeker
ad2c386d6a
Move TLS key deletion to openblas_quit
...
fixes #1954 (as suggested by thrasibule in that issue)
2019-01-10 00:32:50 +01:00
Martin Kroeker
bba1e67269
Delete the pthread key on cleanup in TLS mode
...
to avoid a crash when OpenBLAS was loaded via dlopen and libc tries to clean up the leaked TLS after dlclose
Fixes #1720
2018-12-29 21:59:31 +01:00
Andrew
2601cd58ab
remove surplus locking code , only enabled w x86, disabled or never enabled on all others
2018-11-30 11:38:19 +01:00
Martin Kroeker
326d394a0f
Add get_num_procs implementation for AIX
...
(and copy HAIKU implementation to the non-TLS version of the code as well)
2018-10-31 18:38:22 +01:00
Andrew
3439158dea
address #1782 2nd loop
2018-10-03 21:20:50 +02:00
Martin Kroeker
1ad1e79062
Catch inadvertent USE_TLS=0 declaration
...
for #1766
2018-09-19 18:03:43 +02:00
Martin Kroeker
b402626509
Do not use the new TLS code for non-threaded builds even if USE_TLS is set
...
Workaround for #1761 as that exposed a problem in the new code (which was intended to speed up multithreaded code only anyway).
2018-09-16 12:43:36 +02:00
Martin Kroeker
b55690a659
typo fix
2018-08-26 11:31:07 +02:00
Martin Kroeker
b902a40986
Rewrite glibc version check
2018-08-26 11:18:02 +02:00
Martin Kroeker
5991d1a6cd
Update memory.c
2018-08-25 22:12:40 +02:00
Martin Kroeker
b1b743f434
Merge branch 'develop' into interim033
2018-08-25 19:45:19 +02:00
Martin Kroeker
fd42ca462d
Combo of default pre-0.3.1 memory.c and band-aided version of PR1739
2018-08-25 19:35:16 +02:00
Zoltán Mizsei
6463bffd59
Haiku supporting patches
2018-08-02 20:49:14 +02:00
Martin Kroeker
8ef7d4fb54
Merge pull request #1706 from oon3m0oo/develop
...
Fix #1705 where we incorrectly calculate page locations.
2018-08-02 18:53:34 +02:00
Craig Donner
6400868e55
Fix #1705 where we incorrectly calculate page locations.
...
Since we now use an allocation size that isn't a multiple of PAGESIZE, finding
the pages for run_bench wasn't terminating properly. Now we detect if we've
found enough pages for the allocation and terminate the loop.
2018-08-02 16:21:19 +01:00
Martin Kroeker
66fcdd5be8
Merge pull request #1695 from martin-frbg/issue1692
...
Unset memory table entry, not just the local pointer to it on shutdown
2018-07-22 16:34:09 +02:00
Martin Kroeker
43ac839c16
Unset memory table entry, not just the temporary pointer to it on shutdown
...
to fix crash with multiple instances of OpenBLAS, #1692
2018-07-22 09:19:19 +02:00
Martin Kroeker
7ba5936ecd
Merge pull request #1688 from martin-frbg/issue1673
...
Temporarily disable special handling of OPENMP thread memory allocation
2018-07-19 19:03:45 +02:00
Martin Kroeker
b14f44d2ad
Temporarily disable special handling of OPENMP thread memory allocation
...
for issue #1673
2018-07-19 08:57:56 +02:00
Martin Kroeker
a49203b48c
Double MAX_ALLOCATING_THREADS to fix segfaults with Go and Octave
...
for #1641
2018-07-03 17:35:54 +02:00
Martin Kroeker
4e9c34018e
Fix apparent off-by-one error in calculation of MAX_ALLOCATING_THREADS
...
fixes #1641
2018-06-30 23:57:50 +02:00
Craig Donner
28c28ed275
Fix data races reported by TSAN.
2018-06-21 16:41:02 +01:00
oon3m0oo
a399d00425
Further improvements to memory.c. ( #1625 )
...
- Compiler TLS is now used only used when the compiler supports it
- If compiler TLS is unsupported, we use platform-specific TLS
- Only one variable (an index) is now in TLS
- We only access TLS once per alloc, and never when freeing
- Allocation / release info is now stored within the allocation itself, by
over-allocating; this saves having external structures do the bookkeeping, and
reduces some of the redundant data that was being stored (such as addresses)
- We never hit the alloc lock when not using SMP or when using OpenMP (that was
my fault)
- Now that there are fewer tracking structures I think this is a bit easier to
read than before
2018-06-20 22:04:03 +02:00