Shouldn't we default num_proc_percent to 100% when num_threads is provided?
R_DATATABLE_NUM_THREADS=2 Rscript -e 'data.table::getDTthreads(T)'
# omp_get_num_procs() 2
# R_DATATABLE_NUM_PROCS_PERCENT unset (default 50)
# R_DATATABLE_NUM_THREADS 2
# omp_get_thread_limit() 2147483647
# omp_get_max_threads() 2
# OMP_THREAD_LIMIT unset
# OMP_NUM_THREADS unset
# RestoreAfterFork true
# data.table is using 1 threads. See ?setDTthreads.
#[1] 1
|
ans = imax(ans*perc/100, 1); |
Shouldn't we default num_proc_percent to 100% when num_threads is provided?
data.table/src/openmp-utils.c
Line 44 in d3bd408