Torch7: Torch installation issue: ./install.sh

Created on 31 Aug 2018  Â·  10Comments  Â·  Source: torch/torch7

I am getting this error when ever I run ./install.sh for torch.

I have ubuntu 16.04 with cuda 8.0 and cudnn 5.1

Here is the error that appears on the terminal:

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 fatal : Unsupported gpu architecture 'compute_61'
CMake Error at THC_generated_THCReduceApplyUtils.cu.o.cmake:207 (message):
Error generating
/home/kk/torch/extra/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
nvcc fatal : Unsupported gpu architecture 'compute_61'
CMake Error at THC_generated_THCBlas.cu.o.cmake:207 (message):
Error generating
/home/kk/torch/extra/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
nvcc fatal : Unsupported gpu architecture 'compute_61'
CMake Error at THC_generated_THCSleep.cu.o.cmake:207 (message):
Error generating
/home/kk/torch/extra/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
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

Most helpful comment

Hi Samir

Specifically for the below, you could try this line first before trying to build:

export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"

It sorted the problem for me, and others it seems, shout out to @csarofeen.

Cheers!

Stuart

--

Stuart Millar

PhD Deep Learning / Cyber Security Researcher

CSIT / QUB, Belfast

[email protected]

https://www.linkedin.com/in/stuartmillar


