none
Windows Server 2012 OpenMP cant use all threads RRS feed

  • Question

  • I am trying to get max CPU usage through OpenMP on Windows 2012, but I can't get the usage of the hyper threads or all the logical processors.

    Example - Dual Processor Xeon e5-2683 (28 cores, 56 logical processors)

    If I call "omp_get_max_threads" it returns 28.

    I can't find a call that will return the logical processor count. "omp_get_max_threads" should do this.

    I can call "omp_set_num_threads(56)" and then it returns 56.

    However, even after doing this it seems to still only use 28 theads. (CPU usage ~60% same as with 28 threads)

    What is the correct procedure for maxing out CPU usage with OpenMP in Windows server 2012?


    Thursday, March 10, 2016 5:15 PM

Answers

  • We figured out the answer, it has to do with the bios settings, something to do with Numa vs. Interleaving.  Once we changed it to Interleaving it used all the processors.
    Tuesday, March 15, 2016 1:59 PM

All replies

  • You want to get CPU usage or get max threads number? The OpenMP C and C++ application program interface lets you write applications that effectively use multiple processors. The result of omp_get_max_threads is an integer that is equal to or greater than the number of threads that would be available if a parallel region without num_threads were defined at that point in the code. So it depends on your set, use omp_set_num_threads, #pragma omp parallel num_threads or the OMP_NUM_THREADS environment variable will all effect the result of omp_get_max_threads.

    Friday, March 11, 2016 1:47 AM
  • We figured out the answer, it has to do with the bios settings, something to do with Numa vs. Interleaving.  Once we changed it to Interleaving it used all the processors.
    Tuesday, March 15, 2016 1:59 PM