Skip to content

R_DATATABLE_NUM_THREADS env var alone ignored #4514

@jangorecki

Description

@jangorecki

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions