Discussion:
[PyCUDA] Installing pycuda on Win 10 notebook
Arnold Tunick
2016-02-10 17:12:33 UTC
Permalink
Hi,
1. I'm having trouble installing pycuda on a Win 10 notebook.2. I installed Cuda 5.53. I downloaded pycuda pycuda-2015.1.3 from git4. I downloaded boost_1_59_0.5. I ran configure.py.
6. My siteconf.py file looks like this:BOOST_INC_DIR = ['C:\\local\\boost_1_59_0\\boost']
BOOST_LIB_DIR = ['C:\\local\\boost_1_59_0\\lib64-msvc-12.0']
BOOST_COMPILER = 'gcc43'
USE_SHIPPED_BOOST = True
BOOST_PYTHON_LIBNAME = ['boost_python-vc120-mt-gd-1_59']
BOOST_THREAD_LIBNAME = ['boost_thread-vc120-mt-gd-1_59']
CUDA_TRACE = False
CUDA_ROOT = 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v5.5'
CUDA_ENABLE_GL = False
CUDA_ENABLE_CURAND = True
CUDADRV_LIB_DIR = ['${CUDA_ROOT}\\lib\\x64']
CUDADRV_LIBNAME = ['cuda']
CUDART_LIB_DIR = ['${CUDA_ROOT}\\lib\\x64']
CUDART_LIBNAME = ['cudart']
CURAND_LIB_DIR = ['${CUDA_ROOT}\\lib\\x64']
CURAND_LIBNAME = ['curand'].
7. My errors when I run "python setup.py install" are as follows:C:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-atonexit.o):atonexit.c:(.text+0xb0):multiple definition of `atexit'C:\SciSoft\WinPython-64bit-2.7.9.4\scripts\..\python-2.7.9.amd64\libs/libmsvcr90.a(dodnibs01081.o):(.text+0x0):first defined hereC:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-mingw_helpers.o):mingw_helpers.c:(.text+0x0):multiple definition of `_decode_pointer'C:\SciSoft\WinPython-64bit-2.7.9.4\scripts\..\python-2.7.9.amd64\libs/libmsvcr90.a(dodnibs00231.o):(.text+0x0):first defined hereC:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-mingw_helpers.o):mingw_helpers.c:(.text+0x10):multiple definition of `_encode_pointer'C:\SciSoft\WinPython-64bit-2.7.9.4\scripts\..\python-2.7.9.amd64\libs/libmsvcr90.a(dodnibs00241.o):(.text+0x0):first defined hereC:\SciSoft\WinPython-64bit-2.7.9.4\scripts\..\python-2.7.9.amd64\libs/libmsvcr90.a(dodnibs00288.o):(.text+0x0):multiple definition of `_fpreset'C:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-CRT_fp8.o):CRT_fp8.c:(.text+0x0):first defined herebuild\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x1f4):undefined reference to `InterlockedIncrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x217):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x2b6):undefined reference to `InterlockedIncrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x2f2):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x3ba):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x41b):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x4d5):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x5b3):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x856):undefined reference to `InterlockedIncrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0xb0d):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0xccb):undefined reference to `InterlockedIncrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x2f28):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x3acf):undefined reference to `InterlockedDecrement'C:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:bad reloc address 0x8 in section `.data'collect2.exe: error: ld returned 1 exit statuserror: command'C:\\SciSoft\\WinPython-64bit-2.7.9.4\\scripts\\..\\python-2.7.9.amd64\\..\\tools\\mingw32\\bin\\g++.exe'failed with exit status 1.8. I look on the archive and found patches to mitigate the InterlockedDecrement and InterlockedIncrement errors, but they appeared to be already in place. (unless I was looking at the wrong files in \boost).
.
9. Any comments that you can provide would be helpful..
10. FYI, running "pip install pycuda" also fails (I think due to the following automated lib and lib64 path assignment error, i.e., mixed forward/backward slash and lib64 should be .\v5.5\lib\x64..


.... -LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5/lib""-LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5/lib64""-LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5/lib""-LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5/lib64"-Lc:\scisoft\winpython-64bit-2.7.9.4\python-2.7.9.amd64\libs-Lc:\scisoft\winpython-64bit-2.7.9.4\python-2.7.9.amd64\PCbuild\amd64 -lcuda-lcurand -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\pycuda\_driver.pyd   C:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:cannot find -lcuda   C:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:cannot find -lcurand.
Best Regards,Arnold TunickUS Army Research Laboratory
Arnold Tunick
2016-02-11 23:18:06 UTC
Permalink
1. Updated to Visual Studio 20132. Updated to CUDA 7.5.183. downloaded pip and pipwin and pycuda-2015.1.3+cuda7518-cp27-none-win_amd64.whl4. easily installed pycuda by running ... >>install C:\SciSoft\WinPython-64bit-2.7.9.4\settings\pipwin\pycuda-2015.1.3+cuda7518-cp27-none-win_amd64.whl5. ran pycuda test: hello_gpu.py and got the following error:            nvcc fatal: nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2010, 2012, and 2013 are supported.6. While I upgraded to VS 2013 I see that I still/only have "C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0" which is the C++ compiler supported for Python 2.7.7. What do I need to do to get pycuda test examples to work?Best,Arnold Tunick
Andreas Kloeckner
2016-02-12 00:08:05 UTC
Permalink
1. Updated to Visual Studio 20132. Updated to CUDA 7.5.183. downloaded pip and pipwin and pycuda-2015.1.3+cuda7518-cp27-none-win_amd64.whl4. easily installed pycuda by running ... >>install C:\SciSoft\WinPython-64bit-2.7.9.4\settings\pipwin\pycuda-2015.1.3+cuda7518-cp27-none-win_amd64.whl5. ran pycuda test: hello_gpu.py and got the following error:            nvcc fatal: nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2010, 2012, and 2013 are supported.6. While I upgraded to VS 2013 I see that I still/only have "C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0" which is the C++ compiler supported for Python 2.7.7. What do I need to do to get pycuda test examples to work?Best,Arnold Tunick
Are you running the correct vcvars script?

Andreas
Arnold Tunick
2016-02-12 18:28:00 UTC
Permalink
Thank you for your expert help. 1. As you recommended I updated C:\Program Files (x86)\Microsoft Visual Studio 12.0\vcvarsall.bat to point to VS 2013 bin, lib, inc, and VS-SDK folders.2. Successfully ran pycuda\examples\hello_gpu.py (see result below).Best regards,Arnold TunickUS Army Research Laboratory
PS> What is the User Warning indicated here? "The CUDA compiler succeeded, but said the following: kernel.cu?
=======================================================================================c:\SciSoft>cd C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\Lib\site-packages\pycuda\examples
C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\Lib\site-packages\pycuda\examples>python hello_gpu.pyhello_gpu.py:16: UserWarning: The CUDA compiler succeeded, but said the following:kernel.cu
  """)[ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
C:\SciSoft\WinPython-64bit-2.7.9.4\python-2.7.9.amd64\Lib\site-packages\pycuda\examples>
Loading...