cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
298 Views
Registered: ‎06-14-2018

CLI execution of Sobel example, ERROR: std::bad_alloc, Error calling cl::Buffer

Jump to solution

Hi,

I compiled a working example of the unmodified Xilinx edge detection example in the Nimbix cloud.

It runs on the hardware, within SDx, and works.

Unfortunately, when running under command line, I got this error:

Creating Buffers...
ERROR: std::bad_alloc
../src/edge.cpp:134 Error calling cl::Buffer devOutput(context, CL_MEM_USE_HOST_PTR | CL_MEM_WRITE_ONLY, ((img_size-1)/32 + 1)*sizeof(cl_uint16), outimage.data(), &err), error code is: -6

Any idea welcome.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
276 Views
Registered: ‎07-16-2008

回复: CLI execution of Sobel example, ERROR: std::bad_alloc, Error calling cl::Buffer

Jump to solution

This looks a general exception for allocating storage. Could it be due to small memory limit?

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
277 Views
Registered: ‎07-16-2008

回复: CLI execution of Sobel example, ERROR: std::bad_alloc, Error calling cl::Buffer

Jump to solution

This looks a general exception for allocating storage. Could it be due to small memory limit?

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

Highlighted
Explorer
Explorer
252 Views
Registered: ‎06-14-2018

回复: CLI execution of Sobel example, ERROR: std::bad_alloc, Error calling cl::Buffer

Jump to solution

Indeed, I was executing the host.exe, kernel and also the data file directly from the persistent storage on a cloud.

I had to transfer this stuff to the temporary workspace in order to make it work.

Thanks for your time.

0 Kudos