cdcseacave / openMVS

open Multi-View Stereo reconstruction library
http://cdcseacave.github.io
GNU Affero General Public License v3.0
3.31k stars 907 forks source link

complie with cuda crashed #756

Open WilliamOChai opened 2 years ago

WilliamOChai commented 2 years ago

Os:Windows11 Cpu:AMD 5800h Gpu:RTX3070 Cuda Version:11.1 Cmake succeeded, but when compiling, the following bug appeared:

5>CUDACOMPILE : nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). 5>nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified 5>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\CUDA 11.1.targets(785,9): error MSB3721: 命令“"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin\nvcc.exe" -gencode=arch=compute_50,code=\"compute_50,compute_50\" -gencode=arch=compute_50,code=\"sm_50,compute_50\" -gencode=arch=compute_72,code=\"compute_72,compute_72\" -gencode=arch=compute_72,code=\"sm_72,compute_72\" -gencode=arch=compute_75,code=\"compute_75,compute_75\" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\include" -ID:\LIB\MVS\openMVS_new -ID:\LIB\MVS\openMVS_new\biuld -ID:\LIB\MVS\vcglib -ID:\LIB\boost_1_78_0 -ID:\LIB\MVS\eigen -ID:\LIB\MVS\opencv\opencv3.4.0\biuld -ID:\LIB\MVS\opencv\opencv3.4.0\include -ID:\LIB\MVS\opencv\opencv3.4.0\include\opencv -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudev\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\core\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudaarithm\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\flann\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\imgproc\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\ml\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\objdetect\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\phase_unwrapping\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\plot\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\reg\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\surface_matching\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\video\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\xphoto\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudabgsegm\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudafilters\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudaimgproc\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudawarping\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\dnn\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\fuzzy\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\img_hash\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\imgcodecs\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\photo\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\shape\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\videoio\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\xobjdetect\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudacodec\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\highgui\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\ts\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\bioinspired\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\dpm\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\features2d\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\line_descriptor\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\saliency\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\text\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\calib3d\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\ccalib\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudafeatures2d\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudalegacy\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudaobjdetect\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudaoptflow\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\cudastereo\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\datasets\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\rgbd\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\stereo\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\structured_light\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\superres\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\tracking\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\videostab\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\xfeatures2d\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\ximgproc\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\aruco\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\bgsegm\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\face\include -ID:\LIB\MVS\opencv\opencv_contrib3.4.0\modules\optflow\include -ID:\LIB\MVS\opencv\opencv3.4.0\modules\stitching\include -ID:\LIB\MVS\CGAL\include -ID:\LIB\MVS\CGAL\auxiliary\gmp\include -ID:\LIB\MVS\ceres\biuld\lib\include -ID:\LIB\MVS\glog\biuld\lib\include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static --expt-relaxed-constexpr /fp:strict /fp:except- /wd4503 /bigobj -std=c++17 -Xcompiler="/EHsc -Ob2" -D_WINDOWS -DNDEBUG -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_LIB -D_USE_OPENMP -D_USE_OPENGL -D_USE_CUDA -D_USE_BOOST -D_USE_EIGEN -D_USE_NONFREE -D_USE_FAST_FLOAT2INT -D_USE_FAST_CBRT -D_USE_SSE -D_USE_CERES -DOPENCV_TRAITS_ENABLE_DEPRECATED -DCERES_EXPORT_INTERNAL_SYMBOLS -D"CMAKE_INTDIR=\"Release\"" -D_MBCS -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -DNDEBUG -D_SCL_SECURE_NO_DEPRECATE -D_LIB -D_USE_OPENMP -D_USE_OPENGL -D_USE_CUDA -D_USE_BOOST -D_USE_EIGEN -D_USE_NONFREE -D_USE_FAST_FLOAT2INT -D_USE_FAST_CBRT -D_USE_SSE -D_USE_CERES -DOPENCV_TRAITS_ENABLE_DEPRECATED -DCERES_EXPORT_INTERNAL_SYMBOLS -D"CMAKE_INTDIR=\"Release\"" -Xcompiler "/EHsc /W3 /nologo /O2 /FdMVS.dir\Release\MVS.pdb /FS /MD /GR" -o MVS.dir\Release\/PatchMatchCUDA.cu.obj "D:\LIB\MVS\openMVS_new\libs\MVS\PatchMatchCUDA.cu"”Exited with return code 1。

WilliamOChai commented 2 years ago

I used Visual Studio2017

cdcseacave commented 2 years ago

pls try 2019 or 2022, I did not test on 2017

WilliamOChai commented 2 years ago

Thanks for your help, I compiled mvs on 2019, there are also some questions:

  1. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\utility(347,1): error C2678: 二进制“==”: 没有找到接受“const _Ty2”类型的左操作数的运算符(或没有可接受的转换)
  2. 4>D:\LIB\MVS\openMVS_new\libs\MVS\PatchMatchCUDA.cu(602): error : a global function call must be configured
WilliamOChai commented 2 years ago

Thanks for your help, I compiled mvs on 2019, there are also some questions:

  1. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\utility(347,1): error C2678: 二进制“==”: 没有找到接受“const _Ty2”类型的左操作数的运算符(或没有可接受的转换)
  2. 4>D:\LIB\MVS\openMVS_new\libs\MVS\PatchMatchCUDA.cu(602): error : a global function call must be configured
WilliamOChai commented 2 years ago

I download the new version of MVS, an I compiled it, there are some new questions: 5>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include\texture_indirect_functions.h(149): error : Internal Compiler Error (codegen): "unexpected operand in tex/surf handler"

WilliamOChai commented 2 years ago

pls try 2019 or 2022, I did not test on 2017

thanks for your help, I tried VS2019,there are some new issue about boost.

WilliamOChai commented 2 years ago

image

WilliamOChai commented 2 years ago

image

WilliamOChai commented 2 years ago

whether libboost or boost can not solve the problem.

PaopaoFace commented 1 year ago

I download the new version of MVS, an I compiled it, there are some new questions: 5>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include\texture_indirect_functions.h(149): error : Internal Compiler Error (codegen): "unexpected operand in tex/surf handler"

hello!when i build the project,i get the same problem.how do you solve it please?

WilliamOChai commented 1 year ago

Update you Visual studio. When I used Visual studio 2019, the problem disappeared.

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年10月12日(星期三) 中午11:25 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [cdcseacave/openMVS] complie with cuda crashed (Issue #756)

I download the new version of MVS, an I compiled it, there are some new questions: 5>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include\texture_indirect_functions.h(149): error : Internal Compiler Error (codegen): "unexpected operand in tex/surf handler"

hello!when i build the project,i get the same problem.how do you solve it please?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

denred0 commented 1 year ago

@RomanticZer0 did you solve this problem? I used VS2019 but get this error.

denred0 commented 1 year ago

This error connected with CUDA 11.3. Just update CUDA for 11.4 or downgrade for CUDA 11.2.

WilliamOChai commented 1 year ago

This error connected with CUDA 11.3. Just update CUDA for 11.4 or downgrade for CUDA 11.2. The problem disappeared when I used VS2019,but boost have some new issues.

WilliamOChai commented 1 year ago

The problem disappeared when I used VS2019,but boost have some new issues.

WilliamOChai commented 1 year ago

I download the new version of MVS, an I compiled it, there are some new questions: 5>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include\texture_indirect_functions.h(149): error : Internal Compiler Error (codegen): "unexpected operand in tex/surf handler"

hello!when i build the project,i get the same problem.how do you solve it please?

Use VS2019