From b8d492062582044f4645a7b3adec3495963eb955 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Mon, 18 Mar 2024 10:06:28 +0100 Subject: [PATCH] determine number of cores automatically --- bin/run_julia | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/run_julia b/bin/run_julia index 2c11ebfe..7ef311a1 100755 --- a/bin/run_julia +++ b/bin/run_julia @@ -10,9 +10,12 @@ fi export MPLBACKEND=qt5agg -FAST_CORES=7 +if command -v nproc &> /dev/null; then + FAST_CORES=$(($(nproc) / 2 - 1)) +else + FAST_CORES=3 # default value +fi -# instead of 7, use the number of fast CPU cores you have minus one GCT="--gcthreads=$FAST_CORES,1" julia_version=$(julia --version | awk '{print($3)}')