karpathy / char-rnn

Multi-layer Recurrent Neural Networks (LSTM, GRU, RNN) for character-level language models in Torch
11.52k stars 2.58k forks source link

cutorch installation make error #200

Closed Dillonsd closed 7 years ago

Dillonsd commented 7 years ago

When installing cutorch (luarocks install cutorch) I get this error: Installing https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec Cloning into 'cutorch'... remote: Counting objects: 227, done. remote: Compressing objects: 100% (181/181), done. remote: Total 227 (delta 62), reused 89 (delta 44), pack-reused 0 Receiving objects: 100% (227/227), 235.56 KiB | 94.00 KiB/s, done. Resolving deltas: 100% (62/62), done. Warning: unmatched variable LUALIB

jopts=$(getconf _NPROCESSORS_CONF)

echo "Building on $jopts cores" cmake -E make_directory build && cd build && cmake .. -DLUALIB= -DLUA_INCDIR=/usr/include/lua5.1 -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/usr/bin/.." -DCMAKE_INSTALL_PREFIX="/usr/local/lib/luarocks/rocks/cutorch/scm-1" && make -j$jopts install

Building on 4 cores -- The C compiler identification is GNU 6.3.0 -- The CXX compiler identification is GNU 6.3.0 -- 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 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Torch7 in /usr -- 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
-- Found CUDA: /usr (found suitable version "8.0", minimum required is "6.5") -- Removing -DNDEBUG from compile flags -- TH_LIBRARIES: TH -- MAGMA not found. Compiling without MAGMA support -- Automatic GPU detection failed. Building for common architectures. -- Autodetected CUDA architecture(s): 3.0;3.5;5.0;5.2;6.0;6.1;6.1+PTX -- got cuda version 8.0 -- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor -- CUDA_NVCC_FLAGS: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_61,code=compute_61;-DCUDA_HAS_FP16=1 -- THC_SO_VERSION: 0 -- Performing Test HAS_LUAL_SETFUNCS -- Performing Test HAS_LUAL_SETFUNCS - Failed -- Configuring done -- Generating done -- Build files have been written to: /tmp/luarocks_cutorch-scm-1-YdoPbN/cutorch/build [ 2%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o [ 2%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o [ 4%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o [ 4%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o In file included from /usr/include/cuda_runtime.h:78:0, from :0: /usr/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!

error -- unsupported GNU version! gcc versions later than 5 are not supported!

^~~~~ In file included from /usr/include/cuda_runtime.h:78:0, from :0: /usr/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!

error -- unsupported GNU version! gcc versions later than 5 are not supported!

^~~~~ In file included from /usr/include/cuda_runtime.h:78:0, from :0: /usr/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!

error -- unsupported GNU version! gcc versions later than 5 are not supported!

^~~~~ In file included from /usr/include/cuda_runtime.h:78:0, from :0: /usr/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!

error -- unsupported GNU version! gcc versions later than 5 are not supported!

^~~~~ CMake Error at THC_generated_THCSleep.cu.o.Release.cmake:222 (message): Error generating /tmp/luarocks_cutorch-scm-1-YdoPbN/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:77: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o' failed make[2]: [lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1 make[2]: Waiting for unfinished jobs.... CMake Error at THC_generated_THCBlas.cu.o.Release.cmake:222 (message): Error generating /tmp/luarocks_cutorch-scm-1-YdoPbN/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:70: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o' failed make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1 CMake Error at THC_generated_THCReduceApplyUtils.cu.o.Release.cmake:222 (message): Error generating /tmp/luarocks_cutorch-scm-1-YdoPbN/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:63: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o' failed make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1 CMake Error at THC_generated_THCHalf.cu.o.Release.cmake:222 (message): Error generating /tmp/luarocks_cutorch-scm-1-YdoPbN/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:560: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o' failed make[2]: [lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1 CMakeFiles/Makefile2:172: recipe for target 'lib/THC/CMakeFiles/THC.dir/all' failed make[1]: [lib/THC/CMakeFiles/THC.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

Error: Build error: Failed building.

I'm running Ubuntu 17.04 on virtual machine, not sure if that changes anything.

Dillonsd commented 7 years ago

For those with the same problem, this fixed it: https://github.com/torch/distro/issues/219

tajalagawani commented 4 years ago

export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"