Pycuda 编译错误 stderr message unreadable

Pycuda compilation error stderr message unreadable

我的系统如下:

系统环境:

Windows 7 专业

蟒蛇 3 python 3.5.4

GPU:Quadr K2200 driver:353.90 CUDA 工具包:7.5 Visual studio: Visual studio community 2013(日文版) 我安装时使用的pycuda二进制文件:pycuda-2016.1.2+cuda7518-cp35-cp35m-win_amd64.whl(从http://www.lfd.uci.edu/~gohlke/pythonlibs/#pycuda下载)

按照此处的说明添加了 PATH 变量:https://github.com/drasmuss/hessianfree/wiki/PyCUDA-installation-on-Windows

另外修改了 nvcc.profile 如下所示

然后尝试 运行 来自此处的 hello_gpu 示例代码:https://documen.tician.de/pycuda/

出现以下错误:

stderr 消息的格式不正确。所以我无法找出实际的错误是什么。我知道这里有一些关于此编译错误的相关问题(none 已得到解答,是否有解决方案?)但尚未报告 stderr 中的格式问题。

所以我的问题是:如何查看 stderr 内容? 一般来说,这个编译错误有解决方案吗?

我没能花时间让 stderr 消息显示出来。但是我能够解决编译错误消息。 我不得不稍微重新配置系统。

Anaconda: 5.0.1 with python 3.6.3
Cuda Toolkit: CUDA 8.0  
Driver:376.51 for Quadro K2200
Visual Studio: Visual Studio community 2015 (custom installation: Visual C++ and Windows 10 SDK packages alone)

添加了

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

在 Path 环境变量中。

然后新建一个环境变量Include如下:

setx /M INCLUDE C:\Program Files (x86)\Windows Kits\Include.0.10240.0\ucrt

然后在 Anaconda 命令提示符下,我将编码更改为 utf-8(默认为 Shift-JIS,因为我的 OS 是日语)

chcp 65001

然后使用pip安装pycuda

pip install pycuda

安装成功,我能够运行 hello_gpu.py 测试代码。然而,nvcc 编译器显示了数十个 C4819 警告(解码警告,因为 shift-JIS 和 utf-8 混淆)所以我使用 nvcc 编译器命令禁用了 C4819 警告

nvcc -Xcompiler "/wd 4819"

参考文献:pycuda installation guide.Clear pip installation UnicodeDecodeerror.Hiding C4819 warning 所有的参考资料都是日文的,但我把它们放在这里是希望它们能帮助到和我情况相似的人。