From 913f79d4898d3529a9f2423a5aa792f8c96ccd30 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 9 Mar 2021 21:47:50 +0100 Subject: [PATCH] fix behavior of JULIA_EXCLUSIVE to agree with documentation (#39961) --- src/threading.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/threading.c b/src/threading.c index 726b01145d0b1..01fe98e041a87 100644 --- a/src/threading.c +++ b/src/threading.c @@ -425,8 +425,8 @@ void jl_start_threads(void) // do we have exclusive use of the machine? default is no exclusive = DEFAULT_MACHINE_EXCLUSIVE; cp = getenv(MACHINE_EXCLUSIVE_NAME); - if (cp) - exclusive = strtol(cp, NULL, 10); + if (cp && strcmp(cp, "0") != 0) + exclusive = 1; // exclusive use: affinitize threads, master thread on proc 0, rest // according to a 'compact' policy