OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1664 Discussions

OpenCL module fail in Opencv3.0 (CentOS 7) official program (Ok in Windows)

然_魏_
Beginner
416 Views

Hi, there, I tried to use OpenCL module in OpenCV3.0, This is official program(under project sample-cpp-(EXAMPLE)facedetect)  and could run successfully on Windows 7 (VS2012),
It's Ok when
    ocl::setUseOpenCL(false);
However, when ocl::setUseOpenCL(true); or comment it out, error occurred:

Error Detail:
——————————————————————————————————————————

# ./facedetect

This program demonstrates the cascade recognizer. Now you can use Haar or LBP features.
This classifier can recognize many kinds of rigid objects, once the appropriate classifier is trained.
It's most known use is for faces.
Usage:
./facedetect [--cascade=<cascade_path> this is the primary trained classifier such as frontal face]
   [--nested-cascade[=nested_cascade_path this an optional secondary classifier such as eyes]]
   [--scale=<image scale greater or equal to 1, try 1.3 for example>]
   [--try-flip]
   [filename|camera_index]

see facedetect.cmd for one call:
./facedetect --cascade="../../data/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade="../../data/haarcascades/haarcascade_eye.xml" --scale=1.3

During execution:
    Hit any key to quit.
    Using OpenCV version 3.0.0

init done
In capture ...
OpenCV Error: Assertion failed (clEnqueueWriteBuffer(q, (cl_mem)u->handle, CL_TRUE, dstrawofs, total, alignedPtr.getAlignedPtr(), 0, 0, 0) >= 0) in upload, file /root/Documents/linux_opencv-3.0.0/modules/core/src/ocl.cpp, line 4960
terminate called after throwing an instance of 'cv::Exception'
  what():  /root/Documents/linux_opencv-3.0.0/modules/core/src/ocl.cpp:4960: error: (-215) clEnqueueWriteBuffer(q, (cl_mem)u->handle, CL_TRUE, dstrawofs, total, alignedPtr.getAlignedPtr(), 0, 0, 0) >= 0 in function upload

Aborted (core dumped)

——————————————————————————————————————————

 

Platform:
——————————————————————————————————————————
# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
      8  Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
# lspci -nn -s 00:02.0
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412]

(rev 06)

 

# python setup_inspector.py
Starting setup inspector version 1.0.3
 [ INFO ] Linux Kernel matches supported configuration - 3.10
 [ INFO ] Render nodes are not enabled in the system
 [ TIP ] Add kernel cmd line param - drm.rnodes=1 for va_media_sharing extension to be functional
 [ INFO ] 64 bit archtecture supported
 [ INFO ] i915 module is loaded
 [ INFO ] Linux Kernel i915 module contains vmap/userptr functionality
 [ INFO ] Linux Kernel i915 module contains i915_cmd_parser functionality
 [ INFO ] libIntelOpenCL found in package - /opt/intel/opencl/libIntelOpenCL.so
 [ INFO ] libIntelOpenCL found in package - /opt/intel/opencl/libIntelOpenCL.so.16
 [ INFO ] libIntelOpenCL found in package - /opt/intel/opencl/libIntelOpenCL.so.16.4.0
 [ INFO ] intel.icd contains icd entry: /opt/intel/opencl/libIntelOpenCL.so
 [ INFO ] No nomodeset in kernel startup
 [ INFO ] Warning: System does not have supported gcc version - 4.8.2
 [ TIP ] Install matching gcc compiler
 [ INFO ] System has supported glibc version - 2.17
 [ INFO ] Required ocl package is installed in the system
 [ INFO ] Linux OpenCL is installed properly on this platform
    [ OK ]    
#
——————————————————————————————————————————

 

What should I do? can anyone help me? Thanks~

0 Kudos
4 Replies
Robert_I_Intel
Employee
416 Views

Hi,

Error -215 is not a list of expected error results from clEnqueueWriteBuffer. I contacted the Linux driver team to see if they can help here.

然_魏_
Beginner
416 Views

Robert Ioffe (Intel) wrote:

Hi,

Error -215 is not a list of expected error results from clEnqueueWriteBuffer. I contacted the Linux driver team to see if they can help here.

Any suggestion?

Although I have already sloved this problem, but I still want to learn from Linux driver team ~

张__慕慕
Beginner
416 Views

How did you solve it?

I had the same problem.

张__慕慕
Beginner
416 Views

Can you email me the solution?

email:1579722672@qq.com

Thanks very much.

Reply