at least set threads number as 1, in case trainers number is larger than processors

updateWriteDocsCN
tensor-tang 7 years ago
parent 4fbba65626
commit a6f5f6efb6

@ -79,7 +79,10 @@ function threads_config() {
if [ -z $trainers ]; then
trainers=1
fi
threads=$((processors / trainers))
threads=$((processors / trainers))
if [ $threads -eq 0 ]; then
threads=1
fi
if [ -z "$OMP_NUM_THREADS" ]; then
export OMP_NUM_THREADS=$threads
fi

Loading…
Cancel
Save