omp_get_num_procs returns the number of processors in OS reports, and since the hyper-threading core reports itself as 2 processors, the dual-core hyper-threading chip will be reported as 4 processors.
omp_get_max_threads returns most threads that will be used in a parallel area of ββthe code, so it makes sense that most threads that will be used will have the number of available CPUs.
source share