Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failure when running './install.sh' #1086

Closed
patrickacole opened this issue Oct 12, 2017 · 20 comments
Closed

Installation failure when running './install.sh' #1086

patrickacole opened this issue Oct 12, 2017 · 20 comments

Comments

@patrickacole
Copy link

The following are the error messages received after running './install.sh'

1 error detected in the compilation of "/tmp/tmpxft_000005a7_00000000-6_THCTensorMathPairwise.cpp1.ii".
CMake Error at THC_generated_THCTensorMathPairwise.cu.o.cmake:267 (message):
  Error generating file
  /home/vipaacc/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMathPairwise.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:4216: 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[2]: *** Waiting for unfinished jobs....
/home/vipaacc/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

/home/vipaacc/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

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


lib/THC/CMakeFiles/THC.dir/build.make:2735: 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
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.
@sdlmw
Copy link

sdlmw commented Oct 17, 2017

i have a same error

@zhouqilin1993
Copy link

Same error, Ubuntu 16.04, cuda 9.0

@soveraign
Copy link

soveraign commented Nov 9, 2017

Same problem, further up the compile log I see:

/home/brian/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

1 error detected in the compilation of "/tmp/tmpxft_000078f9_00000000-6_THCTensorMathPairwise.cpp1.ii".
CMake Error at THC_generated_THCTensorMathPairwise.cu.o.cmake:267 (message):
  Error generating file
  /home/brian/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[2]: *** Waiting for unfinished jobs....
/home/brian/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

/home/brian/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

2 errors detected in the compilation of "/tmp/tmpxft_00007911_00000000-6_THCTensorMath.cpp1.ii".
CMake Error at THC_generated_THCTensorMath.cu.o.cmake:267 (message):
  Error generating file
  /home/brian/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
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

Ubuntu 16.04, cuda 9.0

@tastyminerals
Copy link

tastyminerals commented Nov 9, 2017

This has been reported and fixed in torch/cutorch#797
Set env var: export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"

@hzxie
Copy link

hzxie commented May 14, 2018

@tastyminerals
Still not working in CUDA 9.1

@tastyminerals
Copy link

tastyminerals commented May 16, 2018

Are you sure, because I have CUDA 9.1 installed and working with Torch.
Please provide the error message.

@hzxie
Copy link

hzxie commented May 16, 2018

@tastyminerals
I've solved this problem.
I used sudo but export is for the current user.

@hzxie
Copy link

hzxie commented May 16, 2018

@tastyminerals
Just use su and it will solve this problem.

@Harry-675
Copy link

Met the same question,not work by using method above,any other suggestions?

@adam-dziedzic
Copy link

This worked for me:

sudo su
export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"
bash install-deps
yes | bash ./install.sh

@Spandan-Madan
Copy link

The solution given by @adam-dziedzic worked for me! Thanks!

@mherrera-dsci
Copy link

The solution given by @adam-dziedzic worked for me too! Only a few modifications on ~/torch/install/bin/torch-activate and chown for some files in ~/torch/install/bin. Thanks!

@btomtom5
Copy link

Be careful with the solution that @adam-dziedzic provided because installing torch under sudo su changes the installation path of torch which may break your luarocks package manager.

@frahman5
Copy link

@mherrera-dsci Did the chown you did on ~/torch/install/bin and the other modifications you did allow you to use luarocks from a non super-user? I'm finding that I can only use luarocks in super-user mode.

@ShijianXu
Copy link

The solution given by @adam-dziedzic worked for me too! Only a few modifications on ~/torch/install/bin/torch-activate and chown for some files in ~/torch/install/bin. Thanks!

Hi, could you please tell me how to modify? I found that after using sudo su to install torch, the torch can only be used in su.

@wu-yy
Copy link

wu-yy commented Jan 18, 2019

This worked for me:

sudo su
export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"
bash install-deps
yes | bash ./install.sh

year, this is also worked for me! I solved this problem.

@dinhphuong98
Copy link

This worked for me:

sudo su
export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"
bash install-deps
yes | bash ./install.sh

thanks, worked for me

@BurkeyLai
Copy link

@adam-dziedzic 's solution works for me, however I don't use the command sudo su. Many thxs!

@Ujang24
Copy link

Ujang24 commented Mar 10, 2020

Be careful with the solution that @adam-dziedzic provided because installing torch under sudo su changes the installation path of torch which may break your luarocks package manager.

Yes, mine is broken. How to solve this?

@Lilidamowang
Copy link

Thanks!!! it works for me!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests