torch / cutorch

A CUDA backend for Torch7
Other
337 stars 208 forks source link

Error installing cutorch on Ubuntu 16.04 #811

Open mortezarahbar opened 6 years ago

mortezarahbar commented 6 years ago

Hi

I am trying to install cutorch on Ubuntu 16.04 and I have downloaded torch rocks from here:

https://github.com/torch/rocks

and now I use this command to install cutorch:

$ CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0/ sudo luarocks install cutorch-1.0-0.rockspec

but i get this error:

Using cutorch-1.0-0.rockspec... switching to 'build' mode Cloning into 'cutorch'... remote: Counting objects: 117, done. remote: Compressing objects: 100% (111/111), done. remote: Total 117 (delta 12), reused 46 (delta 4), pack-reused 0 Receiving objects: 100% (117/117), 168.10 KiB | 0 bytes/s, done. Resolving deltas: 100% (12/12), done. Checking connectivity... 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/1.0-0" && make -j$jopts install

Building on 4 cores -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.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 CMake Error at /usr/share/cmake-3.5/Modules/FindCUDA.cmake:617 (message): Specify CUDA_TOOLKIT_ROOT_DIR Call Stack (most recent call first): CMakeLists.txt:7 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred! See also "/tmp/luarocks_cutorch-1.0-0-5046/cutorch/build/CMakeFiles/CMakeOutput.log".

Error: Build error: Failed building.

Could anybody help me on this issue please

nicholaswhf commented 5 years ago

did u solved ?