From: itabr notifications@github.com
Sent: 12 September 2018 23:39
To: torch/torch7
Cc: Subscribed
Subject: Re: [torch/torch7] Torch installation issue: ./install.sh (#1165)

I got a similar issue on Ubuntu 16.04 with CUDA 9.0 and cudnn-9.0-linux-x64-v7.2.1.38.

Here is the error that appears on the terminal:

[ 14%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathPairwise.cu.o
/root/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(393): error: more than one operator "==" matches these operands:
function "operator==(const __half &, const __half &)"
function "operator==(half, half)"
operand types are: half == half

/root/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(414): error: more than one operator "==" matches these operands:
function "operator==(const __half &, const __half &)"
function "operator==(half, half)"
operand types are: half == half

/root/torch/extra/cutorch/lib/THC/generic/THCTensorMathPairwise.cu(66): error: more than one operator "!=" matches these operands:
function "operator!=(const __half &, const __half &)"
function "operator!=(half, half)"
operand types are: half != half

2 errors detected in the compilation of "/tmp/tmpxft_00005403_00000000-11_THCTensorMath.compute_61.cpp1.ii".
CMake Error at THC_generated_THCTensorMath.cu.o.cmake:267 (message):
Error generating file
/root/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMath.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:112: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o' failed
make[2]: * [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o] Error 1
make[2]: *
Waiting for unfinished jobs....
1 error detected in the compilation of "/tmp/tmpxft_0000543b_00000000-11_THCTensorMathPairwise.compute_61.cpp1.ii".
CMake Error at THC_generated_THCTensorMathPairwise.cu.o.cmake:267 (message):
Error generating file
/root/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathPairwise.cu.o

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

Error: Build error: Failed building.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/torch/torch7/issues/1165#issuecomment-420821599, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQFdsJzYixyF8ziNnPyHc8usI9v7UiQIks5uaY0mgaJpZM4WU3Ws.

All 10 comments

Please uninstall older CUDA 8.0, install a newer CUDA 9.0 and try again.

Have you solved the problem? I meet the same problem as your. Please let me know whether install CUDA 9.0 is work. Thank you :)

I got a similar issue on Ubuntu 16.04 with CUDA 9.0 and cudnn-9.0-linux-x64-v7.2.1.38.

Here is the error that appears on the terminal:

[ 14%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathPairwise.cu.o
/root/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(393): error: more than one operator "==" matches these operands:
function "operator==(const __half &, const __half &)"
function "operator==(half, half)"
operand types are: half == half

/root/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(414): error: more than one operator "==" matches these operands:
function "operator==(const __half &, const __half &)"
function "operator==(half, half)"
operand types are: half == half

/root/torch/extra/cutorch/lib/THC/generic/THCTensorMathPairwise.cu(66): error: more than one operator "!=" matches these operands:
function "operator!=(const __half &, const __half &)"
function "operator!=(half, half)"
operand types are: half != half

2 errors detected in the compilation of "/tmp/tmpxft_00005403_00000000-11_THCTensorMath.compute_61.cpp1.ii".
CMake Error at THC_generated_THCTensorMath.cu.o.cmake:267 (message):
Error generating file
/root/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMath.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:112: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o' failed
make[2]: * [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o] Error 1
make[2]: *
Waiting for unfinished jobs....
1 error detected in the compilation of "/tmp/tmpxft_0000543b_00000000-11_THCTensorMathPairwise.compute_61.cpp1.ii".
CMake Error at THC_generated_THCTensorMathPairwise.cu.o.cmake:267 (message):
Error generating file
/root/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathPairwise.cu.o

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

Error: Build error: Failed building.

I meet the same issue

ib/THC/CMakeFiles/THC.dir/build.make:2649: 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
/root/torch/extra/cutorch/lib/THC/THCTensorTypeUtils.cuh(141): error: class "__half" has no member "x"

/root/torch/extra/cutorch/lib/THC/THCTensorTypeUtils.cuh(141): error: class "__half" has no member "x"

/root/torch/extra/cutorch/lib/THC/THCTensorTypeUtils.cuh(145): error: class "__half" has no member "x"

/root/torch/extra/cutorch/lib/THC/THCTensorTypeUtils.cuh(145): error: class "__half" has no member "x"

6 errors detected in the compilation of "/tmp/tmpxft_00002bb2_00000000-11_THCTensorMathCompareT.compute_61.cpp1.ii".
/usr/bin/cmake: /usr/local/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
/usr/bin/cmake: /usr/local/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
/usr/bin/cmake: /usr/local/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
/usr/bin/cmake: /usr/local/lib/libcrypto.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
CMake Error at THC_generated_THCTensorMathCompareT.cu.o.cmake:267 (message):
  Error generating file
  /root/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathCompareT.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:1831: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathCompareT.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathCompareT.cu.o] Error 1
4 errors detected in the compilation of "/tmp/tmpxft_00002bf4_00000000-11_THCTensorMath2.compute_61.cpp1.ii".
/usr/bin/cmake: /usr/local/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
/usr/bin/cmake: /usr/local/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
/usr/bin/cmake: /usr/local/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
/usr/bin/cmake: /usr/local/lib/libcrypto.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
CMake Error at THC_generated_THCTensorMath2.cu.o.cmake:267 (message):
  Error generating file
  /root/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMath2.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:1810: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath2.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath2.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

Hi Samir

Specifically for the below, you could try this line first before trying to build:

export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"

It sorted the problem for me, and others it seems, shout out to @csarofeen.

Cheers!

Stuart

--

Stuart Millar

PhD Deep Learning / Cyber Security Researcher

CSIT / QUB, Belfast

[email protected]

https://www.linkedin.com/in/stuartmillar


From: itabr notifications@github.com
Sent: 12 September 2018 23:39
To: torch/torch7
Cc: Subscribed
Subject: Re: [torch/torch7] Torch installation issue: ./install.sh (#1165)

I got a similar issue on Ubuntu 16.04 with CUDA 9.0 and cudnn-9.0-linux-x64-v7.2.1.38.

Here is the error that appears on the terminal:

[ 14%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathPairwise.cu.o
/root/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(393): error: more than one operator "==" matches these operands:
function "operator==(const __half &, const __half &)"
function "operator==(half, half)"
operand types are: half == half

/root/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(414): error: more than one operator "==" matches these operands:
function "operator==(const __half &, const __half &)"
function "operator==(half, half)"
operand types are: half == half

/root/torch/extra/cutorch/lib/THC/generic/THCTensorMathPairwise.cu(66): error: more than one operator "!=" matches these operands:
function "operator!=(const __half &, const __half &)"
function "operator!=(half, half)"
operand types are: half != half

2 errors detected in the compilation of "/tmp/tmpxft_00005403_00000000-11_THCTensorMath.compute_61.cpp1.ii".
CMake Error at THC_generated_THCTensorMath.cu.o.cmake:267 (message):
Error generating file
/root/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMath.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:112: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o' failed
make[2]: * [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o] Error 1
make[2]: *
Waiting for unfinished jobs....
1 error detected in the compilation of "/tmp/tmpxft_0000543b_00000000-11_THCTensorMathPairwise.compute_61.cpp1.ii".
CMake Error at THC_generated_THCTensorMathPairwise.cu.o.cmake:267 (message):
Error generating file
/root/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathPairwise.cu.o

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

Error: Build error: Failed building.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/torch/torch7/issues/1165#issuecomment-420821599, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQFdsJzYixyF8ziNnPyHc8usI9v7UiQIks5uaY0mgaJpZM4WU3Ws.

Hi Stuart, Thanks export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__" solved the problem.

Same here. Was stuck on this for a while. Thanks @stu17682!

@stu17682 That works for me. Thanks.

I am using cuda 9.2.88 and cudnn 7.4 I have used export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__" but I still face this issue. I am installing torch from https://github.com/intel/torch repository since I am having a different environment setting.

make[2]: * [lib/THC/CMakeFiles/THC.dir/generated/./THC_generated_THCTensorMaskedByte.cu.o] Error 1
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/lib/THC/THCTensorRandom.cuh(107): warning: specified alignment (4) is different from alignment (2) specified on a previous declaration
detected during instantiation of "void sampleMultinomialOnce(long *, long, int, T *, T *) [with T=half, AccT=float]"
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/lib/THC/generic/THCTensorRandom.cu(162): here

6 errors detected in the compilation of "/tmp/aj601922/linuxnvc01_2631/tmpxft_000046bb_00000000-6_THCTensorSortByte.cpp1.ii".
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/lib/THC/THCTensorRandom.cuh(46): warning: specified alignment (4) is different from alignment (2) specified on a previous declaration
detected during instantiation of "void renormRowsL1(T *, long, long) [with T=float]"
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/lib/THC/generic/THCTensorRandom.cu(98): here

/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/lib/THC/THCTensorRandom.cuh(107): warning: specified alignment (4) is different from alignment (2) specified on a previous declaration
detected during instantiation of "void sampleMultinomialOnce(long *, long, int, T *, T *) [with T=float, AccT=float]"
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/lib/THC/generic/THCTensorRandom.cu(162): here

/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/lib/THC/THCTensorRandom.cuh(46): warning: specified alignment (8) is different from alignment (2) specified on a previous declaration
detected during instantiation of "void renormRowsL1(T *, long, long) [with T=double]"
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/lib/THC/generic/THCTensorRandom.cu(98): here

/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/lib/THC/THCTensorRandom.cuh(107): warning: specified alignment (8) is different from alignment (2) specified on a previous declaration
detected during instantiation of "void sampleMultinomialOnce(long *, long, int, T *, T *) [with T=double, AccT=double]"
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/lib/THC/generic/THCTensorRandom.cu(162): here

6 errors detected in the compilation of "/tmp/aj601922/linuxnvc01_2631/tmpxft_000046ff_00000000-6_THCTensorRandom.cpp1.ii".
6 errors detected in the compilation of "/tmp/aj601922/linuxnvc01_2631/tmpxft_000046ae_00000000-6_THCTensorSortChar.cpp1.ii".
CMake Error at THC_generated_THCTensorSortByte.cu.o.cmake:267 (message):
Error generating file
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir/generated/./THC_generated_THCTensorSortByte.cu.o

make[2]: * [lib/THC/CMakeFiles/THC.dir/generated/./THC_generated_THCTensorSortByte.cu.o] Error 1
CMake Error at THC_generated_THCTensorRandom.cu.o.cmake:267 (message):
Error generating file
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorRandom.cu.o

make[2]: * [lib/THC/CMakeFiles/THC.dir/./THC_generated_THCTensorRandom.cu.o] Error 1
CMake Error at THC_generated_THCTensorSortChar.cu.o.cmake:267 (message):
Error generating file
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir/generated/./THC_generated_THCTensorSortChar.cu.o

make[2]: * [lib/THC/CMakeFiles/THC.dir/generated/./THC_generated_THCTensorSortChar.cu.o] Error 1
6 errors detected in the compilation of "/tmp/aj601922/linuxnvc01_2631/tmpxft_000046e7_00000000-6_THCTensorMath.cpp1.ii".
CMake Error at THC_generated_THCTensorMath.cu.o.cmake:267 (message):
Error generating file
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMath.cu.o

make[2]: * [lib/THC/CMakeFiles/THC.dir/./THC_generated_THCTensorMath.cu.o] Error 1
6 errors detected in the compilation of "/tmp/aj601922/linuxnvc01_2631/tmpxft_000046ee_00000000-6_THCTensorMathScan.cpp1.ii".
CMake Error at THC_generated_THCTensorMathScan.cu.o.cmake:267 (message):
Error generating file
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathScan.cu.o

make[2]: * [lib/THC/CMakeFiles/THC.dir/./THC_generated_THCTensorMathScan.cu.o] Error 1
6 errors detected in the compilation of "/tmp/aj601922/linuxnvc01_2631/tmpxft_000046f6_00000000-6_THCTensorMode.cpp1.ii".
CMake Error at THC_generated_THCTensorMode.cu.o.cmake:267 (message):
Error generating file
/home/aj601922/torch-_cuda_92_intel_mkl/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMode.cu.o

make[2]: * [lib/THC/CMakeFiles/THC.dir/./THC_generated_THCTensorMode.cu.o] Error 1
make[1]:
[lib/THC/CMakeFiles/THC.dir/all] Error 2
make: *
* [all] Error 2

have you solved the problem? i have the same issue @joseabin

Was this page helpful?
0 / 5 - 0 ratings