From a373d0f107dd85b0bc711b36ef88ec27ec187296 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 15 Jul 2024 18:32:21 +0200 Subject: [PATCH] Improve the error message for thread creation failure --- driver/others/blas_server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/driver/others/blas_server.c b/driver/others/blas_server.c index 64130b0dd..765511d8c 100644 --- a/driver/others/blas_server.c +++ b/driver/others/blas_server.c @@ -595,6 +595,8 @@ int blas_thread_init(void){ struct rlimit rlim; const char *msg = strerror(ret); fprintf(STDERR, "OpenBLAS blas_thread_init: pthread_create failed for thread %ld of %d: %s\n", i+1,blas_num_threads,msg); + fprintf(STDERR, "OpenBLAS blas_thread_init: ensure that your address space and process count limits are big enough (ulimit -a)\n"); + fprintf(STDERR, "OpenBLAS blas_thread_init: or set a smaller OPENBLAS_NUM_THREADS to fit into what you have available\n"); #ifdef RLIMIT_NPROC if(0 == getrlimit(RLIMIT_NPROC, &rlim)) { fprintf(STDERR, "OpenBLAS blas_thread_init: RLIMIT_NPROC "