Visual Studio 2013 - how to fix Error MSB3721 - exiting with code 1

Hey,

I just set up caffe on visual studio 2013 with CUDA 7.5. It worked well. Then I want to use the Dynamic parallel compilation, so I changed the “code generation” to “compute_52, sm_52” and changed the Generate Relocatable Device Code" to “Yes”. But i get the Error: MSB3721. I wonder if I miss some settings or sth.

Error 1 error MSB3721: The command ““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\nvcc.exe” -dlink -o D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\libcaffe.device-link.obj -Xcompiler “/EHsc /W1 /nologo /Ox /Zi /MD " -L"D:\Work\NugetPackages\boost_date_time-vc120.1.59.0.0\build\native…\lib\native\address-model-64\lib” -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\x64” “D:\Work\NugetPackages\lmdb-v120-clean.0.9.14.0\build\native…\lib\native\lib\x64\lmdb.lib” “D:\Work\NugetPackages\LevelDB-vc120.1.2.0.0\build\native…/…//build/native/lib/x64\v120\Release\LevelDb.lib” “D:\Work\NugetPackages\protobuf-v120.2.6.1\build\native…/…//build/native/lib/x64\v120\Release\libprotobuf.lib” D:\Work\NugetPackages\glog.0.3.3.0\build\native…/…/build/native/lib/x64/v120/Release/dynamic/libglog.lib D:\Work\NugetPackages\gflags.2.1.2.1\build\native…/…/build/native/x64/v120/dynamic/Lib/gflags.lib “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\hdf5.lib” “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\hdf5_cpp.lib” “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\hdf5_f90cstub.lib” “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\hdf5_fortran.lib” “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\hdf5_hl.lib” “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\hdf5_hl_cpp.lib” “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\hdf5_hl_f90cstub.lib” “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\hdf5_hl_fortran.lib” “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\hdf5_tools.lib” “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\szip.lib” “D:\Work\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native…\lib\native\lib\x64\zlib.lib” D:\Work\NugetPackages\OpenBLAS.0.2.14.1\build\native…\lib\native\lib\x64\libopenblas.dll.a D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_videostab2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_video2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_ts2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_superres2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_stitching2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_photo2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_ocl2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_objdetect2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_nonfree2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_ml2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_legacy2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_imgproc2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_highgui2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_gpu2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_flann2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_features2d2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_core2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_contrib2410.lib D:\Work\NugetPackages\OpenCV.2.4.10\build\native…/…/build/native/lib/x64/v120/Release/opencv_calib3d2410.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -gencode=arch=compute_52,code=sm_52 --machine 64 “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\absval_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\base_data_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\batch_norm_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\batch_reindex_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\bias_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\bnll_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\concat_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\contrastive_loss_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\conv_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\crop_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\cudnn_conv_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\cudnn_lcn_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\cudnn_lrn_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\cudnn_pooling_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\cudnn_relu_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\cudnn_sigmoid_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\cudnn_softmax_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\cudnn_tanh_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\deconv_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\dropout_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\eltwise_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\elu_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\embed_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\euclidean_loss_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\exp_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\filter_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\hdf5_data_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\hdf5_output_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\im2col_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\inner_product_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\log_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\lrn_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\mvn_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\pooling_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\power_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\prelu_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\reduction_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\relu_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\scale_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\sigmoid_cross_entropy_loss_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\sigmoid_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\silence_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\slice_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\softmax_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\softmax_loss_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\split_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\tanh_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\threshold_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\tile_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\adadelta_solver.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\adagrad_solver.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\adam_solver.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\nesterov_solver.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\rmsprop_solver.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\sgd_solver.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\im2col.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\math_functions.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\compress_conv_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\compress_inner_product_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\quantization_conv_layer.cu.obj” “D:\Work\caffe-windows-quantization\windows…\Build\Int\libcaffe\x64\Release\quantization_inner_product_layer.cu.obj”" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.5.targets 690 9 libcaffe

I hope you have a solution for this problem.

thanks.

The MSB3721 error is not sufficient to determine the problem. You’ll need to increase the verbosity of Visual Studio (please google that) and get the error output from nvcc that occurs immediately prior to the MSB3721 error.