^ AR -o .build_release/lib/libcaffe-nv.a LD -o .build_release/lib/libcaffe-nv.so.0.17.0 /usr/bin/ld: cannot find -lnvidia-ml collect2: error: ld returned 1 exit status Makefile:600: recipe for target '.build_release/lib/libcaffe-nv.so.0.17.0' failed make: *** [.build_release/lib/libcaffe-nv.so.0.17.0] Error 1ref:ubuntu NVIDIA-SMI couldn't find libnvidia-ml.so library in your system.
< 找一下libnvidia-ml.so 在哪裡...
$ locate libnvidia-ml.so /usr/lib/nvidia-410/libnvidia-ml.so /usr/lib/nvidia-410/libnvidia-ml.so.1 /usr/lib/nvidia-410/libnvidia-ml.so.410.104 /usr/lib32/nvidia-410/libnvidia-ml.so /usr/lib32/nvidia-410/libnvidia-ml.so.1 /usr/lib32/nvidia-410/libnvidia-ml.so.410.104 /usr/local/cuda-10.0/targets/x86_64-linux/lib/stubs/libnvidia-ml.so /usr/local/cuda-10.1/targets/x86_64-linux/lib/stubs/libnvidia-ml.so然後依照這一篇檢查 ld.so.conf.d
cuda-10.0.config 的設定是正常的:
$ cat /etc/ld.so.conf.d/cuda-10-0.conf /usr/local/cuda-10.0/targets/x86_64-linux/lib /usr/lib/nvidia-410有兩個 libnvidia-ml.so 的原因,這一篇 說得很清楚。
結果一樣,還是 fail。用 make -n看一下這個 ld 的完整option..
$ make -n .build_release/lib/libcaffe-nv.so.0.17.0 echo LD -o .build_release/lib/libcaffe-nv.so.0.17.0 g++ -shared -o .build_release/lib/libcaffe-nv.so.0.17.0 .build_release/src/caffe/proto/caffe.pb.o .build_release/src/caffe/net.o .build_release/src/caffe/layer_factory.o .build_release/src/caffe/quantized_layer.o .build_release/src/caffe/tensor.o .build_release/src/caffe/layers/sigmoid_cross_entropy_loss_layer.o .build_release/src/caffe/layers/reshape_layer.o .build_release/src/caffe/layers/cudnn_dropout_layer.o .build_release/src/caffe/layers/hdf5_output_layer.o .build_release/src/caffe/layers/reduction_layer.o .build_release/src/caffe/layers/tanh_layer.o .build_release/src/caffe/layers/sigmoid_layer.o .build_release/src/caffe/layers/smooth_L1_loss_layer.o .build_release/src/caffe/layers/cudnn_tanh_layer.o .build_release/src/caffe/layers/silence_layer.o .build_release/src/caffe/layers/bias_layer.o .build_release/src/caffe/layers/detection_output_layer.o .build_release/src/caffe/layers/normalize_layer.o .build_release/src/caffe/layers/slice_layer.o .build_release/src/caffe/layers/pooling_layer.o .build_release/src/caffe/layers/detection_evaluate_layer.o .build_release/src/caffe/layers/relu_layer.o .build_release/src/caffe/layers/split_layer.o .build_release/src/caffe/layers/batch_reindex_layer.o .build_release/src/caffe/layers/cudnn_sigmoid_layer.o .build_release/src/caffe/layers/conv_layer.o .build_release/src/caffe/layers/bnll_layer.o .build_release/src/caffe/layers/base_conv_layer.o .build_release/src/caffe/layers/cudnn_softmax_layer.o .build_release/src/caffe/layers/crop_layer.o .build_release/src/caffe/layers/multinomial_logistic_loss_layer.o .build_release/src/caffe/layers/cudnn_lcn_layer.o .build_release/src/caffe/layers/base_data_layer.o .build_release/src/caffe/layers/rnn_layer.o .build_release/src/caffe/layers/flatten_layer.o .build_release/src/caffe/layers/permute_layer.o .build_release/src/caffe/layers/cudnn_lrn_layer.o .build_release/src/caffe/layers/dropout_layer.o .build_release/src/caffe/layers/cudnn_relu_layer.o .build_release/src/caffe/layers/hdf5_data_layer.o .build_release/src/caffe/layers/tile_layer.o .build_release/src/caffe/layers/mvn_layer.o .build_release/src/caffe/layers/lstm_layer.o .build_release/src/caffe/layers/lrn_layer.o .build_release/src/caffe/layers/argmax_layer.o .build_release/src/caffe/layers/euclidean_loss_layer.o .build_release/src/caffe/layers/python_layer.o .build_release/src/caffe/layers/image_label_data_layer.o .build_release/src/caffe/layers/annotated_data_layer.o .build_release/src/caffe/layers/cudnn_deconv_layer.o .build_release/src/caffe/layers/cudnn_batch_norm_layer.o .build_release/src/caffe/layers/contrastive_loss_layer.o .build_release/src/caffe/layers/exp_layer.o .build_release/src/caffe/layers/memory_data_layer.o .build_release/src/caffe/layers/log_layer.o .build_release/src/caffe/layers/accuracy_layer.o .build_release/src/caffe/layers/neuron_layer.o .build_release/src/caffe/layers/dummy_data_layer.o .build_release/src/caffe/layers/l1_loss_layer.o .build_release/src/caffe/layers/segmentation_accuracy_layer.o .build_release/src/caffe/layers/video_data_layer.o .build_release/src/caffe/layers/softmax_layer.o .build_release/src/caffe/layers/image_data_layer.o .build_release/src/caffe/layers/absval_layer.o .build_release/src/caffe/layers/deconv_layer.o .build_release/src/caffe/layers/detectnet_transform_layer.o .build_release/src/caffe/layers/eltwise_layer.o .build_release/src/caffe/layers/loss_layer.o .build_release/src/caffe/layers/input_layer.o .build_release/src/caffe/layers/infogain_loss_layer.o .build_release/src/caffe/layers/inner_product_layer.o .build_release/src/caffe/layers/hinge_loss_layer.o .build_release/src/caffe/layers/concat_layer.o .build_release/src/caffe/layers/multibox_loss_layer.o .build_release/src/caffe/layers/data_layer.o .build_release/src/caffe/layers/embed_layer.o .build_release/src/caffe/layers/lstm_unit_layer.o .build_release/src/caffe/layers/recurrent_layer.o .build_release/src/caffe/layers/elu_layer.o .build_release/src/caffe/layers/scale_layer.o .build_release/src/caffe/layers/cudnn_pooling_layer.o .build_release/src/caffe/layers/filter_layer.o .build_release/src/caffe/layers/cudnn_conv_layer.o .build_release/src/caffe/layers/im2col_layer.o .build_release/src/caffe/layers/threshold_layer.o .build_release/src/caffe/layers/prelu_layer.o .build_release/src/caffe/layers/power_layer.o .build_release/src/caffe/layers/spp_layer.o .build_release/src/caffe/layers/batch_norm_layer.o .build_release/src/caffe/layers/window_data_layer.o .build_release/src/caffe/layers/axpy_layer.o .build_release/src/caffe/layers/softmax_loss_layer.o .build_release/src/caffe/layers/prior_box_layer.o .build_release/src/caffe/blob.o .build_release/src/caffe/solver.o .build_release/src/caffe/syncedmem.o .build_release/src/caffe/util/gpu_memory.o .build_release/src/caffe/util/io.o .build_release/src/caffe/util/im_transforms.o .build_release/src/caffe/util/bbox_util.o .build_release/src/caffe/util/benchmark.o .build_release/src/caffe/util/sampler.o .build_release/src/caffe/util/cudnn.o .build_release/src/caffe/util/db_lmdb.o .build_release/src/caffe/util/hdf5.o .build_release/src/caffe/util/db.o .build_release/src/caffe/util/upgrade_proto.o .build_release/src/caffe/util/detectnet_coverage_rectangular.o .build_release/src/caffe/util/signal_handler.o .build_release/src/caffe/util/blocking_queue.o .build_release/src/caffe/util/db_leveldb.o .build_release/src/caffe/util/im2col.o .build_release/src/caffe/util/math_functions.o .build_release/src/caffe/util/insert_splits.o .build_release/src/caffe/solvers/nesterov_solver.o .build_release/src/caffe/solvers/adam_solver.o .build_release/src/caffe/solvers/sgd_solver.o .build_release/src/caffe/solvers/rmsprop_solver.o .build_release/src/caffe/solvers/adagrad_solver.o .build_release/src/caffe/solvers/adadelta_solver.o .build_release/src/caffe/data_transformer.o .build_release/src/caffe/parallel.o .build_release/src/caffe/common.o .build_release/src/caffe/batch_transformer.o .build_release/src/caffe/internal_thread.o .build_release/src/caffe/layer.o .build_release/src/caffe/data_reader.o .build_release/src/caffe/type.o .build_release/cuda/src/caffe/layers/filter_layer.o .build_release/cuda/src/caffe/layers/cudnn_tanh_layer.o .build_release/cuda/src/caffe/layers/silence_layer.o .build_release/cuda/src/caffe/layers/softmax_loss_layer.o .build_release/cuda/src/caffe/layers/log_layer.o .build_release/cuda/src/caffe/layers/sigmoid_layer.o .build_release/cuda/src/caffe/layers/recurrent_layer.o .build_release/cuda/src/caffe/layers/prelu_layer.o .build_release/cuda/src/caffe/layers/elu_layer.o .build_release/cuda/src/caffe/layers/accuracy_layer.o .build_release/cuda/src/caffe/layers/deconv_layer.o .build_release/cuda/src/caffe/layers/exp_layer.o .build_release/cuda/src/caffe/layers/cudnn_deconv_layer.o .build_release/cuda/src/caffe/layers/cudnn_lcn_layer.o .build_release/cuda/src/caffe/layers/cudnn_softmax_layer.o .build_release/cuda/src/caffe/layers/sigmoid_cross_entropy_loss_layer.o .build_release/cuda/src/caffe/layers/dropout_layer.o .build_release/cuda/src/caffe/layers/crop_layer.o .build_release/cuda/src/caffe/layers/threshold_layer.o .build_release/cuda/src/caffe/layers/im2col_layer.o .build_release/cuda/src/caffe/layers/embed_layer.o .build_release/cuda/src/caffe/layers/smooth_L1_loss_layer.o .build_release/cuda/src/caffe/layers/lstm_unit_layer.o .build_release/cuda/src/caffe/layers/slice_layer.o .build_release/cuda/src/caffe/layers/cudnn_relu_layer.o .build_release/cuda/src/caffe/layers/normalize_layer.o .build_release/cuda/src/caffe/layers/conv_layer.o .build_release/cuda/src/caffe/layers/contrastive_loss_layer.o .build_release/cuda/src/caffe/layers/inner_product_layer.o .build_release/cuda/src/caffe/layers/hdf5_output_layer.o .build_release/cuda/src/caffe/layers/cudnn_conv_layer.o .build_release/cuda/src/caffe/layers/bnll_layer.o .build_release/cuda/src/caffe/layers/hdf5_data_layer.o .build_release/cuda/src/caffe/layers/relu_layer.o .build_release/cuda/src/caffe/layers/cudnn_sigmoid_layer.o .build_release/cuda/src/caffe/layers/power_layer.o .build_release/cuda/src/caffe/layers/lrn_layer.o .build_release/cuda/src/caffe/layers/cudnn_batch_norm_layer.o .build_release/cuda/src/caffe/layers/tile_layer.o .build_release/cuda/src/caffe/layers/cudnn_pooling_layer.o .build_release/cuda/src/caffe/layers/euclidean_loss_layer.o .build_release/cuda/src/caffe/layers/bias_layer.o .build_release/cuda/src/caffe/layers/mvn_layer.o .build_release/cuda/src/caffe/layers/tanh_layer.o .build_release/cuda/src/caffe/layers/concat_layer.o .build_release/cuda/src/caffe/layers/split_layer.o .build_release/cuda/src/caffe/layers/detectnet_transform_layer.o .build_release/cuda/src/caffe/layers/absval_layer.o .build_release/cuda/src/caffe/layers/cudnn_lrn_layer.o .build_release/cuda/src/caffe/layers/detection_output_layer.o .build_release/cuda/src/caffe/layers/softmax_layer.o .build_release/cuda/src/caffe/layers/permute_layer.o .build_release/cuda/src/caffe/layers/base_data_layer.o .build_release/cuda/src/caffe/layers/l1_loss_layer.o .build_release/cuda/src/caffe/layers/reduction_layer.o .build_release/cuda/src/caffe/layers/scale_layer.o .build_release/cuda/src/caffe/layers/eltwise_layer.o .build_release/cuda/src/caffe/layers/batch_reindex_layer.o .build_release/cuda/src/caffe/layers/pooling_layer.o .build_release/cuda/src/caffe/layers/axpy_layer.o .build_release/cuda/src/caffe/layers/batch_norm_layer.o .build_release/cuda/src/caffe/layers/cudnn_dropout_layer.o .build_release/cuda/src/caffe/util/math_functions2.o .build_release/cuda/src/caffe/util/gpu_amax.o .build_release/cuda/src/caffe/util/gpu_sumsq.o .build_release/cuda/src/caffe/util/gpu_asum.o .build_release/cuda/src/caffe/util/im2col.o .build_release/cuda/src/caffe/util/bbox_util.o .build_release/cuda/src/caffe/util/math_functions.o .build_release/cuda/src/caffe/solvers/nesterov_solver.o .build_release/cuda/src/caffe/solvers/adagrad_solver.o .build_release/cuda/src/caffe/solvers/adam_solver.o .build_release/cuda/src/caffe/solvers/sgd_solver.o .build_release/cuda/src/caffe/solvers/rmsprop_solver.o .build_release/cuda/src/caffe/solvers/adadelta_solver.o .build_release/cuda/src/caffe/quantized_layer.o .build_release/cuda/src/caffe/data_transformer.o -Wl,-soname,libcaffe-nv.so.0.17 -Wl,-rpath,\$ORIGIN/../lib -pthread -fPIC - DCAFFE_VERSION=0.17.0 -std=c++11 -DCUDA_NO_HALF -DNDEBUG -O2 -DUSE_CUDNN -DUSE_OPENCV -DUSE_LEVELDB -DUSE_LMDB -DWITH_PYTHON_LAYER - I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/include/hdf5/serial - I.build_release/src -I./src -I./include -I./3rdparty -I/usr/include/hdf5/serial -I/usr/local/cuda/include -I/cuda/include -I/include - I/opt/OpenBLAS/include/ -Wall -Wno-sign-compare -L/usr/lib -L/usr/local/lib -L/usr/lib -L/usr/lib/x86_64-linux-gnu/hdf5/serial - L/usr/local/cuda/lib64 -L/usr/lib/nvidia-396 -L/usr/lib/nvidia-390 -L/usr/lib/nvidia-387 -L/usr/lib/nvidia-384 -L/usr/lib/nvidia-381 - L/usr/lib/nvidia-375 -L/usr/lib/nvidia-367 -L/usr/lib/nvidia-361 -L/usr/lib/nvidia-352 -L/usr/local/cuda/lib -L/cuda/lib64 -L/lib64 - L/usr/lib/x86_64-linux-gnu/hdf5/serial -L/opt/OpenBLAS/lib/ -L.build_release/lib -L/usr/local/lib -lopencv_stitching -lopencv_superres - lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn -lopencv_dpm -lopencv_fuzzy - lopencv_line_descriptor -lopencv_optflow -lopencv_plot -lopencv_reg -lopencv_saliency -lopencv_stereo -lopencv_structured_light - lopencv_rgbd -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_face -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_xobjdetect -lopencv_objdetect -lopencv_ml - lopencv_xphoto -lippicv -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_photo -lopencv_imgproc -lopencv_core -lcudart - lcublas -lcurand -lnvidia-ml -lboost_system -lglog -lgflags -lprotobuf -lboost_filesystem -lm -lturbojpeg -lhdf5_hl -lhdf5 -lleveldb - lsnappy -llmdb -lopencv_core -lopencv_highgui -lopencv_imgproc -lboost_thread -lboost_regex -lstdc++ -lcudnn -lboost_python-py27 - lpython2.7 -lboost_regex -lopenblas cd .build_release/lib; rm -f libcaffe-nv.so.0.17; ln -s libcaffe-nv.so.0.17.0 libcaffe-nv.so.0.17 cd .build_release/lib; rm -f libcaffe-nv.so; ln -s libcaffe-nv.so.0.17 libcaffe-nv.so所以他沒有吃標準的ld path..
只好手動修改 Makefile..
diff --git a/Makefile b/Makefile index 858886c..6ce5dca 100644 --- a/Makefile +++ b/Makefile @@ -179,7 +179,7 @@ CUDA_LIB_DIR := # add這樣就 build OK 了../lib64 only if it exists ifneq ("$(wildcard $(CUDA_DIR)/lib64)","") CUDA_LIB_DIR += $(CUDA_DIR)/lib64 - CUDA_LIB_DIR += /usr/lib/nvidia-396 /usr/lib/nvidia-390 /usr/lib/nvidia-387 /usr/lib/nvidia-384 /usr/lib/nvidia-381 /usr/lib/nvidia-375 /usr/lib/nvidia-367 /usr/lib/nvidia-361 /usr/lib/nvidia-352 + CUDA_LIB_DIR += /usr/lib/nvidia-410 /usr/lib/nvidia-390 /usr/lib/nvidia-387 /usr/lib/nvidia-384 /usr/lib/nvidia-381 /usr/lib/nvidia-375 /usr/lib/nvidia-367 /usr/lib/nvidia-361 /usr/lib/nvidia-352 endif CUDA_LIB_DIR += $(CUDA_DIR)/lib
make runtest 時有錯:
[==========] 2101 tests from 283 test cases ran. (442196 ms total) [ PASSED ] 2097 tests. [ FAILED ] 4 tests, listed below: [ FAILED ] LayerFactoryTest/0.TestCreateLayer, where TypeParam = caffe::CPUDevice[ FAILED ] LayerFactoryTest/1.TestCreateLayer, where TypeParam = caffe::CPUDevice [ FAILED ] LayerFactoryTest/2.TestCreateLayer, where TypeParam = caffe::GPUDevice [ FAILED ] LayerFactoryTest/3.TestCreateLayer, where TypeParam = caffe::GPUDevice 4 FAILED TESTS Makefile:560: recipe for target 'runtest' failed make: *** [runtest] Error 1
沒有留言:
張貼留言