icpc 13.1.1.163 fails to compile a simple openMP source.

icpc 13.1.1.163 fails to compile a simple openMP source.

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

30 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

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

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"

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.

>>...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.

>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.

Attachments: 

AttachmentSize
Download openmptes.cpp128 bytes

>>>>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.

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.

>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/c...

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

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".

>>>>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.

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

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.

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!
...

>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.

>>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.

>>...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.

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.

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?

Sergey,

Try cl with: #pragma omp parallel for schedule ( foobar )

Is cl quiet? If it is, then your report is no confirmation that schedule ( auto ) is supported by cl.

Jim Dempsey

www.quickthreadprogramming.com

I will try some time later. Jim, How should I declare the foobar variable?

>Sergey,
Thank you very much for your tests.
It's confirmed that, at least intel 13.1.0.149, schedule(auto) works well,
although I did not recieve the warning about #pragma...
BTW, I'm confusing related to which version of the openMP (3.0, 3.1, and/or 4.0) is used in the intel 13.1.1....

>TimP
Thank you very much for your valuable opinion.
>omp schedule(auto) is one of those facilities which were postponed
If so, unfortunately, should I wait a release of 14.0.0 or later...?
Or, schedule(runtime) and OMP_SCHEDULE seems to work fine for
what I want to do although many code in my appication are needed to be modified.

I'm expecting to see a more authoritative tabulation of which OpenMP features appeared when.  It does appear that the 2013 update 2 and 3 compilers fairly well completed implementation of openmp 3.0.  I'll try my own schedule(auto) case to see if it works with update 3 or some combination of compiling with one and run time shared libraries of the other, of which I've already seen an instance.

I ran a short benchmark including 3 exampes of schedule(auto) on a single architecture with all combinations of 2013 update 2,3, and beta compilers and the corresponding OpenMP libraries. It looks like schedule(auto) has worked well in such simple cases from update 2 on.

Object files made with update 3 didn't work with the other versions and had to be rebuilt.

>>... I'm confusing related to which version of the openMP (3.0, 3.1, and/or 4.0) is used in the intel 13.1.1...

Take a look at properties of libiomp5md module or Release Notes for the version of Intel C++ compiler you're using. I don't think it has to be OpenMP version 3.0 or 4.0.

The case under discussion here seems to be one where an OpenMP 3.0 capability wasn't fully implemented until some 2013 update.  collapse is another where important cases first worked in update 2. 

max/min reduction hasn't yet worked for me, even though the parallel version of it is in OpenMP 3.1.  An Intel presentation I saw recently claimed that it won't be standardized until OpenMP 4.0 is final.Of course, that's correct in reference to the #pragma omp simd reduction(max: which I don't think is available yet in any released or beta compiler.

In principle, #pragma omp parallel simd reduction could be used to simplify cases where it's currently best to write nested loops (outer parallel, inner vectorizable) with the best outer loop strategy differing according to the number of threads

#pragma omp simd safelen(32) is an OpenMP 4.0 feature which works better than the non-standard #pragma simd vectorlength, for the compiler versions which support it, which apparently go back to 2013 update 2.  I'm wondering whether to post this update in my public version.

My colleagues have agreed with me that there is justification for the confusion mentioned above, and I'm hoping for some documentation to shed light on it.  One would expect that interrogation of your OpenMP as to which version it supports would imply that all features of the reported version are present (at least to the extent that the application doesn't break when correct syntax is used).  That hasn't been true of all past versions. 

A full implementation of OpenMP 4.0 isn't advertised even for 14.0 compilers, but publicity for partial implementation to a greater extent than 2013 update 3 seems to be on the way.

Oh, #pragma omp simd safelen is ignored for some target settings such as -msse4.1 but observed for -mavx.

Dear all,

Thank you for your valuable discussions.
I tried to compile the code by icpc 13.1.2 because I got a notification of release of the 13.1.2 in this morning
Then, I succeeded to compile!!!

So, I will use the 13.1.2 instead of 13.1.1.

Thank you very much again
Best regards,
Mikiya

Login to leave a comment.