# HG changeset patch # User Markus Mützel # Date 1641064871 -3600 # Node ID 9d6cbb229b0f0748c7038a661242276b68a97a17 # Parent e26ff3ad0f6063b048744528b24431a3a4abc1a5 octave-launch: Limit number of OpenBLAS threads to a maximum of 24. diff -r e26ff3ad0f60 -r 9d6cbb229b0f installer-files/octave-launch.c --- a/installer-files/octave-launch.c Sat Jan 01 10:43:05 2022 -0500 +++ b/installer-files/octave-launch.c Sat Jan 01 20:21:11 2022 +0100 @@ -268,6 +268,13 @@ size_t num_threads; num_threads = get_num_physical_cores (); + // Setting OPENBLAS_NUM_THREADS to something higher than what NUM_THREADS + // was set to when OpenBLAS was configured, can lead to errors. + // FIXME: Can/should we get that number from the library? +#define MAX_NUM_THREADS 24 + if (num_threads > MAX_NUM_THREADS) + num_threads = MAX_NUM_THREADS; + if (num_threads > 0) { #define THREADS_SZ 64