nagadomi / distro

Unofficial maintenance repository of Torch7. It supports CUDA10.1, Volta, Turing, Docker https://hub.docker.com/r/nagadomi/torch7

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install Fails when Installing Cuda Packages

CharAznableLoNZ opened this issue · comments

This is an older machine with a new cuda installation running 16.04.

OS: Ubuntu 16.04.7 LTS x86_64
Model: 20BWA081CD ThinkPad T450s
Kernel: 4.4.0-210-generic
Shell: bash 4.3.48
CPU: Intel i5-5200U (4) @ 2.700GHz
GPU: NVIDIA GeForce 940M

Found CUDA on your machine. Installing CUDA packages
Warning: unmatched variable LUALIB

jopts=$(getconf _NPROCESSORS_CONF)

echo "Building on $jopts cores"
cmake -E make_directory build && cd build && cmake .. -DLUALIB= -DLUA_INCDIR=/home/user/torch/install/include -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/user/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/user/torch/install/lib/luarocks/rocks/cutorch/scm-1" && 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 /home/user/torch/install
-- Found CUDA: /usr/local/cuda (found suitable version "11.3", minimum required is "6.5")
-- Removing -DNDEBUG from compile flags
-- TH_LIBRARIES: TH
-- MAGMA not found. Compiling without MAGMA support
-- Autodetected CUDA architecture(s): 5.0
-- got cuda version 11.3
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- CUDA_NVCC_FLAGS: -D__CUDA_NO_HALF_OPERATORS__;-gencode;arch=compute_50,code=sm_50;-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: /home/user/torch/extra/cutorch/build
[ 1%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o
[ 3%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o
[ 3%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o
[ 4%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
In file included from /usr/local/cuda/include/thrust/detail/config/config.h:27:0,
from /usr/local/cuda/include/thrust/detail/config.h:23,
from /usr/local/cuda/include/thrust/transform.h:24,
from /home/user/torch/extra/cutorch/lib/THC/THCHalf.cu:3:
/usr/local/cuda/include/thrust/detail/config/cpp_dialect.h:118:13: warning: Thrust requires C++14. Please pass -std=c++14 to your compiler. Define THRUST_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.
THRUST_COMPILER_DEPRECATION(C++14, pass -std=c++14 to your compiler);
^
In file included from /usr/local/cuda/include/thrust/type_traits/integer_sequence.h:17:0,
from /usr/local/cuda/include/thrust/detail/tuple_meta_transform.h:20,
from /usr/local/cuda/include/thrust/detail/tuple_transform.h:20,
from /usr/local/cuda/include/thrust/detail/raw_reference_cast.h:23,
from /usr/local/cuda/include/thrust/detail/function.h:20,
from /usr/local/cuda/include/thrust/system/detail/sequential/for_each.h:25,
from /usr/local/cuda/include/thrust/system/detail/adl/for_each.h:25,
from /usr/local/cuda/include/thrust/detail/for_each.inl:27,
from /usr/local/cuda/include/thrust/for_each.h:279,
from /usr/local/cuda/include/thrust/system/detail/generic/transform.inl:19,
from /usr/local/cuda/include/thrust/system/detail/generic/transform.h:105,
from /usr/local/cuda/include/thrust/detail/transform.inl:25,
from /usr/local/cuda/include/thrust/transform.h:724,
from /home/user/torch/extra/cutorch/lib/THC/THCHalf.cu:3:
/usr/local/cuda/include/thrust/detail/cpp11_required.h:23:6: error: #error C++11 is required for this Thrust feature; please upgrade your compiler or pass the appropriate -std=c++XX flag to it.

error C++11 is required for this Thrust feature; please upgrade your compiler or pass the appropriate -std=c++XX flag to it.

  ^

In file included from /usr/local/cuda/include/cub/util_arch.cuh:36:0,
from /usr/local/cuda/include/thrust/system/cuda/detail/util.h:32,
from /usr/local/cuda/include/thrust/system/cuda/detail/for_each.h:34,
from /usr/local/cuda/include/thrust/system/detail/adl/for_each.h:42,
from /usr/local/cuda/include/thrust/detail/for_each.inl:27,
from /usr/local/cuda/include/thrust/for_each.h:279,
from /usr/local/cuda/include/thrust/system/detail/generic/transform.inl:19,
from /usr/local/cuda/include/thrust/system/detail/generic/transform.h:105,
from /usr/local/cuda/include/thrust/detail/transform.inl:25,
from /usr/local/cuda/include/thrust/transform.h:724,
from /home/user/torch/extra/cutorch/lib/THC/THCHalf.cu:3:
/usr/local/cuda/include/cub/util_cpp_dialect.cuh:129:13: warning: CUB requires C++14. Please pass -std=c++14 to your compiler. Define CUB_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.
CUB_COMPILER_DEPRECATION(C++14, pass -std=c++14 to your compiler);
^
In file included from /usr/include/c++/5/type_traits:35:0,
from /usr/local/cuda/include/thrust/detail/functional/operators/operator_adaptors.h:26,
from /usr/local/cuda/include/thrust/detail/functional/operators/assignment_operator.h:22,
from /usr/local/cuda/include/thrust/detail/functional/actor.h:32,
from /usr/local/cuda/include/thrust/detail/functional/placeholder.h:20,
from /usr/local/cuda/include/thrust/functional.h:26,
from /usr/local/cuda/include/thrust/system/detail/error_category.inl:22,
from /usr/local/cuda/include/thrust/system/error_code.h:520,
from /usr/local/cuda/include/thrust/system_error.h:49,
from /usr/local/cuda/include/thrust/system/cuda/detail/util.h:34,
from /usr/local/cuda/include/thrust/system/cuda/detail/for_each.h:34,
from /usr/local/cuda/include/thrust/system/detail/adl/for_each.h:42,
from /usr/local/cuda/include/thrust/detail/for_each.inl:27,
from /usr/local/cuda/include/thrust/for_each.h:279,
from /usr/local/cuda/include/thrust/system/detail/generic/transform.inl:19,
from /usr/local/cuda/include/thrust/system/detail/generic/transform.h:105,
from /usr/local/cuda/include/thrust/detail/transform.inl:25,
from /usr/local/cuda/include/thrust/transform.h:724,
from /home/user/torch/extra/cutorch/lib/THC/THCHalf.cu:3:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support
^
CMake Error at THC_generated_THCHalf.cu.o.cmake:207 (message):
Error generating
/home/user/torch/extra/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
make[2]: *** Waiting for unfinished jobs....
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
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.

This repo does not support CUDA11 #11.
The error is because CUDA11 does not support gcc 5.4(outdated).

Ah, ok. No worries. I'll figure out something.