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

icpc 13.1.1.163 fails to compile a simple openMP source.

mikiya_fujii
Beginner
1,333 Views
Hi. I met an error to compile a simple openMP source with icpc 13.1.1.163 Build 20130313 although icpc 12.1.1.256 Build 20111011 works well. The error I met is following: openmpTes.cpp(4): error: syntax error in omp clause #pragma omp parallel for schedule(auto) ^ compilation aborted for openmpTes.cpp (code 2) Does this error mean a bug or my failures in install of 13.1.1? The source code (openmpTescpp) is following: #include int main() { #pragma omp parallel for schedule(auto) for(int i=0; i<5; i++){ } return 0; } The command I used is "$ icpc -openmp -O0 openmpTes.cpp" Information about my HD and OS: I'm using the icpc on the 64 bits Ubuntu 12.04 LTS. This Ubuntu is running on the Windows 7(Professional, 64-bit 6.1.7601, Service Pack 1) through the VMware(R) Player (4.0.4 build-744019). The processor of my laptop is "Intel Core i5-2520M CPU 2.50GHz*2". Welcome any comments Mikiya
0 Kudos
29 Replies
bernaske
New Contributor I
1,043 Views

Hi Fuji,

i have your sample compiler on openSUSE 12.3 64 Bit Linux with a i7-950 as compiler i use the new 2013 SP1 Version 14.0.00

from compiler , i use the same options, no problems no error message, compile successful

regards

Franz

0 Kudos
Armando_Lazaro_Alami
1,043 Views

The  #include  is empty ?  or this is not the exact source code ?

0 Kudos
SergeyKostrov
Valued Contributor II
1,043 Views
There is an issue with edit control and it simply doesn't display a content which is inside of arrow-left and arrow-right characters. I always use "someheader.h" instead, like: #include "someheader.h"
0 Kudos
TimP
Honored Contributor III
1,043 Views

I hadn't seen schedule(auto) used before; I don't find it addressed in Intel documentation.  OpenMP 3.0 has been getting some corrections in Intel compilers just this year.  Some OpenMP 3.1 features may be completed in 2013 SP1 along with a beginning of OpenMP 4.0. I've already harped too often on this confusion about which compiler versions support how much of each OpenMP standard.  The good news is that with sponsorship by Intel of part of OpenMP 4.0, OpenMP should be getting renewed emphasis.

0 Kudos
SergeyKostrov
Valued Contributor II
1,043 Views
>>...Does this error mean a bug or my failures in install of 13.1.1? It doesn't look like a problem with installation and something is wrong with compilation ( possibly a bug ). I'll do a verification, however it will be on a Windows platform, and post my results.
0 Kudos
mikiya_fujii
Beginner
1,043 Views
>The #include is empty ? or this is not the exact source code ? Tthis is a my mistake as noted by Sergei. So, I re-write the source code in the way suggested by Sergei: #include "omp.h" int main() { #pragma omp parallel for schedule(auto) for(int i=0; i<5; i++){ } return 0; } PS. My code is also attached.
0 Kudos
SergeyKostrov
Valued Contributor II
1,043 Views
>>>>The #include is empty ? or this is not the exact source code ? >> >>Tthis is a my mistake Regarding the issue with edit control: This is Not your mistake and it is a well known and well outstanding issue. I'll follow up later and Thanks for reporting the problem with OpenMP.
0 Kudos
mikiya_fujii
Beginner
1,043 Views

Sergey,
>I'll do a verification, however it will be on a Windows platform, and post my results.
Thank you! I'm looking forward your verification and posts.

0 Kudos
mikiya_fujii
Beginner
1,043 Views
>I hadn't seen schedule(auto) used before; I don't find it addressed in Intel documentation. The schedule(auto) is written in the Intel documentations (see "Load Balancing and Loop Scheduling") in http://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-872C664D-7F50-4BE2-9422-3EBE6595FB40.htm
0 Kudos
mikiya_fujii
Beginner
1,043 Views
Hi Franz, >i have your sample compiler on openSUSE 12.3 64 Bit Linux with a i7-950 as compiler i use the new 2013 SP1 Version 14.0.00 Thank you for your tests. I did not know about the 14.0.0. I will check my license whether I can use it or not. Mikiya
0 Kudos
mikiya_fujii
Beginner
1,043 Views
I tried to compile the source with same command on another environment. But, this trial also failed. The new environment is 32 bits Ubuntu 12.04 LTS running on the Windows 7(Professional, 32-bit 6.1.7601, Service Pack 1) through the VMware(R) Player (4.0.4 build-744019). The processor of my desktop is "Intel Core 2 Quad CPU Q9550 2.83GHz*4".
0 Kudos
SergeyKostrov
Valued Contributor II
1,043 Views
>>>>i have your sample compiler on openSUSE 12.3 64 Bit Linux with a i7-950 as compiler i use >>>>the new 2013 SP1 Version 14.0.00 >> >>Thank you for your tests. I did not know about the 14.0.0. It gets a little bit confusing. What C++ compiler are you talking about? Intel or GCC? Please clarify.
0 Kudos
bernaske
New Contributor I
1,043 Views

