- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi I create a new thread and lanch offload code in this thread but I get this error code
offload error: cannot get function handles on the device 8117264 (error code 14)
The code likes as followings:
host code
if (pthread_create(&d_thread, NULL, RunDevice, d_data))
{
printf("\nCannot create device thread!\n");
return;
}
thread code
void *RunDevice(void *ptr)
{
//Allocate memory in Phi
#pragma offload_transfer target(mic:0) in(udata:length(2*height*width) ALLOC)
#pragma offload_transfer target(mic:0) in(fdata:length(DATASEGMENT*height*width) ALLOC)
printf("here4\n");
double t0 = WhenCPU();
#pragma offload target(mic:0) nocopy(udata:length(2*width*height) REUSE) nocopy(fdata:length(DATASEGMENT*width*height) REUSE)
{
tvdenoise_d(udata,fdata,width, height, mu, lambda, outerIter);
}
double t00 = WhenCPU();
printf("First running time = %f\n", t00 - t0);
}
what happens?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This looks like a pthread issue on the host.
Insert #if 0...#endif in the body of your RunDevice (and anywhere else you have offloads).
Essentially conditionalize out all the MIC code.
Then compile the program, and see if you get the same error. If you do then you are likely linking in the wrong library.
Jim Dempsey

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