Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

errno set from openmp region?

Pramod_K_
Beginner
241 Views

Hi,

Could you explain why errno is set for openmp region? I tried with icc 13 and 14:

#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <omp.h>

int main()
{
    errno = 0;

    #pragma omp parallel
    {
        printf("\n I am thread %d", omp_get_thread_num());
    }

    printf("\n Error Id: : %d ,  Descr: %s\n ", errno, strerror( errno ));
}

I get following output:

 I am thread 0
 I am thread 1
 I am thread 2
 I am thread 3
 Error Id: : 14 ,  Descr: Bad address

 

Thanks!

0 Kudos
1 Reply
MalReddy_Y_Intel
Employee
241 Views

Hi Pramod,

I have escalated this issue to compiler development team, I will inform you when there is an update.

Thanks for reporting your issue.

Reddy

 

0 Kudos
Reply