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.
1663 Discussions

seg-faults in OpenCL 2013 beta for linux

David_M_13
Beginner
199 Views

I'm using /opt/intel/opencl-1.2-3.0.56860/lib64/libintelocl.so

All the programs I have function using the Nvidia OpenCL driver for CUDA 5.0

All my programs seg-fault with the Intel device. I'm running .Red Hat Enterprise Linux Server release 6.2 (Santiago)

On a dual-socket 4 core Intel(R) Xeon(R) CPU           E5620  @ 2.40GH

Heres a picture of the stack:

(gdb) info stack
#0 0x00007f947afb0721 in Intel::OpenCL::CPUDevice::CPUDevice::NotifyAffinity(unsigned int, unsigned int) ()
from /opt/intel/opencl/lib64/libcpu_device.so
#1 0x00007f947afa4fed in Intel::OpenCL::CPUDevice::AffinitizeThreads::ExecuteIteration(unsigned long, unsigned long, unsigned long, WGContextBase*) () from /opt/intel/opencl/lib64/libcpu_device.so
#2 0x00007f947b3463d0 in void tbb::interface6::internal::partition_type_base<tbb::interface6::internal::auto_partition_type>::execute<tbb::interface6::internal::start_for<tbb::blocked_range<unsigned long>, Intel::OpenCL::TaskExecutor::TaskLoopBody1D, tbb::auto_partitioner const>, tbb::blocked_range<unsigned long> >(tbb::interface6::internal::start_for<tbb::blocked_range<unsigned long>, Intel::OpenCL::TaskExecutor::TaskLoopBody1D, tbb::auto_partitioner const>&, tbb::blocked_range<unsigned long>&) () from /opt/intel/opencl/lib64/libtask_executor.so
#3 0x00007f947b346a0c in tbb::interface6::internal::start_for<tbb::blocked_range<unsigned long>, Intel::OpenCL::TaskExecutor::TaskLoopBody1D, tbb::auto_partitioner const>::execute() () from /opt/intel/opencl/lib64/libtask_executor.so
#4 0x00007f947d0262db in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all (this=0x7f947c681c00,
parent=..., child=<value optimized out>) at ../../src/tbb/custom_scheduler.h:440
#5 0x00007f947d02468d in tbb::internal::generic_scheduler::local_spawn_root_and_wait (this=0x7f947c681c00, first=..., next=@0x7f941bffbc38)
at ../../src/tbb/scheduler.cpp:621
#6 0x00007f947b3462d7 in tbb::interface6::internal::delegated_function<Intel::OpenCL::TaskExecutor::Dim1ParallelForFunctor>::run() ()
from /opt/intel/opencl/lib64/libtask_executor.so
#7 0x00007f947b1fb2bd in ?? () from /opt/intel/opencl/lib64/libtbb_preview.so.2
#8 0x00007f947b1fca37 in ?? () from /opt/intel/opencl/lib64/libtbb_preview.so.2
#9 0x00007f947b1fa627 in ?? () from /opt/intel/opencl/lib64/libtbb_preview.so.2
#10 0x00007f947b1f94f6 in ?? () from /opt/intel/opencl/lib64/libtbb_preview.so.2
#11 0x00007f947b1f7454 in ?? () from /opt/intel/opencl/lib64/libtbb_preview.so.2
#12 0x00007f947b1f7386 in ?? () from /opt/intel/opencl/lib64/libtbb_preview.so.2
#13 0x00000032e94077f1 in start_thread () from /lib64/libpthread.so.0
#14 0x00000032e88e5ccd in clone () from /lib64/libc.so.6

0 Kudos
5 Replies
Yuri_K_Intel
Employee
199 Views
Hi, Is it possible to attach a small reproducer for this issue? Thanks, Yuri
Arik_N_Intel
Employee
199 Views
Thanks for your report! We wnat to iinvestigate the issue. Can you please provide a reproducer for the problem? Arik
David_M_13
Beginner
199 Views
Sorry, I don't have. On trivial applications it doesn't happen. It happens inside a larger application that targets multiple OpenCL devices, if I set the device to the Nvidia device everything works, the moment I set it to the Intel device I get a seg fault on on clCreateContext. All the parameters seem fine. From the stack it seem that clCreateContext initializes the tbb scheduler and launches a bunch of threads and an arena. I do have tbb installed on my computer, perhaps OpencL is dynamically linking with the wrong tbb?
David_M_13
Beginner
199 Views
To answer my own post, that was the problem, my application was linked to TBB. This goes back to another post in the forum where I asked what TBB I needed to use in order to work with TBB and OpenCL together. In the meantime I'll work using another runtime. Thanks, David
Evgeny_F_Intel
Employee
199 Views
Hi David, The problem indeed happens when linking to different TBB shared objects. In current (Beta) release our binaries are linked against tbb_preview.so, which have similar symbols as original tbb.so.2. The problem occures since two different TBB symbols exist in the same process. We will work for more reliable solution. Meanwhile, I would like to advice (of cause as a work around) to link against tbb_preview.so that comes with our binaries. Regards, Evgeny
Reply