Skip to content

Commit

Permalink
determine number of cores automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Mar 18, 2024
1 parent fa1be94 commit b8d4920
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/run_julia
Original file line number Diff line number Diff line change
Expand Up @@ -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)}')
Expand Down

0 comments on commit b8d4920

Please sign in to comment.