Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7646 Discussions

Intel 19 c++ compiler crashed for the openmp code

Frank_ESI
Beginner
1,151 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,131 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

 

 

VidyalathaB_Intel
Moderator
1,117 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.


Frank_ESI
Beginner
1,101 Views
Frank_ESI
Beginner
1,087 Views

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

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

Viet_H_Intel
Moderator
1,108 Views

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

Thanks,

 

Frank_ESI
Beginner
1,103 Views

On windows case, it failed in /Od too.

Frank_ESI
Beginner
1,100 Views

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

Viet_H_Intel
Moderator
1,093 Views

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

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

 

 

Viet_H_Intel
Moderator
1,080 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

 

Viet_H_Intel
Moderator
841 Views

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


Thanks,


Viet_H_Intel
Moderator
637 Views

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

Thanks,


Viet_H_Intel
Moderator
188 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

 

Reply