Search code examples
pythonpycuda

Pycuda compilation error stderr message unreadable


My system is as follows:

System Environment:

Windows 7 Professional

anaconda 3 python 3.5.4

GPU: Quadr K2200 driver: 353.90 CUDA toolkit: 7.5 Visual studio: Visual studio community 2013 (Japanese version) pycuda binary file that I used for installation: pycuda-2016.1.2+cuda7518-cp35-cp35m-win_amd64.whl (downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pycuda)

Added PATH variables as instructed from here: https://github.com/drasmuss/hessianfree/wiki/PyCUDA-installation-on-Windows

Additionally modified the nvcc.profile as shown here https://stackoverflow.com/a/19039177/7428707

Then tried to run the hello_gpu example code from here: https://documen.tician.de/pycuda/

Got the following error: enter image description here

The stderr message's formatting is not right. So I am unable to find out what the actual error is. I know there are a few related questions on here about this compilation error ( none of them have been answered, is there a solution at all ?) but the formatting problem in stderr has not been reported.

So my question is : How do I see the stderr content ? In general, is there a solution for this compilation error ?


Solution

  • I wasnt able to spend time on getting the stderr message to display. However I was able to solve the Compilation error message. I had to reconfigure the system a little.

    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)
    

    Added the

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

    in Path environment variable.

    Then created a new environment variable Include as follows:

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

    Then in Anaconda command prompt, I changed the encoding to utf-8 ( default was Shift-JIS since my OS was japanese)

    chcp 65001
    

    Then installed pycuda using pip

    pip install pycuda
    

    Installation was succesful and I was able to run the hello_gpu.py test code. However the nvcc compiler showed dozens of C4819 warnings (decoding warning because shift-JIS and utf-8 confusion) So I disabled the C4819 warning using the nvcc compiler command

    nvcc -Xcompiler "/wd 4819"
    

    references: pycuda installation guide.Clear pip installation UnicodeDecodeerror.Hiding C4819 warning All the references are in Japanese but I am giving them here in the hope they might help someone in similar situation as me.