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 #226

Closed bwanaaa closed 5 years ago

bwanaaa commented 5 years ago

seems similar to this one

https://github.com/karpathy/char-rnn/issues/200

but I'm running ubuntu 18.04 LTS , NVIDIA-SMI 418.39 Driver Version: 418.39 CUDA Version: 10.1
I updated cmake to version 3.14.0 and gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0

I successfully installed torch and it passed all tests

issuing luarocks install cutorch

gives

/tmp/luarocks_cutorch-scm-1-2063/cutorch/lib/THC/THCAtomics.cuh(97): error: cannot overload functions distinguished by return type alone

1 error detected in the compilation of "/tmp/tmpxft_000059fc_00000000-4_THCTensorScatterGather.cpp4.ii".
CMake Error at THC_generated_THCTensorScatterGather.cu.o.cmake:267 (message):
  Error generating file
  /tmp/luarocks_cutorch-scm-1-2063/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorScatterGather.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:182: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorScatterGather.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorScatterGather.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/luarocks_cutorch-scm-1-2063/cutorch/lib/THC/THCAtomics.cuh(97): error: cannot overload functions distinguished by return type alone

1 error detected in the compilation of "/tmp/tmpxft_000059cd_00000000-4_THCTensorIndex.cpp4.ii".
CMake Error at THC_generated_THCTensorIndex.cu.o.cmake:267 (message):
  Error generating file
  /tmp/luarocks_cutorch-scm-1-2063/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorIndex.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:161: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorIndex.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorIndex.cu.o] Error 1
CMakeFiles/Makefile2:177: recipe for target 'lib/THC/CMakeFiles/THC.dir/all' failed
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.

help?

bwanaaa commented 5 years ago

solved it with this

nagadomi solution