Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux nvcc致命:编译matlab时不支持gpu体系结构“compute_20”_Linux_Cuda_Gpu_Matlab Compiler - Fatal编程技术网

Linux nvcc致命:编译matlab时不支持gpu体系结构“compute_20”

Linux nvcc致命:编译matlab时不支持gpu体系结构“compute_20”,linux,cuda,gpu,matlab-compiler,Linux,Cuda,Gpu,Matlab Compiler,CentOS Linux 7.3版;cuda 9.1;GPU:Tesla P100-PCIE 我已经在服务器上安装了Matlab2018a,但当我尝试这样做时: vl_编译'enableGpu',正确; 我遇到了这样的情况: vl_compilenn: CUDA: MEX config file: '/data1/zhangdinghuai/gitrepo/explanatoryGraph/matconvnet-1.0- beta24/matlab/src/config/mex_CUDA

CentOS Linux 7.3版;cuda 9.1;GPU:Tesla P100-PCIE

我已经在服务器上安装了Matlab2018a,但当我尝试这样做时: vl_编译'enableGpu',正确; 我遇到了这样的情况:

vl_compilenn:   CUDA: MEX config file: 
'/data1/zhangdinghuai/gitrepo/explanatoryGraph/matconvnet-1.0- 
beta24/matlab/src/config/mex_CUDA_glnxa64.xml'
Building with 'nvcc'.
nvcc fatal   : Unsupported gpu architecture 'compute_20'

我搜索过类似的问题,但没有一个有效,有人能帮我吗

PS:有关服务器的详细信息如下所示:

[zhangdinghuai@gpu01 2018a]$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1- 
noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-                4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.3.1611 (Core) 
Release:    7.3.1611
Codename:   Core
[zhangdinghuai@gpu01 2018a]$ cat /etc/issue
\S
Kernel \r on an \m

[zhangdinghuai@gpu01 2018a]$ cat /proc/version
Linux version 3.10.0-514.26.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Thu Jun 29 16:05:25 UTC 2017
在此处或处的类似线程中,建议编辑makefile.config并注释掉-gencode arch=compute20


您还可以共享您正在使用的确切内核版本、具有PCI ID的确切PCI设备以及驱动程序版本(如果有的话)。这可能有助于更好地了解您的环境,也有助于回答进一步的问题

我的解决方案是修改文件matconvnet/matlab/src/config/mex\u CUDA\u glnxa64.xml

换线

`NVCCFLAGS="-D_FORCE_INLINES -gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=\"sm_30,compute_30\" $NVCC_FLAGS"`
进入


您要么需要删除构建系统中有问题的编译器选项,如下面的答案所示,要么使用CUDA 8。如果可能的话,我会推荐前一个选项。我在问题中补充一些信息,我不确定这些是否是你需要的。此外,实际上我以前见过这个链接,但在我能找到的所有makefile.config中,只有一个文件的内容类似:NVCCFLAGS\u PASS=-D\u FORCE\u INLINES-gencode=arch=compute\u 30,code=\sm\u 30,compute\u 30\。我尝试过几次更改或删除代码,但都不起作用…@NarsilZhang这两行之间似乎没有任何差异复制粘贴错误?
`NVCCFLAGS="-D_FORCE_INLINES -gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=\"sm_30,compute_30\" $NVCC_FLAGS"`
`NVCCFLAGS="-D_FORCE_INLINES -gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=\"sm_30,compute_30\" $NVCC_FLAGS"`