on monday I updatet our Cluster Studio to the latest version and did some update for Ubuntu with apt-get upgrade. Since then the OpenCL isn't working any more (2xIntel Xeon 2670 and Xeon Phi coprocessor). If I call clGetPlatformIDs I get the -1001 error pack and the platformcount variable is set to 0. Then I uninstalled OpenCL completely and installed the latest files. But no change. Same problem with gcc. I did the installation in the same way as described here:
Has somebody an idea were the error can be?
I have an update:
When I compile with gcc and don't do source /opt/intel/composer_xe_2013/bin/compilervars.sh intel64 the Xeon CPU is listed by the function. But in this moment, when I do the source command it disappears and the function behaves like described below.
-1001 = CL_PLATFORM_NOT_FOUND_KHR, and is returned when clGetPlatformIDs() sees no platforms available. Have you tried installing OpenCl, backing off the apt-get updates and then running from the source command? Also, what were the particular apt-get updates that were installed?
thanks for you reply. Yes I know the meaning of 1001 and OpenCL was reinstalled serveral time in the latest and the previous version. The version only occurs when I source intel sh file. I reinstalled the Cluster Studio and with the old version of composer everything runs fine.
Before I removed Cluster Studio I was able to locate the source of error a bit mir precisely. It occurs when loading the idb-sh file within the compilervars.sh. When I comment it out and only load the others, then the devices were found. Today I have to try to update composer again, because of other problems with I have with Mic besides OpenCL.
The only updated through apt-get were to updates for OpenJDK. But for test I removed them. Result: No change.
So after upgrading to Composer 2013 Update 3 the OCL-Devices disappear again, after sourcing compilervars. What can be the reason?
The problem may happen because of mismatch in TBB binaries. After sourcing of compilervars the LD_LIBRARY_PATH is updated with a path to TBB binaries provided with ICC installation.
Since LD_LIBRARY_PATH overides RUNPATH used in the OpenCL binaries, the TBB binaries from the ICC installation are used.
Please include the path wherein OpenCL binaries are installed before ICC path in the LD_LIBRARY_PATH.
In case your application uses TBB in addition to OpenCL, please link against TBB libraries from the OpenCL installation..
thanks for your reply. Can you please give me the exact command I should use? I don't use TBB. I tried
mburger@XXe:~$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/opencl-1.2-3.0.56860/lib64
mburger@XXe:~$ source /opt/intel/bin/compilervars.sh intel64
mburger@XXe:~$ cd ocl/
Number of OCL-Devices: 0
I found, if an application is using Intel TBB and the Intel SDK for OpenCL Applications then one might link against the tbb_preview library instead of the tbb library. One can check whether this applies or not by looking into the library directory of the OpenCL installation. If there is a tbb_preview rather than a tbb library, then the application might also link against the tbb_preview library. Btw, setting the LD_LIBRARY_PATH according to the above comment is still a prerequisite in order to run the application.