Return information about OpenMP support for this machine.
Value
A list with information about the OpenMP support on your machine.
The first few elements come from the OpenMP library directly:
num_proc
,max_threads
,thread_limit
; these correspond to a call to the functionomp_get_<name>()
in C andopenmp_version
which is the value of the_OPENMP
macro.A logical
has_openmp
which isTRUE
if it looks like runtime OpenMP support is availableThe next elements tell you about different sources that might control the number of threads allowed to run:
mc.cores
(from the R option with the same name),OMP_THREAD_LIMIT
,OMP_NUM_THREADS
,MC_CORES
(from environment variables),limit_r
(limit computed against R-related control variables),limit_openmp
(limit computed against OpenMP-related variables) andlimit
the smaller oflimit_r
andlimit_openmp
Finally, if you specified
check_compile = TRUE
, the logicalhas_openmp_compiler
will indicate if it looks like we can compile with OpenMP.
See also
dust_openmp_threads()
for setting a polite number of
threads.
Examples
dust_openmp_support()
#> $num_procs
#> [1] 4
#>
#> $max_threads
#> [1] 4
#>
#> $thread_limit
#> [1] 2147483647
#>
#> $openmp_version
#> [1] 201511
#>
#> $has_openmp
#> [1] TRUE
#>
#> $mc.cores
#> [1] NA
#>
#> $OMP_THREAD_LIMIT
#> [1] NA
#>
#> $OMP_NUM_THREADS
#> [1] NA
#>
#> $MC_CORES
#> [1] NA
#>
#> $limit_r
#> [1] 1
#>
#> $limit_openmp
#> [1] 4
#>
#> $limit
#> [1] 1
#>