From 898212efcda215ccab3b46b4a645c8eda2ca7948 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 2 Aug 2021 14:50:14 +0200 Subject: [PATCH] Actually add the message to the TLS section --- driver/others/memory.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/driver/others/memory.c b/driver/others/memory.c index 500ec22..460a3d5 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -1291,7 +1291,12 @@ UNLOCK_COMMAND(&alloc_lock); return (void *)(((char *)alloc_info) + sizeof(struct alloc_t)); error: - printf("OpenBLAS : Program will terminate because you tried to allocate too many memory regions.\n"); + printf("OpenBLAS : Program will terminate because you tried to allocate too many TLS memory regions.\n"); + printf("This library was built to support a maximum of %d threads - either rebuild OpenBLAS\n", NUM_BUFFERS); + printf("with a larger NUM_THREADS value or set the environment variable OPENBLAS_NUM_THREADS to\n"); + printf("a sufficiently small number. This error typically occurs when the software that relies on\n"); + printf("OpenBLAS calls BLAS functions from many threads in parallel, or when your computer has more\n"); + printf("cpu cores than what OpenBLAS was configured to handle.\n"); return NULL; } -- 2.7.4