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

Intel 19 c++ compiler crashed for the openmp code

Frank_ESI
Beginner
1,939 Views

I met an error when I try to compile my code. The error is:

": internal error: ** The compiler has encountered an unexpected problem.
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.

compilation aborted for a.cpp (code 4)

This is the command I used:

icpc -qopenmp -g -o a.cpp.o -c a.cpp

icpc --version
icpc (ICC) 19.1.0.166 20191121
Copyright (C) 1985-2019 Intel Corporation. All rights reserved.

Here is my code of a.cpp:

namespace AAAA {

void setP(int n) {
return;
}

class TEST {
public:
void f();
};
void TEST::f(){
int i, n = 0;
int* pts[8];
#pragma omp parallel for default (shared) private(i, pts)
for(i=0;i<10000;i++)
{
#pragma omp critical
{
try{ setP(n);}
catch (...){
}
}
}
}
}

 

0 Kudos
12 Replies
Frank_ESI
Beginner
1,919 Views

This is another crash situation. This one happens on windows 64 bit with visual studio 2019 and Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.0.166 Build 20191121.

 

The command is: 

"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020\windows\bin\Intel64\icl.exe" /c /Qm64 /nologo /W3 /MP /O2 /Ob2 /D NDEBUG /D _WINDLL /D _MBCS /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"Release\\" /Fd"Release\vc142.pdb" /TP -Qopenmp intel_window_fail.cpp

 

 

0 Kudos
VidyalathaB_Intel
Moderator
1,905 Views

Hi,

Thanks for reaching out to us.

Could you please try using icpx compiler instead of icpc compiler

Meanwhile we will look into this issue internally. we will get back to you soon.

Regards,

Vidya.


0 Kudos
Frank_ESI
Beginner
1,889 Views
0 Kudos
Frank_ESI
Beginner
1,875 Views

On Intel compiler 2020.0.166, icpx works. But if I use 2020.4.304, it failed with:

clang++: error: unsupported option '-qopenmp'.

0 Kudos
Viet_H_Intel
Moderator
1,896 Views

Can you add either -O1, -O2 or -O3 as a workaround for Linux case and use /Od for Windows case?

Thanks,

 

0 Kudos
Frank_ESI
Beginner
1,891 Views

On windows case, it failed in /Od too.

0 Kudos
Frank_ESI
Beginner
1,888 Views

On Linux, O1, O2, and O3 all works.

0 Kudos
Viet_H_Intel
Moderator
1,881 Views

Not sure if you removed /O2 and /Ob2 on Windows.

and icx.exe should work for your Windows case too.

 

 

0 Kudos
Viet_H_Intel
Moderator
1,868 Views

Yes, something is wrong with that version. Can you use other versions?

$ icpx -fopenmp -g -c a.cpp

$ icpx -qopenmp -g -c a.cpp

 

0 Kudos
Viet_H_Intel
Moderator
1,629 Views

Can you confirm icpx worked for your case? We would like to close this thread if icpx compiles it.


Thanks,


0 Kudos
Viet_H_Intel
Moderator
1,425 Views

Please let us know if icpx works for you. We would like to close this thread.

Thanks,


0 Kudos
Viet_H_Intel
Moderator
976 Views

Not sure if you already knew, but Intel Classic Compiler will enter "Legacy Product Support" mode, signaling the end of regular updates. Please refer to the article bellow for more details.

https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.h...

 

For that reason, Developer isn't plan to to fix this in Classic compiler. Can you migrate to icx/icpx?

We are going to close this case. If you have any questions/concerns, please create a new thread.

Thanks,

Viet

 

0 Kudos
Reply