Quantcast
Channel: Intel® Many Integrated Core Architecture
Viewing all articles
Browse latest Browse all 1347

Allocation overlaps with existing allocation?

$
0
0

Hi, all!

I am going to parallelize a program, so I replace a two-demensions array with a one-array like this(simplified):

float *ptr[N];
for (int i = 0; i < N; i++)
   ptr[i] = new float[M];

cblas_sgemm(......, ptr[i], x).

 

float *p = new float[N * M];
for (int i = 0; i < N; i++)
   ptr[i] = p + i * M;

#pragma offload target(mic) inout(p:length(N * M))
cblas_sgemm(....., p + i * M, x);

Then I got offload error: allocation overlaps with existing allocation". Maybe the array is a little big(~500M). I found that an Intel expert replied in other topic:

The larger size and offload allocation overlap error probably relate to exhausting available resources on the coprocessor.

But I tested a small program and proved that this size is OK, it didn't not caused problem...So I felt very confused about the error.Please give me some advises, thanks in advance!

 


Viewing all articles
Browse latest Browse all 1347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>