- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I got stuck on making opencl work with Xeon Phi. Tried google, but not very useful. Maybe it is a trivial question, but I am very new to Xeon Phi. Please give me some hints. :)
I download a sample code from this tutorial https://software.intel.com/en-us/articles/using-the-intel-sdk-for-opencl-applications-xe-2013 and try to compile and run it. The compilation was fine. Problem is when I try to run it, I got an error
Error: No accelerators detected!
The error is from these code in the source
err = clGetDeviceIDs(*myPlatform, CL_DEVICE_TYPE_ACCELERATOR, 0, 0,numAccCount);
if ((*numAccCount) == 0)
{
printf("Error: No accelerators detected!\n");
exit(-1);
}
I can run other test code without opencl either native mode or offline mode. And my mpss version is 3.5.1.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel has been saying this for quite some time now. However, mpss 3.3 is no longer supported, so my conclusion would be that OpenCL on the Phi is no longer officially supproted. I hope someone from Intel will correct me if I'm wrong.
As for your OpenCL issue: I can reproduce it on one my Phi hosts (running mpss 3.5) but not on two other hosts (running mpss 3.6 and 3.4.3) the test program does work. Do you have other OpenCL stacks installed on your host?
Also, I've found that it helps to explicitly set the LD_LIBRARY_PATH prior to launching the program, e.g.
$ LD_LIBRARY_PATH=/opt/intel/opencl-1.2-4.5.0.8/lib64 ./ocl_sample.out Platform: Intel(R) OpenCL Number of accelerators found: 1 DEVICE #0: NAME:Intel(R) Many Integrated Core Acceleration Card #COMPUTE UNITS:240 OpenCL Initialization Completed Completed reading Input Image: 'input.pgm' Transferring Data from Host to Device Executing Kernel on selected devices Transferring data from Device to Host Completed writing Output Image: 'output.pgm' Completed execution! Cleaning Up.
works, but
$ ./ocl_sample.out Platform: Intel(R) OpenCL Number of accelerators found: 1 DEVICE #0: NAME:Intel(R) Many Integrated Core Acceleration Card #COMPUTE UNITS:240 Error: Could not create Context
does not.
One final word of advise: do not use an NFS-based setup of your Phi (NFS home dirs are OK) as the OpenCL will fail in such a setup.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to the OpenCL™ Runtime release notes (see https://software.intel.com/en-us/articles/opencl-runtime-release-notes/ ), in order to work with the Intel(R) Xeon Phi(TM) Coprocessor you need to install the MPSS 3.3 (not MPSS 3.4 and later).
So you may want to uninstall MPSS 3.5.1 and then install MPSS 3.3 from https://software.intel.com/en-us/articles/intel-manycore-platform-software-stack-mpss-archive .
For more information, please refer to https://software.intel.com/en-us/blogs/2015/04/28/working-with-intel-code-builder-for-opencl-api-on-systems-equipped-with-intel-xeon
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
Do you have experiences on performance differences on FFT between opencl and mkl? From my tests, mkl brings maximum performance 170GFlops on 2d real FFT. Is clFFT on Xeon Phi going to be close?
Loc N. (Intel) wrote:
According to the OpenCL™ Runtime release notes (see https://software.intel.com/en-us/articles/opencl-runtime-release-notes/ ), in order to work with the Intel(R) Xeon Phi(TM) Coprocessor you need to install the MPSS 3.3 (not MPSS 3.4 and later).
So you may want to uninstall MPSS 3.5.1 and then install MPSS 3.3 from https://software.intel.com/en-us/articles/intel-manycore-platform-software-stack-mpss-archive .
For more information, please refer to https://software.intel.com/en-us/blogs/2015/04/28/working-with-intel-code-builder-for-opencl-api-on-systems-equipped-with-intel-xeon
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel has been saying this for quite some time now. However, mpss 3.3 is no longer supported, so my conclusion would be that OpenCL on the Phi is no longer officially supproted. I hope someone from Intel will correct me if I'm wrong.
As for your OpenCL issue: I can reproduce it on one my Phi hosts (running mpss 3.5) but not on two other hosts (running mpss 3.6 and 3.4.3) the test program does work. Do you have other OpenCL stacks installed on your host?
Also, I've found that it helps to explicitly set the LD_LIBRARY_PATH prior to launching the program, e.g.
$ LD_LIBRARY_PATH=/opt/intel/opencl-1.2-4.5.0.8/lib64 ./ocl_sample.out Platform: Intel(R) OpenCL Number of accelerators found: 1 DEVICE #0: NAME:Intel(R) Many Integrated Core Acceleration Card #COMPUTE UNITS:240 OpenCL Initialization Completed Completed reading Input Image: 'input.pgm' Transferring Data from Host to Device Executing Kernel on selected devices Transferring data from Device to Host Completed writing Output Image: 'output.pgm' Completed execution! Cleaning Up.
works, but
$ ./ocl_sample.out Platform: Intel(R) OpenCL Number of accelerators found: 1 DEVICE #0: NAME:Intel(R) Many Integrated Core Acceleration Card #COMPUTE UNITS:240 Error: Could not create Context
does not.
One final word of advise: do not use an NFS-based setup of your Phi (NFS home dirs are OK) as the OpenCL will fail in such a setup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you @JJK. I do have other OpenCL devices installed. serveral NVidia cards.
The problem is the test code. It only search for the first platform and stop for errors if non accelerators are found. Modify a bit with searching a loop of platforms removes the problem.
For latter people, I tested the sample code with mpss 3.5.1, and it works. but that is just for the simple sample. needs to be confirmed with more testing. :)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page