mjharvey

OpenCL 2 and Red Hat 5

Discussion created by mjharvey on Feb 7, 2010
How to make it go

Some of you have (like me) doubtless been frustrated in trying to get the current OpenCL 2 to work with RHEL/Centos 5. The typical symptom of failure is something like:

 $./HelloCL
HelloCL!
Getting Platform Information
Platform::get() failed (-1000)
Creating a context AMD platform
Segmentation fault

Even after fannying about creating  symlinks for the ICD and setting LD_LIBRARY_PATH to point to the location of libOpenCL.so.

The reason why it's not working is that the libaticl64.so depends upon a more recent version of GLIBC than RHEL supports. You can see this if you try:

# ldd /usr/lib/OpenCL/vendors/libatiocl64.so
/usr/lib/OpenCL/vendors/libatiocl64.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/OpenCL/vendors/libatiocl64.so)
..

 

There's no RHEL/Centos fix for this, but it can be workedearound by getting a more recent stdc++ RPM from Fedora.

For example, download: http://fedora.mirror.iweb.ca/releases/11/Everything/x86_64/os/Packages/libstdc++-4.4.0-4.x86_64.rpm

Extract the libraries from it using:

$ rpm2cpio libstdc++...rpm | cpio - cvidBum

Then set the LD_LIBRARY_PATH to point to the extracted libstd++.so.6.0.11.

(Best not to overwrite the system libs in /usr/lib64, of course.)

Voila. A probably-mostly-working OCL installation.

 

ATI: please do fix this dependency - to be taken seriously in the comercial world, RHEL compatibility is sine qua non.

 

Matt

$ ./HelloCL HelloCL! Getting Platform Information Platform::get() failed (-1000) Creating a context AMD platform Segmentation fault

Outcomes