cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ritesh_india
Journeyman III

Need help: Shifting from CUDA to OpenCL

Platform::get() failed (-1001), tried forum suggestions but still having the same problem

Hi

Now that I am convinced  investing time in OpenCL is going to pay, just running my first program from APP SDK 2.4(on RHEL 5.5).  

1- I have installed SDK in /root/AMD


2- The icd-registration is unzipped in/etc:

Here are the contents of icd-registration:
 
[root@localhost /]# cd  etc/OpenCL/vendors
[root@localhost vendors]# ls
atiocl32.icd  atiocl64.icd


3-  The exports are like this:

 i) export AMDAPPSDKSAMPLESROOT=/root/AMD/AMD-APP-SDK-v2.4-lnx32


ii) export AMDAPPSDKROOT=/root/AMD/AMD-APP-SDK-v2.4-lnx32

iii) export LD_LIBRARY_PATH=$AMDAPPSDKROOT/lib/x86


Additional Information:

[root@localhost x86]# ldd $AMDAPPSDKROOT/lib/x86/libamdocl32.so
        linux-gate.so.1 =>  (0x002a7000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0x008d4000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x00110000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00213000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x002a8000)
        librt.so.1 => /lib/librt.so.1 (0x0022b000)
        libdl.so.2 => /lib/libdl.so.2 (0x00234000)
        libm.so.6 => /lib/libm.so.6 (0x00238000)
        libc.so.6 => /lib/libc.so.6 (0x004eb000)
        /lib/ld-linux.so.2 (0x00bba000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x0025f000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0026f000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x008a6000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0027b000)


This shows no " not found". This is explained here: http://forums.amd.com/devforum/messageview.cfm?catid=390&threadid=147002&highlight_key=y
 


When I run the binary I get the error:

 
[root@localhost x86]# ./HelloCL
HelloCL!
Getting Platform Information
Platform::get() failed (-1001)

[root@localhost x86]# ./clinfo
terminate called after throwing an instance of 'cl::Error'
  what():  clGetPlatformIDs
Aborted

Any Idea why this is happening?


Thanks in advance,

Ritesh
 
0 Likes
7 Replies
ritesh_india
Journeyman III

Need help: Shifting from CUDA to OpenCL

Forgot to mention my System detail:

OS:  RHEL 5.5

Propcessor: Intel Core2Duo

Graphics Card: ATI HD5450

 

 

 

 

 

 

0 Likes
nou
Exemplar

Need help: Shifting from CUDA to OpenCL

try copy libamdocl32.so into /usr/lib

or run clinfo with cltrace

strace ./clinfo 2> trace
cat trace | grep amdocl

0 Likes
ritesh_india
Journeyman III

Need help: Shifting from CUDA to OpenCL

Originally posted by: nou try copy libamdocl32.so into /usr/lib

 

or run clinfo with cltrace

 

strace ./clinfo 2> trace cat trace | grep amdocl

 

Thanks for your reply.

I copied the library to /usr/lib and

did the following but still having the same issue:

[root@localhost x86]# ls
clinfo
[root@localhost x86]# strace ./clinfo 2> trace cat trace | grep amdocl
[root@localhost x86]#

 

0 Likes
nou
Exemplar

Need help: Shifting from CUDA to OpenCL

now atiocl32.icd is strange. with 2.4 it should be amdocl32.icd

but name of file is irrelevant it matter what is inside this files. it should be libamdocl32.so and libamdocl64.so as libOpenCL.so open this files in /etc/OpenCL/vendors and try load libraries which names are in this files.

0 Likes
ritesh_india
Journeyman III

Need help: Shifting from CUDA to OpenCL

Originally posted by: nou try copy libamdocl32.so into /usr/lib

 

or run clinfo with cltrace

 

strace ./clinfo 2> trace

cat trace | grep amdocl

 

These two comands dont show any output except that a trace file appears in /root/AMD/AMD-APP-SDK...../bin/x86/

When I run clinfo I am having the same output:

terminate called after throwing an instance of 'cl::Error'
  what():  clGetPlatformIDs
Aborted

0 Likes
ritesh_india
Journeyman III

Need help: Shifting from CUDA to OpenCL

Originally posted by: nou now atiocl32.icd is strange. with 2.4 it should be amdocl32.icd

 

but name of file is irrelevant it matter what is inside this files. it should be libamdocl32.so and libamdocl64.so as libOpenCL.so open this files in /etc/OpenCL/vendors and try load libraries which names are in this files.

 

Thanks once again!

Content  of /etc/OpenCL/vendors are following two files:

atiocl32.icd ( when I open it in gedit, contains a file name: libatiocl32.so)

atiocl64.icd ( when I open in gedit, contains a filename:libatiocl64.so)

What should I do now?

0 Likes
ritesh_india
Journeyman III

Need help: Shifting from CUDA to OpenCL

SOLVED

Editted the contents of the two files in etc/opencl/vendor raplacing ati to amd.

 

Thanks for helping me NOU!

 

 

0 Likes