4 Replies Latest reply on Sep 15, 2011 4:14 AM by scharupa

    Installation/Setup Guide for AMD APP SDK 2.5 on Linux Mint 11 (Ubuntu 11.04) 64-bit

    teonghan

      Greetings to all,

      I recently start to play around with AMD APP SDK and spend more time that I could imagine just to be able to compile sample codes from the SDK. I just wish to share my setup guide/experience with everyone here. Feel free to comment/add anything you feel appropriate. This setup was done on Linux Mint 11 64-bit which should be compatible with Ubuntu 11.04 64-bit. Here is the step-by-step guide:

       

      1. Download http://developer.amd.com/Downloads/AMD-APP-SDK-v2.5-lnx64.tgz. Extract it somewhere.

      2. cd to AMD-APP-SDK-v2.5-lnx64 (the extracted folder), open Install-AMD-APP.sh in text editor. Edit the first line to "echo Installing AMD APP SDK...." (w/o quotes)

      3. Open terminal, cd to AMD-APP-SDK-v2.5-lnx64, sudo sh Install-AMD-APP.sh. Installation will start and all files will be installed to /opt/AMDAPP. Please save all your works before you run this since the installer will reboot without prompting the users (you can edit the default_install-lnx.pl if you want to be prompted or change the installation directory)

      4. Download latest Eclipse IDE, http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/indigo/R/eclipse-linuxtools-indigo-incubation-linux-gtk-x86_64.tar.gz

      5. Extract it somewhere. Open up a terminal, cd to eclipse (the extracted directory) and ./eclipse.

      6. On Eclipse, choose New -> C++ project. Enter project name, choose project type as Executable -> Empty Project -> Linux GCC. Press Next -> Finish.

      7. Select project from Project Explorer. Go to Project -> Properties -> C/C++ Build. At GCC C++ Compiler -> Includes -> Include paths, press + and point to /opt/AMDAPP/include. Press + again and point to /opt/AMDAPP/samples/opencl/SDKUtil/include. Do the same for GCC C Compiler -> Includes -> Include paths.

      8. Go to GCC C++ Linker -> Libraries, press + Libraries type OpenCL. Press + Libraries again type SDKUtil. Press + Library search path, point to /opt/AMDAPP/lib/x86_64. Press + Library search path again, point to /opt/AMDAPP/TempSDKUtil/lib/x86_64. Press Ok.

      9. Now, we are ready to create/write/compile OpenCL codes. For example, at the Project Explorer, right click the project -> Import -> Generel -> File System. Browse the directory /opt/AMDAPP/samples/opencl/cpp_cl/app/HelloCL. Import HelloCL.cpp and HelloCL_Kernels.cl. Go to Project -> Build Project. There should be couples of warning, but build process will finish. You should be able to run the executable after building.

       

      There you have it. Hopefully everyone (especially newbies like me) here will find this useful and happy coding!

      [Edit:] If you cannot build and run some of the SDK samples (for example Template), select the project from Project Explorer, go to Project -> Properties -> GCC C Compiler -> Includes and add the kernels (Template_Kernels.cl) at the Include files area. Clean and rebuild the project and everything should be working now.