Hi Sergey,

oh, i mean the following compiler

inux-cuda55:~ # icc --version
icc (ICC) 14.0.0 20130417
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.

linux-cuda55:~ # icpc --version
icpc (ICC) 14.0.0 20130417
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.

linux-cuda55:~ #
from the new Intel  C++ and Fortran Composer XE 2013 SP1 Beta Program

Franz

0 Kudos
TimP
Honored Contributor III
1,043 Views

The beta agreements usually specify that you won't discuss on public forums, but instead use premier.intel.com support.  I didn't read this one carefully either.

0 Kudos
SergeyKostrov
Valued Contributor II
1,043 Views
Sorry for one more follow up. >>The beta agreements usually specify that you won't discuss on public forums, but instead use premier.intel.com support. If this is the case then this is an exact quote: ... - Submit any issues or feedback via Intel® Premier Support early and often! ...
0 Kudos
mikiya_fujii
Beginner
1,043 Views

>It gets a little bit confusing. What C++ compiler are you talking about? Intel or GCC? Please clarify.

I'm talking about the intel C++ 13.1.1. 

Besides, I can not get the C++ 14.0.0 because I'm not beta user.

0 Kudos
SergeyKostrov
Valued Contributor II
1,043 Views
>>I'm talking about the intel C++ 13.1.1. >> >>Besides, I can not get the C++ 14.0.0 because I'm not beta user. Thanks for clarification and I'll let you know results of my investigation.
0 Kudos
SergeyKostrov
Valued Contributor II
1,043 Views
>>...I'll let you know results of my investigation... Here are results ( on Windows XP 32-bit and Windows 7 64-bit ): In overall, there is a warning in all three test cases and there is no compilation error ( a modified test case provided ). [ Windows XP - Output with Version 12.1.7.371 - 32-bit ] ..\Test>icl.exe /MD Test2.cpp Intel(R) C++ Compiler XE for applications running on IA-32, Version 12.1.7.371 Build 20120928 Copyright (C) 1985-2012 Intel Corporation. All rights reserved. Test2.cpp Test2.cpp(5): warning #161: unrecognized #pragma #pragma omp parallel for schedule ( auto ) ^ Microsoft (R) Incremental Linker Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. -out:Test2.exe Test2.obj [ Windows 7 - Output with Version 13.1.0.149 - 32-bit ] ..\Test>icl.exe /MD Test2.cpp Intel(R) C++ Compiler XE for applications running on IA-32, Version 13.1.0.149 Build 20130118 Copyright (C) 1985-2013 Intel Corporation. All rights reserved. Test2.cpp Test2.cpp(44): warning #161: unrecognized #pragma #pragma omp parallel for schedule ( auto ) ^ Microsoft (R) Incremental Linker Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. -out:Test2.exe Test2.obj [ Windows 7 - Output with Version 13.1.0.149 - 64-bit ] ..\Test>icl.exe /MD Test2.cpp Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.1.0.149 Build 20130118 Copyright (C) 1985-2013 Intel Corporation. All rights reserved. Test2.cpp Test2.cpp(31): warning #161: unrecognized #pragma #pragma omp parallel for schedule ( auto ) ^ Microsoft (R) Incremental Linker Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. -out:Test2.exe Test2.obj */ #include "omp.h" int main( void ) { #pragma omp parallel for schedule ( auto ) for( int i = 0; i < 5; i++ ) { volatile int iX = -1; } return ( int )0; } It looks like that #pragma directive is Not supported by recent versions of Intel C++ compiler.
0 Kudos
TimP
Honored Contributor III
1,043 Views

or that omp schedule(auto) is one of those facilities which were postponed until some of the OpenMP 4.0 features began to come in.

13.1.1 has been claimed to have introduced some OpenMP 3.x and 4.0 features, but I didn't find any new ones.

I have seen a presentation which claimed that certain OpenMP 3.0 and 3.1 features were part of OpenMP 4.0.  I guess technically, that's correct, except for the point that a compiler which doesn't support them shouldn't claim to be 3.0/3.1. This adds to the confusion about which ones were or will be implemented in which version.

omp schedule(auto) appears to work both in the schedule clause and under OMP_SCHEDULE in more recent versions.

collapse should have been fully implemented in 13.1.0.149.

0 Kudos
SergeyKostrov
Valued Contributor II
928 Views
This is how compilation output looks like for Microsoft C++ compiler from Visual Studio 2005 ( you know that Microsoft has "frozen" OpenMP at version 2.0 for a long time ): ..\Test>cl.exe /MD Test2.cpp Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. Test2.cpp Microsoft (R) Incremental Linker Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. /out:Test2.exe Test2.obj The test case is the same ( see my previous post / 2nd from this one ). As you can see there are No any errors or warning messages. Would you consider it as a prove that investigation is needed because something is wrong and it is Not related to OpenMP versions 3.0 or 4.0?
0 Kudos
Reply