]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Disable threaded mode in openblas by default
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 17 Sep 2017 07:48:42 +0000 (08:48 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 17 Sep 2017 07:48:42 +0000 (08:48 +0100)
src/rspamd.c

index 59bbb0144533914e9b120b2585dff13845e9f544..c6b1b20e07a671b30d92f246a25019575d7b0f03 100644 (file)
@@ -1162,6 +1162,10 @@ main (gint argc, gchar **argv, gchar **env)
        rspamd_main->cfg->libs_ctx = rspamd_init_libs ();
        memset (&signals, 0, sizeof (struct sigaction));
        other_workers = g_array_new (FALSE, TRUE, sizeof (pid_t));
+#ifdef WITH_TORCH
+       /* We don't need multithreaded BLAS mode, disable it by default */
+       setenv ("OPENBLAS_NUM_THREADS", "1", 0);
+#endif
 
        read_cmd_line (&argc, &argv, rspamd_main->cfg);