Skip to content

Commit

Permalink
Use N-1 cores
Browse files Browse the repository at this point in the history
  • Loading branch information
danpetry committed Jan 14, 2025
1 parent 63aa7dd commit 81363c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ if [[ "${CI}" == "github_actions" ]]; then
# cirun-openstack-gpu-2xlarge, which has 32GB RAM, 8 CPUs
export MAX_JOBS=4
else
export MAX_JOBS=${CPU_COUNT}
# Leave a spare core for other tasks. This may need to be reduced further
# if we get out of memory errors.
export MAX_JOBS=$((CPU_COUNT > 1 ? CPU_COUNT - 1 : 1))
fi

if [[ "$blas_impl" == "generic" ]]; then
Expand Down

0 comments on commit 81363c0

Please sign in to comment.