Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and GDB*
400 Discussions

Performance gap between oepnmp nested parallelism under Linux and windows

dtzAlex
Beginner
294 Views

In my program, I use nested parallelism. Using Microsoft's MSVC compiler on Windows system, I have achieved good performance. However, under the gcc compiler on Linux, the performance of nested parallelism seems to be relatively poor, and the completion time is about 40% worse than that of windows. My server has two physical CPUs, 48 cores and 96 threads, and I have six parallel sections outside. An obvious performance is that on Linux system, if I open more than 4 threads in the nested parallel, the system performance will decline sharply, but not on windows. Linux version is 3.10, CentOS 7, and GCC version is 4.8 1. So I wonder if there is something wrong with my settings, or the difference between gcc compiler and MSVC compiler, or the difference between Linux and windows system?How can I solve this problem? My code is as follows:

omp_set_dynamic(1);
omp_set_nested(1);
#pragma omp parallel sections
{
#pragma omp section
{
func()
}
#pragma omp section
{
func()
}
#pragma omp section
{
func()
}
#pragma omp section
{
func()
}
#pragma omp section
{
func()
}
#pragma omp section
{
func()
}
}

void func()
{
#pragma omp parallel for schedule(static) num_threads(4)
        for(int k=0;k<1280000000;k++)
        {
        }
}
0 Kudos
3 Replies
HemanthCH_Intel
Moderator
270 Views

Hi,

 

Thanks for reaching out to us.

 

As we can see that you are comparing between gcc compiler in Linux and MSVC compiler in windows, this forum is intended to support the queries related to the Intel oneAPI DPC++ and other Intel oneAPI products. So, could you please let us know whether you have any issues with Intel oneAPI products?

 

Thanks & Regards,

Hemanth.

 

HemanthCH_Intel
Moderator
238 Views

Hi,

 

We haven't heard back from you. Could you please let us know whether you have any issues with Intel oneAPI products? If not, could you please let us know whether we can close this thread from our end?

 

Thanks & Regards,

Hemanth.

 

HemanthCH_Intel
Moderator
222 Views

Hi,

 

We haven't heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.

 

Thanks & Regards,

Hemanth.

 

Reply