zoukankan      html  css  js  c++  java
  • CUDA8.0安装成功后的环境配置问题

    CUDA8.0安装成功后会出现以下画面:

    ===========
    = Summary =
    ===========
    Driver: Not Selected
    Toolkit: Installed in /usr/local/cuda-8.0
    Samples: Installed in /home/textminer
    Please make sure that
    – PATH includes /usr/local/cuda-8.0/bin
    – LD_LIBRARY_PATH includes /usr/local/cuda-8.0/lib64, or, add /usr/local/cuda-8.0/lib64 to /etc/ld.so.conf and run ldconfig as root
    To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-8.0/bin
    Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-8.0/doc/pdf for detailed information on setting up CUDA.
    ***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 361.00 is required for CUDA 8.0 functionality to work.
    To install the driver using this installer, run the following command, replacing with the name of this run file:
    sudo .run -silent -driver
    Logfile is /opt/temp//cuda_install_6583.log

    此刻我们就需要配置它的环境变量了

    第一步:在.bashrc中添加环境变量

    gedit ~/.bashrc
    
    在文件的末尾加入下面两行语句:
    
    export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
    export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

    第二步:设置环境变量和动态链接库

    $ sudo gedit /etc/profile
    
    在末尾加入下面语句:
    
    export PATH=/usr/local/cuda/bin:$PATH
    
    保存退出

    第三步:创建链接文件

    sudo gedit /etc/ld.so.conf.d/cuda.conf
    
    加入下面语句:
    
    /usr/local/cuda/lib64
    
    然后执行:
    sudo ldconfig        // 使文件生效

    第四步:测试CUDA的Sample

    cd /usr/local/cuda-7.5/samples/1_Utilities/deviceQuery
    make
    sudo ./deviceQuery

    如果出现与下图相似的图,说明CUDA8.0已经安装成功了

    130537_6sIP_614348.png

  • 相关阅读:
    CentOS下通过yum安装svn及配置
    CentOS使用YUM安装php运行环境,包含php,php-fpm,nginx,mysql
    centos6.5直接yum安装nginx
    用Xshell设置CentOS密钥登录
    CentOS安装系统时硬盘分区建议
    jQuery.extend 函数详解
    jQuery自定义插件
    SVN常用命令
    iwebshop判断是不是微信打开,这样可能把微信支付显示出来
    Angularjs使用 ajax实例
  • 原文地址:https://www.cnblogs.com/Leozi/p/13281215.html
Copyright © 2011-2022 走看看