Changes between Version 3 and Version 4 of GPUApp


Ignore:
Timestamp:
Jul 2, 2010, 11:44:40 AM (14 years ago)
Author:
TuanLe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GPUApp

    v3 v4  
    1010== Linux == #linux
    1111
     12 * '''NVIDIA Cuda''' (BOINC-NVCuda sample app for Linux can be found at "/boinc/samples/nvcuda/")
     13{{{
     14Makefile; common.mk; cuda_kernel.cu; cuda.cu; cuda_config.h; readme.txt
     15}}}
     16 
     17 Before running Makefile, you will need to install gcc 4.3 and g++ 4.3. This is because the NVIDIA Cuda SDK 3.0 has not yet worked with gcc 4.0 and g++ 4.0. There should be no issue compiling cuda files with gcc 4.3 and g++ 4.3 on newer NVIDIA Cuda SDK versions. For a successful compilation, please follow these steps:
     18{{{
     191) Install gcc-4.3 and g++-4.3:
     20   $ sudo aptitude install gcc-4.3 g++-4.3
     21
     222) Go to SDK source directory:
     23   $ cd ~/NVIDIA_GPU_Computing_SDK/C
     24
     253) Create a directory and create symlinks to gcc-4.3/g++-4.3
     26   $ mkdir mygcc
     27   $ cd mygcc
     28   $ ln -s $(which g++-4.3) g++
     29   $ ln -s $(which gcc-4.3) gcc
     30}}}
     31 The Makefile for Linux is made with the assumption that the NVIDIA Cuda SDK is installed at the default location "$(ROOT)/home/USER_NAME/NVIDIA_GPU_Computing_SDK/". On my Linux machine, for example, it would be "$(ROOT)/home/tuanle/NVIDIA_GPU_Computing_SDK/". Since the absolute path is used in Makefile, you will probably need to edit file "common.mk" before compiling the sample app. Do so by looking for "/home/tuanle/NVIDIA_GPU_Computing_SDK" in file "common.mk" and replace this path with an appropriate path on your machine.
     32
     33 What if your machine doesn't have an NVIDIA Cuda-enabled GPU? Then, you can compile and run your app in emulation mode. As far as we know, NVIDIA Cuda SDK 3.1 no longer supports emulation mode. Thus, you will need to install an older Cuda SDK version, like version 3.0, on your machine. To make an executable file in emulation mode, simply type "make emu=1".
     34
     35 Also, note that you will need to define some environment variables before running the executable file.
     36{{{
     37export PATH=/usr/local/cuda/bin:$PATH
     38export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH
     39}}}
     40
     41 * '''NVIDIA OpenCL''' (BOINC-NVOpenCL sample app for Linux can be found at "/boin/samples/nvopencl/")
     42{{{
     43Makefile; common_opencl; nvopencl.h; nvopencl.cpp; nvopencl_kernels; readme.txt
     44}}}
    1245
    1346== Mac OS X == #mac
    1447
    15  * Cuda (BOINC-Cuda sample app for Mac OS X can be found at "/boinc/samples/nvcuda/")
     48 * '''NVIDIA Cuda''' (BOINC-Cuda sample app for Mac OS X can be found at "/boinc/samples/nvcuda/")
    1649{{{
    17 Makefile_mac; common_mac.mk; cuda_kernel_mac.cu; cuda_mac.c; readme_mac.txt
     50Makefile_mac; common_mac.mk; cuda_kernel_mac.cu; cuda_mac.c; cuda_config.h; readme_mac.txt
    1851}}}
    1952
     
    4376}}}
    4477
    45  One last thing to mention, the makefile for Mac is made with the assumption that the NVIDIA Cuda SDK is installed at the default location: "$ROOT/Developer/GPU Computing/" on Mac. If it is installed at a different location on your machine, then you will need to edit "common_mac.mk" file. Do so by looking for "ROOTDIR  ?= /Developer/GPU\ Computing" in "common_mac.mk" file and replace this path with an appropriate path on your machine.
     78 One last thing to mention, the makefile for Mac is made with the assumption that the NVIDIA Cuda SDK is installed at the default location: "$ROOT/Developer/GPU Computing/" on Mac. If it is installed at a different location on your machine, then you will need to edit file "common_mac.mk". Do so by looking for "ROOTDIR  ?= /Developer/GPU\ Computing" in file "common_mac.mk" file and replace this path with an appropriate path on your machine.