Software Archive
Read-only legacy content
17061 Discussions

OpenMP (icpc 15.0.6) weird behavior on MIC

King_Crimson
Beginner
403 Views

Dear forum, The toy code below returns "sum = 256" on my 5110P. Any thoughts on why oversubscription did not work? Thanks!

PS:

Driver Version : 3.5.1-1

MPSS Version : 3.5.1

icpc version 15.0.6

#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <iostream>


int main( int argc, char* argv[] )
{
    omp_set_num_threads(480);
    int sum = 0;

    #pragma omp parallel
    {
        #pragma omp atomic
        sum += 1;
    }

    std::cout << "sum = " << sum << std::endl;
    return 0;
}

 

0 Kudos
1 Solution
Andrey_C_Intel1
Employee
403 Views

The oversubscription does not work because of bug in the OpenMP runtime library. This bug is present in the only released library version 20150609 (you can check the version setting environment variable KMP_VERSION to 1 and looking at the error output).  Earlier releases as well as later releases do not have this bug.

Regards,
Andrey

View solution in original post

0 Kudos
1 Reply
Andrey_C_Intel1
Employee
404 Views

The oversubscription does not work because of bug in the OpenMP runtime library. This bug is present in the only released library version 20150609 (you can check the version setting environment variable KMP_VERSION to 1 and looking at the error output).  Earlier releases as well as later releases do not have this bug.

Regards,
Andrey

0 Kudos
Reply