2017-02-10 6 views
0

Pyano 환경에서 며칠 동안 Theano를 GPU와 함께 사용하려고합니다.가져 오기 중 컴파일러 라이브러리를로드하는 중 오류가 발생했습니다. 치명적인 오류 C1083

d:\anaconda2\include\pyconfig.h(239) : fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory 

내가 포함하려고 : theano를 가져 오는 동안, 나는이 오류 얻을 "D를 : \ Anaconda2 \는 MinGW \ x86_64에-W64-mingw32은 \ 포함"PYTHONPATH에 (이 폴더는 "pyconfig.h는"포함) PATH 및 .theanorc.txt에 동일한 오류 메시지가 표시됩니다.

아나콘다/cuda/nvcc를 Theano의 컴파일러에 연결하기위한 아이디어가 있습니까? 여기

내 구성입니다 :

  • OS : 윈도우 7
  • GPU : 지포스 GTX 950
  • CL.EXE : D : \ 프로그램 파일 마이크로 소프트 비주얼 스튜디오 11.0 \ VC \ \ (86) 빈
  • nvcc.exe : C : \ 프로그램 파일 \ NVIDIA GPU 컴퓨팅 툴킷 \ CUDA \의 V8.0의 \ 빈
  • 파이썬 IDE : 아나콘다 2에서, 파이썬에서 스파이더 2.
  • Theano 0.8.2

CPU로 "theano 가져 오기"를 할 수 있지만 GPU를 계산에 사용하고 싶습니다.

"import theano"(device = gpu)를 입력하면 오류를 표시하기 전에 "nvcc.exe"를 실행하는 콘솔 창을 볼 수 있습니다.

나는 비주얼 스튜디오 2012 CUDA를 테스트하며 "bilateralFilter"예를 들어, 작동하고 오류없이 Visual Studio에서 작동합니다

Found 1 CUDA Capable device(s) supporting CUDA 
Device 0: "GeForce GTX 950" 
CUDA Runtime Version: 8.0 
CUDA Compute Capability: 5.2 
... 
Running Standard Demonstration with GLUT loop... 
여기
  • 가 내 theanorc.txt 파일 (동일한 오류가 발생합니다 또는 [NVCC] 및 [쿠다])없이 여기

    [global] 
    device = gpu 
    floatX = float32 
    
    [cuda] 
    root = -LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0 
    
    [nvcc] 
    flags = -LD:\Anaconda\libs 
    fastmath = True 
    compiler-bindir = -LD:\Anaconda2\MinGW\x86_64-w64-mingw32\include 
    
  • 내 경로

    여기
  • 여기 내 PYTHONPATH

    D:\Anaconda2\MinGW\x86_64-w64-mingw32\include 
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC 
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64 
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin 
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0 
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin 
    
  • 입니다 (장치와 theanorc.txt에서 = GPU) 스파이더에서 "수입 theano"를 입력 한 후 전체 오류 메시지입니다 :

    1 #define _CUDA_NDARRAY_C 
    2 
    3 #include <Python.h> 
    4 #include <structmember.h> 
    5 #include "theano_mod_helper.h" 
    6 
    7 #include <numpy/arrayobject.h> 
    8 #include <iostream> 
    ... 
    5358 /* 
    5359 Local Variables: 
    5360 mode:c++ 
    5361 c-basic-offset:4 
    5362 c-file-style:"stroustrup" 
    5363 indent-tabs-mode:nil 
    5364 fill-column:79 
    5365 End: 
    5366 */ 
    5367 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=79 : 
    5368 
    =============================== 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\math_functions.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\math_functions.h(849) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\math_functions.h(1787) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\math_functions.h(2637) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\math_functions.h(3492) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\math_functions.h(4431) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\math_functions.h(5345) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\math_functions.h(6252) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\math_functions.h(7142) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\math_functions.h(7956) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\device_functions.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\device_functions.h(774) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\device_functions.h(1618) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\device_double_functions.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\sm_20_intrinsics.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    c:\program files\nvidia gpu computing toolkit\cuda\v8.0\include\sm_20_intrinsics.h(943) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 
    d:\anaconda2\include\pyconfig.h(239) : fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory 
    ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: ('nvcc return status', 2, 'for cmd', 'nvcc -shared -O3 -LD:\\Anaconda\\libs -use_fast_math -Xlinker /DEBUG -D HAVE_ROUND -m64 -Xcompiler -DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD -ID:\\Anaconda2\\lib\\site-packages\\theano\\sandbox\\cuda -ID:\\Anaconda2\\lib\\site-packages\\numpy\\core\\include -ID:\\Anaconda2\\include -ID:\\Anaconda2\\lib\\site-packages\\theano\\gof -o C:\\Users\\Administrator\\AppData\\Local\\Theano\\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.13-64\\cuda_ndarray\\cuda_ndarray.pyd mod.cu -LD:\\Anaconda2\\libs -LD:\\Anaconda2 -lcublas -lpython27 -lcudart') 
    WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available (error: cuda unavailable) 
    nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). 
    mod.cu 
    
    ['nvcc', '-shared', '-O3', '-LD:\\Anaconda\\libs', '-use_fast_math', '-Xlinker', '/DEBUG', '-D HAVE_ROUND', '-m64', '-Xcompiler', '-DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD', '-ID:\\Anaconda2\\lib\\site-packages\\theano\\sandbox\\cuda', '-ID:\\Anaconda2\\lib\\site-packages\\numpy\\core\\include', '-ID:\\Anaconda2\\include', '-ID:\\Anaconda2\\lib\\site-packages\\theano\\gof', '-o', 'C:\\Users\\Administrator\\AppData\\Local\\Theano\\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.13-64\\cuda_ndarray\\cuda_ndarray.pyd', 'mod.cu', '-LD:\\Anaconda2\\libs', '-LD:\\Anaconda2', '-lcublas', '-lpython27', '-lcudart'] 
    

답변

0

내 문제에 대한 해결책을 찾았습니다. \ 프로그램 파일 마이크로 소프트 비주얼 스튜디오 \ (86) 11.0 \ VC \ 빈 \ AMD64의 \의 vcvars64.bat : PATH

  • 시작 C를에 \ WINDOWS \ system32를 :

    짧은 대답

    1. C 추가

    끝.내 .theanorc.txt

    아무것도 여기

    됩니다 :

    [global] 
    device=gpu 
    floatx = float32 
    
    다음
    C:\Windows\System32 
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin 
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64 
    D:\Anaconda2 
    D:\Anaconda2\Scripts 
    D:\Anaconda2\Library\bin 
    

    내 PYTHONPATH입니다 : 내용

    , 여기에 내 새로운 현재 PATH입니다

    일부 세부 사항

    이 게시물의 설명에 따라 PATH 외에 Windows 레지스트리를 구성해야합니다. compilation error in visual studio linked with python26 . 그것은 내가 전에 이런 짓을

    vcvars64.bat 실행하여 수행하지만이 메시지가 나타난 것을 알 수 깜빡입니다 :

    ERROR: Cannot determine the location of the VS Common Tools folder. 
    

    따르면 https://social.msdn.microsoft.com/Forums/en-US/78703f6b-f610-456c-b770-76a12be3e1ae/error-cannot-determine-the-location-of-the-vs-common-tools-folder?forum=vssetup에,이 솔루션은 C를 추가하는 것입니다 : \ WINDOWS \ SYSTEM32에 통로.