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

Invalid _CL_Platform error

bilal_a_1
Beginner
2,070 Views

Hi I am trying to run OpenCL on Intel 2310 core i3 2nd generation. I have configured VS 2013(Professional) for OpenCL.  When I try to create a new opencl project a message appers: 

"Failed to retrieve number of devices:-32(CL_Invalid_Platform)  "  

But it still creates the OpenCL project.When I run a simple hello world OpenCL  program.VS2013 doesn't builds it. gives following error

OUTPUT window:

1>------ Build started: Project: Opencl1, Configuration: Debug x64 ------
1>  Preprocessing: OpenCLFile.cl
1>  Ignoring -TARGETOS option - not supported for 64-bit version of this tool
1>  Setting target instruction set architecture to: Default (Advanced Vector Extension (AVX))
1>D:\MS Course\3rd Semster\Integrated Project\openCL codes\Opencl1\Opencl1\OpenCLFile.cl : error CL: Failed to get platform id...: 0 (CL_SUCCESS)
1>  Build failed!
1>  
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\IntelOpenCL.targets(98,5): error MSB3721: The command ""C:\Program Files (x86)\Intel\OpenCL SDK\5.3\bin\x64\ioc64.exe" -cmd=build -input="D:\MS Course\3rd Semster\Integrated Project\openCL codes\Opencl1\Opencl1\OpenCLFile.cl" -output="x64\Debug\OpenCLFile.out" -VS -device=CPU -simd=default -targetos=current        -bo="           "" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 

   

0 Kudos
7 Replies
Surbhi_M_Intel
Employee
2,070 Views

Hi Bilal,

Which OpenCL release you have installed on your system?
To set the expectation right - OpenCL1.2 feature is supported on the platform you are using. Also, GPU processing is not supported on this platform. You can get details from "system requirement" section in the release notes - https://software.intel.com/en-us/articles/opencl-code-builder-release-notes. Also, would recommend you to check "known limitation" section since your system is a pretty old configuration. 

Hope this information helps. 

Thanks,
Surbhi


 

0 Kudos
bilal_a_1
Beginner
2,070 Views

Hi thanks for commenting.Actually I am using OpenCL sdk 2015.  

0 Kudos
bilal_a_1
Beginner
2,070 Views

Yeah OpenCL1.2 is supported for my system.Should I use VS2015 with Intel SDK 2015 APP? 

0 Kudos
Robert_I_Intel
Employee
2,070 Views

Hi Bilal,

I believe you have an outdated CPU. I don't think switching to VS2015 will help. You will need a different computer, preferably from 2012 or later. 2013 or later highly recommended.

0 Kudos
saluja__japneet_kaur
2,070 Views

I have the same error but unlike above, I bought my PC in 2018 and my PC has all the specified requirements. Please help.

0 Kudos
Michael_C_Intel1
Moderator
2,070 Views

Hi JapneetS,

Can you please supply the details specified here?

What version of Visual Studio is in use?

What version of the developer tools is in use?

Requirements Reference

-MichaelC

0 Kudos
Zvi_D_Intel
Employee
1,715 Views

2 notes:

  1. In my investigation of exactly this error (happened when trying to compile external OpenCL project) we've found the resolution: you should install OpenCL runtime in additions OpenCL SDK
    https://software.intel.com/content/www/us/en/develop/articles/opencl-drivers.html
    Actually, it is "old" SW, there is the modern and (in our opinion) preferred one:

  2. Install oneAPI Base toolkit, select in your OpenCL project DPC++ compiler toolset, and the OpenCL project will be compiled/run as well.
    https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit.html

Have a good luck !

0 Kudos
Reply