- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[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?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would you like to provide the code sample that causes this offload error? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes the errors disappear when I use a single thread for offloading. Thanks for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps you are experiencing the same issue as was reported in the ealier thread here: http://software.intel.com/en-us/forums/topic/394418
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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]

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