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

ICPC 13.1 + Ubuntu 11.10 + OpenCl = clGetPlatformIDs fails

Michael_B_13
Beginner
1,172 Views

Hi,

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:

http://software.intel.com/en-us/forums/topic/390630

Has somebody an idea were the error can be?

Thanks

Michael

 

0 Kudos
8 Replies
Michael_B_13
Beginner
1,172 Views

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.

0 Kudos
Chuck_De_Sylva
Beginner
1,172 Views

Michael,

-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?

- Chuck

0 Kudos
Michael_B_13
Beginner
1,172 Views

Hi Chuck,

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.

Thanks

Michael

UPDATE:

So after upgrading to Composer 2013 Update 3 the OCL-Devices disappear again, after sourcing compilervars. What can be the reason?

0 Kudos
Evgeny_F_Intel
Employee
1,172 Views

Hi,

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

Evgeny

0 Kudos
Michael_B_13
Beginner
1,172 Views

Hi Evgeny,

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/
mburger@XXe:~/ocl$ ./DotProduct
Number of OCL-Devices: 0

0 Kudos
Evgeny_F_Intel
Employee
1,172 Views

Try this code. The OCL path MUST be before one set by ICC.

mburger@XXe:~$ source /opt/intel/bin/compilervars.sh intel64

mburger@XXe:~$ export LD_LIBRARY_PATH=/opt/intel/opencl-1.2-3.0.56860/lib64:$LD_LIBRARY_PATH

mburger@XXe:~$ cd ocl/

mburger@XXe:~/ocl$ ./DotProduct

0 Kudos
Michael_B_13
Beginner
1,172 Views

Many thanks Evgeny, that works!

0 Kudos
Hans_P_Intel
Employee
1,172 Views

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.

0 Kudos
Reply