C++ Compiler errors when using GPU Coder
이전 댓글 표시
I am trying to use the GPU Coder app to generate GPU codes for various functions I have in matlab. I have gotten this to work succesfully a handful of times but for most attempts I cannot get past the code verification stage and it fails while building MEX. The error I get is "Build error: C++ compiler produced errors. See the Build Log for further details." I will paste the build log below as it is quite long. From what I can tell it is not regocnizing that I have a compiler that can be used but I have both microsoft visual studio 11.8 and WinGw 8.1. when I use mex -setup matlab sees that I have both of these installed so I am not sure what the issue is here. For some of my codes this happen and I keep playing with it and randomly it will work and then go back to the same error if I try again. I am using matlab 2023a with Cuda 11.8 on an RTX 3060 ti. Any help would be greatly appreciated.
Here is the build log:
[1/11] cl /c /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /utf-8 /I "." /I "C:\Users\Bakir\OneDrive - University of Nebraska-Lincoln\Doccuments\Nanoscale Labratory\MATLAB Code\Near-Field Replication\Francoeur Role of Fluctuational Electrodynamics 2008\GPU Code (Not Working)\Sina GPU" /I ".\interface" /I "D:\MATLAB\extern\include" /I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=heatflux_evan_mex -DMW_NEEDS_VERSION_H interface\_coder_heatflux_evan_info.cpp /Fobuild\win64\_coder_heatflux_evan_info.obj
FAILED: build/win64/_coder_heatflux_evan_info.obj
cl /c /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /utf-8 /I "." /I "C:\Users\Bakir\OneDrive - University of Nebraska-Lincoln\Doccuments\Nanoscale Labratory\MATLAB Code\Near-Field Replication\Francoeur Role of Fluctuational Electrodynamics 2008\GPU Code (Not Working)\Sina GPU" /I ".\interface" /I "D:\MATLAB\extern\include" /I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=heatflux_evan_mex -DMW_NEEDS_VERSION_H interface\_coder_heatflux_evan_info.cpp /Fobuild\win64\_coder_heatflux_evan_info.obj
_coder_heatflux_evan_info.cpp
c1xx: fatal error C1083: Cannot open source file: 'interface\_coder_heatflux_evan_info.cpp': No such file or directory
[2/11] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users\Bakir\OneDrive - University of Nebraska-Lincoln\Doccuments\Nanoscale Labratory\MATLAB Code\Near-Field Replication\Francoeur Role of Fluctuational Electrodynamics 2008\GPU Code (Not Working)\Sina GPU" -I ".\interface" -I "D:\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=heatflux_evan_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "D:\MATLAB/simulink/include" -I "D:\MATLAB/toolbox/shared/simtargets" interface\_coder_heatflux_evan_api.cu -o build\win64\_coder_heatflux_evan_api.obj
FAILED: build/win64/_coder_heatflux_evan_api.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users\Bakir\OneDrive - University of Nebraska-Lincoln\Doccuments\Nanoscale Labratory\MATLAB Code\Near-Field Replication\Francoeur Role of Fluctuational Electrodynamics 2008\GPU Code (Not Working)\Sina GPU" -I ".\interface" -I "D:\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=heatflux_evan_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "D:\MATLAB/simulink/include" -I "D:\MATLAB/toolbox/shared/simtargets" interface\_coder_heatflux_evan_api.cu -o build\win64\_coder_heatflux_evan_api.obj
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with GPU Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!