Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in running the examples in cuda-8.0. #6

Open
linrio opened this issue Apr 22, 2017 · 0 comments
Open

Error in running the examples in cuda-8.0. #6

linrio opened this issue Apr 22, 2017 · 0 comments

Comments

@linrio
Copy link
Owner

linrio commented Apr 22, 2017

Problem.

$cd /us/local/cuda-8.0/examples/
$sudo make

It returns the following errors:

cuda usr/bin/ld:cannot find -lnvcuvid
collect2: error: ld returned 1 exit status
Makefile:381: recipe for target 'cudaDecodeGL' failed 

Fixed.

  1. vi ~/.bashrc
    adding following line into end:
    LD_LIBRARY_PATH=/usr/lib/nvidia-375:$LD_LIBRYARY_PATH
    check the LD_LIBRARY_PATH:
    echo $LD_LIBRARY_PATH:

  2. $grep "nvidia-367" -r ./
    It return a series of ...-367... files
    Changing UBUNTU_PKG_NAME = "nvidia-367" To UBUNTU_PKG_NAME = "nvidia-375"

    $sudo sed -i "s/nvidia-367/nvidia-375/g" grep nvidia-367 -rl .``
    $sudo make

 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_60,code=compute_60 -o nvgraph_SemiRingSpmv nvgraph_SemiRingSpmv.o  -lnvgraph
mkdir -p ../../bin/x86_64/linux/release
cp nvgraph_SemiRingSpmv ../../bin/x86_64/linux/release
make[1]: Leaving directory `/usr/local/cuda-8.0/samples/7_CUDALibraries/nvgraph_SemiRingSpMV'
Finished building CUDA samples

全部编译完成后, 进入 samples/bin/x86_64/Linux/release, sudo下运行deviceQuery
sudo ./deviceQuery

  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 3 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
> Peer access from Graphics Device (GPU0) -> Graphics Device (GPU1) : Yes
> Peer access from Graphics Device (GPU1) -> Graphics Device (GPU0) : Yes

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 2, Device0 = Graphics Device, Device1 = Graphics Device
Result = PASS

5.2 test example

$5_../
$./nbody

...
-hostmem (stores simulation data in host memory)
-benchmark (run benchmark to measure performance)
-numbodies= (number of bodies (>= 1) to run in simulation)
-device= (where d=0,1,2.... for the CUDA device to use)
-numdevices= (where i=(number of CUDA devices > 0) to use for simulation)
-compare (compares simulation results running once on the default GPU and once on the CPU)
-cpu (run n-body simulation on the CPU)
-tipsy=<file.bin> (load a tipsy model file for simulation)

NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.

Windowed mode
Simulation data stored in video memory
Single precision floating point simulation
1 Devices used for simulation
Compute 6.1 CUDA device: [Graphics Device]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant