Installation problems with pytorch (0.5.0)

It seems that there are some problems when I was installing caffe2. Could someone help?

+ for arg in '"$@"'
+ [[ caffe2 == \n\c\c\l ]]
+ [[ caffe2 == \g\l\o\o ]]
+ [[ caffe2 == \c\a\f\f\e\2 ]]
+ pushd /raid5/hithere/envs/pytorch
/raid5/hithere/envs/pytorch /raid5/hithere/envs/pytorch
+ build_caffe2
+ mkdir -p build
+ pushd build
/raid5/hithere/envs/pytorch/build /raid5/hithere/envs/pytorch /raid5/hithere/envs/pytorch
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_CAFFE2=OFF -DBUILD_ATEN=ON -DBUILD_PYTHON=OFF -DBUILD_BINARY=OFF -DBUILD_SHARED_LIBS=ON -DUSE_CUDA=1 -DUSE_ROCM=0 -DUSE_NNPACK=1 -DCUDNN_INCLUDE_DIR=/home/hithere/dependencies/cudnn_v7_8/include -DCUDNN_LIB_DIR=/home/hithere/dependencies/cudnn_v7_8/lib64 -DCUDNN_LIBRARY=/home/hithere/dependencies/cudnn_v7_8/lib64/ -DUSE_MKLDNN=1 -DMKLDNN_INCLUDE_DIR=/home/hithere/anaconda2/envs/t0.5py2.7/bin/../include -DMKLDNN_LIB_DIR=/home/hithere/anaconda2/envs/t0.5py2.7/bin/../lib -DMKLDNN_LIBRARY=/home/hithere/anaconda2/envs/t0.5py2.7/bin/../lib/ -DCMAKE_INSTALL_PREFIX=/raid5/hithere/envs/pytorch/torch/lib/tmp_install -DCMAKE_EXPORT_COMPILE_COMMANDS=1 '-DCMAKE_C_FLAGS= /usr/bin/g++-4.8' '-DCMAKE_CXX_FLAGS= /usr/bin/g++-4.8' '-DCMAKE_EXE_LINKER_FLAGS= /usr/bin/g++-4.8' '-DCMAKE_SHARED_LINKER_FLAGS= /usr/bin/g++-4.8'
-- The CXX compiler identification is GNU 4.8.5
-- The C compiler identification is GNU 4.8.5
-- Check for working CXX compiler: /usr/bin/g++-4.8
-- Check for working CXX compiler: /usr/bin/g++-4.8 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Not forcing any particular BLAS to be found
-- Performing Test CAFFE2_LONG_IS_INT32_OR_64
-- Performing Test CAFFE2_LONG_IS_INT32_OR_64 - Success
-- Does not need to define long separately.
-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED - Success
-- std::exception_ptr is supported.
-- Performing Test CAFFE2_IS_NUMA_AVAILABLE - Failed
-- NUMA is not available
-- Turning off deprecation warning due to glog.
-- Current compiler supports avx2 extention. Will build perfkernels.
-- Building using own protobuf under third_party per request.
-- Use custom protobuf build.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Caffe2 protobuf include directory: $<BUILD_INTERFACE:/raid5/hithere/envs/pytorch/third_party/protobuf/src>$<INSTALL_INTERFACE:include>
-- The BLAS backend of choice:MKL
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Checking for [mkl_gf_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_gf_lp64: /home/hithere/anaconda2/envs/t0.5py2.7/lib/
--   Library mkl_gnu_thread: /home/hithere/anaconda2/envs/t0.5py2.7/lib/
--   Library mkl_core: /home/hithere/anaconda2/envs/t0.5py2.7/lib/
-- Found OpenMP_C: -fopenmp (found version "3.1") 
-- Found OpenMP_CXX: -fopenmp (found version "3.1") 
-- Found OpenMP: TRUE (found version "3.1")  
--   Library gomp: -fopenmp
--   Library pthread: /usr/lib/x86_64-linux-gnu/
--   Library m: /usr/lib/x86_64-linux-gnu/
--   Library dl: /usr/lib/x86_64-linux-gnu/
-- Looking for cblas_sgemm
-- Looking for cblas_sgemm - found
-- Brace yourself, we are building NNPACK
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Found PythonInterp: /home/hithere/anaconda2/envs/t0.5py2.7/bin/python (found version "2.7.15") 
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR) 
-- Found CUDA: /usr/local/cuda-8.0 (found suitable version "8.0", minimum required is "7.0") 
-- Found CUDNN: /home/hithere/dependencies/cudnn_v7_8/include  
-- Caffe2: CUDA detected: 8.0
-- Found cuDNN: v7.0.5  (include: /home/hithere/dependencies/cudnn_v7_8/include, library: /home/hithere/dependencies/cudnn_v7_8/lib64/
-- Set CUDA arch from CUDA_ARCH_NAME: Auto
-- Automatic GPU detection failed. Building for all known architectures.
-- Added CUDA NVCC flags for: sm_30 sm_35 sm_50 sm_52 sm_60 sm_61
-- Found NCCL: /raid5/hithere/envs/pytorch/torch/lib/tmp_install/include  
-- Found NCCL (include: /raid5/hithere/envs/pytorch/torch/lib/tmp_install/include, library: /raid5/hithere/envs/pytorch/torch/lib/tmp_install/lib/
-- Performing Test SUPPORT_GLIBCXX_USE_C99
-- Performing Test SUPPORT_GLIBCXX_USE_C99 - Success
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- Removing -DNDEBUG from compile flags
-- Found OpenMP_C: -fopenmp (found version "3.1") 
-- Found OpenMP_CXX: -fopenmp (found version "3.1") 
-- Compiling with OpenMP support
-- Checking prototype magma_get_sgeqrf_nb for MAGMA_V2 - True
-- Compiling with MAGMA support
-- MAGMA INCLUDE DIRECTORIES: /home/hithere/anaconda2/envs/t0.5py2.7/include
-- MAGMA LIBRARIES: /home/hithere/anaconda2/envs/t0.5py2.7/lib/libmagma.a
-- MAGMA V2 check: 1
-- Could not find hardware support for NEON on this machine.
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- Performing Test COMPILER_WORKS
-- Performing Test COMPILER_WORKS - Failed
CMake Error at cmake/Dependencies.cmake:913 (MESSAGE):
  Could not run a simple program built with your compiler.  If you are trying
  to use -fsanitize=address, make sure libasan is properly installed on your
  system (you can confirm if the problem is this by attempting to build and
  run a small program.)
Call Stack (most recent call first):
  CMakeLists.txt:189 (include)

-- Configuring incomplete, errors occurred!
See also "/raid5/hithere/envs/pytorch/build/CMakeFiles/CMakeOutput.log".
See also "/raid5/hithere/envs/pytorch/build/CMakeFiles/CMakeError.log".
Failed to run 'bash tools/ --with-cuda --with-nnpack --with-mkldnn nccl caffe2 nanopb libshm gloo THD'

I have exactly the same problem here

have you solved this problem?

@zhanghang1989 @Mata_Fu Have you solved this problems ?

1 Like

CUDA 9.1 with CUDNN 9.1 works for me

For me, I use cuda8.0 and cudnn7.0.5. Still suffering from some problems.

Yes,cuda 8.0 will cause this error just before I just finish the make process. I update my cuda with cuda 9.0
and cudnn 7.0.5. It can make success !!!
Thanks for your reply !!!

1 Like

It really made me confused as the official instruction shows that cuda8.0 is also available.

You can try git clone -recursive, and then make

By ‘then make’, do you mean run ‘make’ in the created git clone folder?

No, I mean just python install

I also ran into problems when installing pytorch 0.5.0a0 with the setup script and cuda 8.0. Like above, caffe2 causes problems.

For future reference: Is it official that pytorch 0.5.0a0 does not support cuda 8.0?

any news regarding pytorch 0.5 and cuda 8.0?

adding the cuda-8.0 to my env resolved the issue. for same strange reason pytorch links to the 8.0 version of lib cudart see Pytorch 0.5.0a0 + cuda 9.2 links against cuda 8.0
regards chofer

thank you for this hint, I will take a look at it!