配置WIN7 X64是5.0+vs2010
請問我哪個環節的設定出了問題呢
CUDA範例程式只有一半能跑 其他都閃一下跳掉
kernel.cu 建置成功 無法編譯成功
程式碼如下
#include< stdio.h>#include “cuda_runtime.h”#include “device_launch_parameters.h”
bool InitCUDA(){ int count; cudaGetDeviceCount(&count); if(count == 0) { fprintf(stderr, “There is no device.\n”); return false; } int i; for(i = 0; i < count; i++) { cudaDeviceProp prop; if(cudaGetDeviceProperties(&prop, i) == cudaSuccess) { if(prop.major >= 1) { break; } } } if(i == count) { fprintf(stderr, “There is no device supporting CUDA 1.x.\n”); return false; } cudaSetDevice(i); return true;}
int main(){ if(!InitCUDA()) { return 0; } printf(“HelloWorld, CUDA has been initialized.\n”); return 0;}
錯誤如下
‘12.exe’: 已載入 ‘C:\Users\Administrator\Documents\Visual Studio 2010\Projects\12\x64\Debug\12.exe’,已載入符號’12.exe’: 已載入 ‘C:\Windows\System32\ntdll.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\kernel32.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\KernelBase.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Users\Administrator\Documents\Visual Studio 2010\Projects\12\x64\Debug\cudart64_50_35.dll’,二進位碼不是以偵錯資訊而建置。‘12.exe’: 已載入 ‘C:\Windows\System32\msvcr100d.dll’,已載入符號’12.exe’: 已載入 ‘C:\Windows\System32\nvcuda.dll’,二進位碼不是以偵錯資訊而建置。‘12.exe’: 已載入 ‘C:\Windows\System32\user32.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\gdi32.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\lpk.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\usp10.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\msvcrt.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\setupapi.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\cfgmgr32.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\rpcrt4.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\advapi32.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\sechost.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\oleaut32.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\ole32.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\devobj.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\shell32.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\shlwapi.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\imm32.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\msctf.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\dwmapi.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已卸載 ‘C:\Windows\System32\dwmapi.dll’‘12.exe’: 已載入 ‘C:\Windows\System32\nvapi64.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\version.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\wintrust.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\crypt32.dll’,找不到或無法開啟 PDB 檔案’12.exe’: 已載入 ‘C:\Windows\System32\msasn1.dll’,找不到或無法開啟 PDB 檔案