I have a problem with transfer data from a Intel Xeon Phi coprocessor to host CPU. I try to implement a computation using offload model. At the beginning of my computation I transfer all data to a coprocessor (one array). After computation I want to transfer to a host processor only part of this array, but in result i get following error:
offload error: data transfer (base=0x75654640, size=7896016) not subset of existing allocation (base=0x75654640, size=4512008)
Here is a part of source code:
array_Dc = _mm_malloc(...);
...
#pragma offload target(mic : micZero) \
in(array_Dc : length(size) alloc_if(0) free_if(0)) \
out(array[micBegin : micEnd] : alloc_if(0) free_if(0)
{
//...
}
In this case size of this array = 564001, micBegin = 423001, micEnd = 564001. I need to transfer the data because they are used by CPU. What is a problem? How to resolve it?