- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am developing the OpenCL app on Windows with Eclipse CDT (Mars) and intel_sdk_for_opencl_setup_6.1.0.1600, the devices of computer is as follow:
OS: Windows 10 pro
CPU: I7-5500U
Driver:win64_15407.4279.exe()
Problem: Although the code is build successfully, it is crashing and generate the tips window as follow when it is running in Eclipse CDT. In fact, it can be built and ran in the same IDE and OS by insteading the file OpenCL.lib(which is come from intel OpenCL SDK and locates in C:\Program Files (x86)\Intel\OpenCL SDK\6.1\lib\x64\OpenCL.lib ) by the counterpoint of AMD OpenCL SDK(***\AMD APP\lib\x64\OpenCL.lib).
Besides replacing the file (C:\Program Files (x86)\Intel\OpenCL SDK\6.1\lib\x64\OpenCL.lib) with (***\AMD APP\lib\x64\OpenCL.lib), how can I run the code as follow successfully with native intel_sdk_for_opencl_setup_6.1.0.1600 and Eclipse CDT ?
#include <stdio.h> #include <stdlib.h> #include<CL/cl.h> int main(int argc, char *argv[]) { cl_uint err; cl_uint num_platform; cl_platform_id *platform; err = clGetPlatformIDs(0, NULL, &num_platform); if (CL_SUCCESS == err) printf("Number of Detected OpenCL platforms: %d\n\n", num_platform); else printf("Error calling clGetPlatformIDs. Error code: %d \n", err); platform = (cl_platform_id *) malloc(sizeof(cl_platform_id) * num_platform); err = clGetPlatformIDs(num_platform, platform, NULL); size_t size; for (cl_uint i = 0; i < num_platform; i++) { err = clGetPlatformInfo(platform, CL_PLATFORM_NAME, 0, NULL, &size); char *PName = (char *) malloc(size); err = clGetPlatformInfo(platform, CL_PLATFORM_NAME, size, PName,NULL); printf("PName:%s\n", PName); err = clGetPlatformInfo(platform, CL_PLATFORM_VENDOR, 0, NULL,&size); char *PVendor = (char *) malloc(size); err = clGetPlatformInfo(platform, CL_PLATFORM_VENDOR, size, PVendor,NULL); printf("PVendor:%s\n", PVendor); err = clGetPlatformInfo(platform, CL_PLATFORM_VERSION, 0, NULL,&size); char *PVersion = (char *) malloc(size); err = clGetPlatformInfo(platform, CL_PLATFORM_VERSION, size,PVersion, NULL); printf("PVersion:%s\n", PVersion); printf("i=%d err=%d\n\n", i, err); } return 0; }
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the delayed reply. I verified that your code is fine in Visual Studio.
Do you have an AMD GPU on your system too, or just the i7-5500U processor?
You have probably already tried this, but the first step is probably to reinstall OpenCL then follow the install steps here again: https://software.intel.com/en-us/node/671831
I'm gathering more info on the Eclipse install + troubleshooting. Hope to get back to you with more info soon.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page