Software Archive
Read-only legacy content

Buffer Errors

c_s_
Beginner
998 Views

[cpp]offload error: cannot create buffer on device 0 (error code 16)

offload error: cannot create buffer on device 0 (error code 14)[/cpp]

I have scoured google looking for information on these two errors but I cannot find anything. Can anybody clarify what these errors mean and how they are caused? What would prevent creation of a buffer?

0 Kudos
8 Replies
Loc_N_Intel
Employee
998 Views

Would you like to provide the code sample that causes this offload error? Thank you.

0 Kudos
c_s_
Beginner
998 Views

I would if I had any idea what part of code the error was in, but since I have very little information on the error code I do not know what section of code to provide. I suspect it might have something to do with too many threads requesting offloads too fast

0 Kudos
Wendy__C_
Beginner
998 Views

My guess is that the error codes are actually Linux's errno. So 14 is EFAULT (bad address) and 16 is EBUSY (resource busy). I would start to reduce thread count (if possible) to see whether the problem goes away... Also check out your working directories (both on host and coprocessor) to see if there are files w/ "coilog" suffix - that file could provide more insights.  

-- Wendy (wendy.cheng@intel.com)

0 Kudos
Charles_C_Intel1
Employee
998 Views

Also do what you can to watch memory on the coprocessor (log in via ssh and run "top" and hope the offload shows up before it crashes).  It can be hard to see, but somethings this is also the result of running out of memory (which you can't even catch in the debugger).  Wendy's idea to reduce the number of threads is a good way to reduce the memory load for some algorithms (drop it to 1-2 threads as a quick first check).

Charles

0 Kudos
c_s_
Beginner
998 Views

Yes the errors disappear when I use a single thread for offloading. Thanks for the help.

0 Kudos
Charles_C_Intel1
Employee
998 Views

OK, now add a few back, watch TOP on the Xeon Phi side, and figure out how many you can run at once.  Hopefully it will be at least one or two threads per core.   If not, time to sit back and think about whether this problem is a good fit for Xeon Phi, at least as currently implemented.   Sorry.

Charles

0 Kudos
Kevin_D_Intel
Employee
998 Views

Perhaps you are experiencing the same issue as was reported in the ealier thread here: http://software.intel.com/en-us/forums/topic/394418

0 Kudos
c_s_
Beginner
998 Views

You're probably right. Anyway I worked around it by using offload_transfer and signaling individual threads with offload_wait.

 

(pseudocode)

[cpp]

#pragma offload_transfer (target(mic:0)) in(foo)

{

// do some offloaded work

}

#pragma offload_transfer (target(mic:0)) out(foo) signal(thread_id)

#pragma offload_wait (target(mic:0)) wait(thread_id)

[/cpp]

0 Kudos
Reply