- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to the OpenMP spec one can specify array sections as
[lower-bound:length] or [lower-bound:] or [:length] or [ : ]
However if one tries one except [:] the compiler complains about a missing "]" instead of detecting the number or variable used.
Is this known and going to be fixed?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm coding for an Intel MIC (KNC) and use icc 14.0.2 (OpenMP 4)
[lower-bound:length] didn't work, but fortunately [:] did which is the most important one IMO
Which cases are there that only <=64MB of data transfer are allowed? This would be very annoying and might be a show-stopper for some programs.
I hope this is among the features that are implemented in icc 15.x. But I guess I have to stick to the current notation for now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,
The latest OpenMP-style array section syntax can only be used in OpenMP clauses and should be fully supported.
Can you please attach a small test case that you have which shows you have a problem with Array Sections? Appreciate much, for your help
Regards,
Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately I cannot reproduce the bug, when it complains about the "[lower-bound:length]" part.
But at least "[:length]" does not work:
#include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int size = 1000; int* values = (int*) malloc(sizeof(int)*size); #pragma omp target map(to:values[:size]) values[0] = 0; return EXIT_SUCCESS; }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Alexander for attaching the test case on the [:length] case. I tried it using the latest 14.0 version and yes it did error out. I also tried the latest 15.0 beta version of the compiler and it was successful. Can you try the beta version? You can read the sticky post on the beta package at the very top of this forum on how you can get the package.
I'll file this issue with the developers anyways on the failure of the test case with 14.0 version that you attached. I'll update you as soon as the product release (15.0) is out which contains a fix for this issue already, thanks.
_Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alex, well the issue you find with (length) is fixed in our code branch (14) and the next update (anytime soon) should contain the fix. I'll update you accordingly when the release is out, fyi.
_Kittur

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page