I'm running a simple program with openmpacc in offloading mode. So in my target code I've got something like this:
#pragma omp target data map(to:VARIABLE[0:size])
#pragma omp target
When VARIABLE is not a pointer it compiles and runs correctly but when It is a pointer, it compiles and when running I got the following error:
"ERROR: Variables accessed via a pointer in a target region must be shaped using array sections e.g. map(to:ptr[start:size]). This is an implementation restric
tion in the current runtime and will be fixed in a future release"
1) Is there a way to map pointers like that or it is not implemented yet?
2) I also would like to know if the omp target update construct supported by TI OpenMP-acc is blocking or non-blocking?
I'm using an EVMk2h board and ti-processor-sdk-linux-rt-k2hk-evm-03.01.00.06.
I appreciate your help
This is an open issue. The workaround is to replicate the shaping of the array section on the target construct.
#pragma omp target map(to:VARIABLE[0:size])
It won't map it twice. The outer target data region will map it. The map clause on the inner target region will find the mapped variable and use it. The issue on having to repeat the map clause is related to how the compiler has to setup the pointer variable on the target device.
In reply to EricStotzer:
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.