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

TBBMALLOC.dll crash with OpenCL Runtime 15.1 on Xeon processor

Jean-michel_Rouet
737 Views

Dear all,

I am developping an opencl application on multiple platforms (NVidia, AMD, intel CPU, intel GPU), running on Windows 7 - x64.
I came across a strange error where some code ends with Access Violation exception in tbbmalloc.dll when the selected platform is Intel CPU (OpenCL 1.2, on Xeon processor). Note that the code runs fine on other platforms.

Some information:

            CL_DEVICE_NAME: Intel(R) Xeon(R) CPU           W3680  @ 3.33GHz
CL_DEVICE_OPENCL_C_VERSION: OpenCL C 1.2
         CL_DRIVER_VERSION: 5.0.0.57

The call stack of the tbb thread (__TBB_machine_is_in_transaction) is the following:

>	0000000000000000()	
 	000000001b851e09()	
 	tbbmalloc.dll!000007fed70354d0() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for tbbmalloc.dll]	
 	tbbmalloc.dll!000007fed7003983() 	
 	000000001e4d8000()	

 

The driver used in this case is the latest OpenCL Runtime 15.1 for Intel Core and Intel Xeon Processors for Windows OS (64-bit & 32 bit).

After further debugging, I found out that the tbbmalloc.dll provided in this runtime 15.1, is quite old (ver 4.2.2014.601 which dates back to mid 2014).
Interestingly, when I tried to hack the instalation and replace the installed library in C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\tbb\ directory with a more recent version of the tbb library (using tbb 4.4.2015.728) everything is working correctly.

Without knowing the exact reason for the crash it really seems that tbbmalloc is faulty here, and some things have been corrected in newer versions of TBB.

So now comes my question: Is intel considering releasing soon an updated version of OpenCL runtime for Xeon Processors ?

Thanks in advance,
Jean-Michel

0 Kudos
3 Replies
Robert_I_Intel
Employee
737 Views

Hi Jean-Michel,

Our Russian team, who is developing OpenCL for CPU, is on holidays. I expect to get the answer from them regarding your question next week. I am glad you found a workaround for the tbbmalloc issue.

 

0 Kudos
Robert_I_Intel
Employee
737 Views

Hi Jean-Michel,

Could you please provide a short reproducer program so I can forward it to our development team?

Thanks!

0 Kudos
Jean-michel_Rouet
737 Views

Hi Robert,

 

It's quite difficult for me to create a short reproducer program, since the code is embedded into a very large project.
There is however some information I forgot to give:

The kernel is loaded from precompiled SPIR 1.2. Spir code is generated with intel tools.
set clopts=-cl-std=CL1.2 -cl-mad-enable -cl-fast-relaxed-math -cl-single-precision-constant
clangSpir12.exe -cc1 -emit-llvm-bc -triple spir64-unknown-unknown %clopts% -cl-spir-compile-options "%clopts%" -include %OPENCL_SPIR_H% -o bin\OpenCLKernel_spir12_64.spir ..\OpenCLKernel.cl

The code crashes in tbbmalloc.dll while calling clenqueueNDRangeKernel().
At crash time, this is printed into the console (hope this helps, seems a bit cryptic and badly formatted, as if printed from multiple concurrent threads):
0x0000000000000000 (0x000007FEF68154D0 0x000007FEF67E3983 0x0000000035D98000 0x0000000000000000) <unknown module>
0x0000000000000000 (0x000007FEF68154D0 0x000007FEF67E3983 0x0000000035DA8000 0x0000000000000000) <unknown module>
0x000000001D221E09 (0x000007FEF67E3983 0x0000000035DA8000 0x0000000000000000 0x0000000000000000) <unknown module>
0x000000001D221E09 (0x000007FEF67E3983 0x0000000035D98000 0x0000000000000000 0x0000000000000000) <unknown module>
0x000007FEF68154D0 (0x0000000035DA8000 0x0000000000000000 0x0000000000000000 0x0000000000000000)0x000007FEF68154D0 (0x0000000035D98000 0x0000000000000000 0x0000000000000000 0x0000000000000000)0x0000000000000000 (0x000007FEF
0x0000000035DB0000 0x0000000000000000), safer_scalable_aligned_realloc() + 0x24640 bytes(s), safer_scalable_aligned_realloc() + 0x24640 bytes(s) <unknown module>


0x000000001D221E09 (0x000007FEF67E3983 0x0000000035DB0000 0x0000000000000000 0x0000000000000000) <unknown module>
0x000007FEF67E3983 (0x0000000000000000 0x0000000000008000 0x0000000000000002 0x000007FEF68154D0)
0x000007FEF67E3983 (0x0000000000000000 0x0000000000008000 0x0000000000000002 0x000007FEF68154D0)
0x000007FEF68154D0 (0x0000000035DB0000 0x0000000000000000 0x0000000000000000 0x0000000000000000)0x0000000000000001 (0x0000000000008000 0x0000000000000002 0x000007FEF68154D0 0x0000000000000000)0x0000000000000001 (0x000000000
0x000007FEF68154D0 0x0000000000000000), safer_scalable_aligned_realloc() + 0x24640 bytes(s) <unknown module>
 <unknown module>

0x000007FEF67E3983 (0x0000000000000000 0x0000000000008000 0x0000000000000002 0x000007FEF68154D0)
0x0000000000000001 (0x0000000000008000 0x0000000000000002 0x000007FEF68154D0 0x0000000000000000) <unknown module>

Once again, if I manually replace the tbbmalloc.dll from the intel opencl drivers directory with the tbb 4.4.2015.728, the application runs correctly.

 

Regards
Jean-Michel.

0 Kudos
Reply