1. 程式人生 > >[ FAILED ] SGDSolverTest/0.TestSnapshotShare, where TypeParam = caffe::CPUDevice解決方案

[ FAILED ] SGDSolverTest/0.TestSnapshotShare, where TypeParam = caffe::CPUDevice解決方案

1. 手動下載Boost庫1.55。

        wget -O boost_1_55_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download

        tar xzvf boost_1_55_0.tar.gz

        cd boost_1_55_0/

2. 安裝依賴庫。(建議跳過這一步,萬一把GCC升級到高版本可能CUDA-8.0不支援。CUDA-8.0目前支援GCC 5.3及以下。我使用的是CUDA-8.0.27, GCC 5.3.0

        sudo apt-get update

        sudo apt-get install build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev

3. 用Boost庫的bootstrap方式安裝。

        ./bootstrap.sh --prefix=/usr/local

4. 如果需要使用MPI,就得設定user-config.jam檔案中標誌。

        user_configFile=`find $PWD -name user-config.jam`

        echo "using mpi ;" >> $user_configFile

5. 查詢CPU核的數目。

        n=`cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $NF}'`

6. 並行安裝Boost庫。

        sudo ./b2 --with=all -j $n install

7. 如果系統中/usr/local/lib不存在,就需要新增到LD LIBRARY PATH中。

        sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/local.conf'

8. 重置ldconfig。

        sudo ldconfig