适用于与Matlab一起使用的NVIDIA Tesla K40m GPU的ubuntu 18.04驱动程序设置 [英] ubuntu 18.04 driver setup for nvidia tesla k40m gpu for use with matlab

查看:390
本文介绍了适用于与Matlab一起使用的NVIDIA Tesla K40m GPU的ubuntu 18.04驱动程序设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个内置Intel图形的ubuntu 18.04(System76桌面).我尝试插入nVidia K40m GPU卡进行Matlab计算,但是遇到了很多问题.该卡具有GPU,但仅用于计算,而不用于驱动显示器.我有专门用于处理这种类型的GPU的matlab并行工具箱.

I have an ubuntu 18.04 (System76 desktop) that has built in Intel graphics. I tried plugging in an nVidia K40m gpu card for matlab computations, but I am running into numerous problems. The card has a gpu but it is just for computing, not for driving a monitor. I have the matlab parallel toolbox that is designed to work with this type of gpu.

1)当我安装nVidia驱动程序时,机器似乎尝试使用K40m卡作为显示器,并停止使用Intel图形.我不知道如何在不删除nVidia驱动程序驱动程序的情况下停止它.

1) When I install the nVidia driver, the machine seems to try to use the K40m card as a display and stops using the Intel graphics. I can't figure out how to stop this without removing the nVidia driver driver.

2)我似乎也没有找到合适的CUDA驱动程序来与Matlab一起使用.

2) I can't seem to get the right CUDA driver to work with Matlab either.

任何建议如何解决这些问题?

Any sugestions for how to fix these?

推荐答案

我进行了一些搜索,您的GPU的最新驱动程序版本为410. 假设您要使用CUDA 10,则因为410驱动程序已包含在CUDA 10中,所以首先不需要安装nvidia驱动程序. 仔细阅读Linux的cuda10安装指南.

I did some search and the latest driver version for your gpu is 410. Suppose you want to use CUDA 10, then there's no need to install nvidia driver at first since the 410 driver is already included in CUDA 10. Read the cuda10 Installation Guide for linux creafully.

> ://developer.nvidia.com/cuda-downloads?target_os = Linux& target_arch = x86_64& target_distro = Ubuntu& target_version = 1804& target_type = runfilelocal

下载运行文件版本的cuda,并非常注意其命令行提示符的每一步.

Download the runfile version cuda, and be very careful to every step of its command line prompts.

这些步骤对我有用,在笔记本电脑中可以同时使用Intel图形和Nvidia图形.(我使用Inter one进行显示).由于gpu不同,我无法确定它是否也对您有用. 首先请遵循适用于Linux的cuda安装指南,或者在此处不清楚的地方.

These steps works for me, with a Intel graphics and Nvidia graphics together in my laptop.(and I use Inter one to show). I can't make sure it also works for you since the gpu is not same. Please follow the cuda installation guide for linux at first or something not clear here.

  1. 记住cuda10运行文件的位置.
  2. 确保禁用Nouveau, 输入或触摸此文件:/etc/modprobe.d/blacklist-nouveau.conf
  1. remember the location of cuda10 run file.
  2. make sure disable Nouveau, enter or touch this file: /etc/modprobe.d/blacklist-nouveau.conf

输入两行:

blacklist nouveau 
options nouveau modeset=0 

保存,然后保存命令行:

save and then command line:

sudo update-initramfs -u 

  1. systemctl set-default runlevel3.target使您的计算机在重新引导后成为仅命令行版本,然后重新引导,使用命令行 lsmod | grep nouveau,检查是否禁用nouveau,如果没有输出,是正确的.
  2. sudo sh cuda_10.0.130_410.48_linux.run
  1. systemctl set-default runlevel3.target to make your computer only command line version after reboot,then reboot, use command line lsmod | grep nouveau,to check whether you disable nouveau, if there's no output, it's right.
  2. sudo sh cuda_10.0.130_410.48_linux.run

(1)接受EULA ------- y

(1)EULA Acceptance-------y

(2)CUDA驱动程序安装------ y

(2)CUDA Driver installation------y

(3)openGL ------- n

(3)openGL-------n

(4)x-server ------- n

(4)x-server-------n

(5)CUDA Toolkit安装位置--------------输入

(5)CUDA Toolkit installation location --------------Enter

(6)CUDA示例安装和位置---------------输入

(6)CUDA Samples installation and location ---------------Enter

如果一切正常,请使用命令行:

If everything is fine, command line:

systemctl set-default runlevel5.target

然后重新启动.

  1. 在〜/.bashrc中设置环境路径 路径=/usr/local/cuda-10.0/bin LD_LIBRARY_PATH =/usr/local/cuda-10.0/lib64 然后source ~/.bashrc

  1. set environment path in ~/.bashrc PATH=/usr/local/cuda-10.0/bin LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64 then source ~/.bashrc

确保所有步骤都正确. cat /proc/driver/nvidia/version

make sure all things are right. cat /proc/driver/nvidia/version

nvcc -V

nvidia-smi

测试CUDA cd your-own-sample-path to/1_Utilities/deviceQuery

sudo make

./deviceQuery

这篇关于适用于与Matlab一起使用的NVIDIA Tesla K40m GPU的ubuntu 18.04驱动程序设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