Results 1 to 5 of 5

Thread: compiling and runing OpenCL code

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    1

    compiling and runing OpenCL code

    Hello, I'm a beginner to OpenCL. I have installed the "ati-stream-sdk-v2.3-lnx64" from AMD to run the hello world program.
    When i execute the command "gcc -o lesson1 -Ipath-OpenCL-include -Lpath-OpenCL-libdir lesson1.cpp -lOpenCL" to run the code (lesson1.cpp), i get the following error.

    lesson1.cpp:8: fatal error: CL/cl.hpp: No such file or directory
    compilation terminated

    I understand that the compiler cannot find cl.hpp, but i'm not sure how to install those files. Does anyone have any idea how to solve this?

    Thank you very much.

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: compiling and runing OpenCL code

    If you installed the ATI SDK then the headers should already in your system. They may be in /usr/local/include instead of /usr/include or something like that. Do you still have the installer package around? If it's an RPM or a DEB package you can list the files that they will install and that should show you the path where the headers are.

    In the worst case you can search your whole filesystem for cl.hpp.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  3. #3

    Re: compiling and runing OpenCL code

    In the worst worst case, include files are available here : :

    http://www.khronos.org/registry/cl/

  4. #4

    Re: compiling and runing OpenCL code

    I just would like a clarification. I am heading down to Mexico for three weeks and I thought I would work on OpenCL code on my laptop as I expect to have some time on my hands.
    I am unsure about not having a proper GPU on my soon to be bought cheap laptop. I have read conflicting reports about whether I can do this or not. Can anybody help before I spring for a cheap Mexico laptop?

  5. #5
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: compiling and runing OpenCL code

    Sam, you can use AMD's SDK to compile and run OpenCL kernels on your CPU (it doesn't matter whether the CPU is Intel or AMD). Intel also has some beta OpenCL drivers.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

Similar Threads

  1. OpenCL slow compiling of multiple kernel code
    By chammakchallo in forum OpenCL
    Replies: 3
    Last Post: 02-13-2012, 08:45 AM
  2. problems while compiling Vincent code
    By mssrihari in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 05-04-2005, 06:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •