Skip to content

Instantly share code, notes, and snippets.

@corenel
Created April 19, 2019 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corenel/b0f30badc74a199549d28f604add6ac5 to your computer and use it in GitHub Desktop.
Save corenel/b0f30badc74a199549d28f604add6ac5 to your computer and use it in GitHub Desktop.
Install Torch7 on Ubuntu 16.04

See this tutorial first.

During the installation, two other problems encountered:

Missing libreadline.so.7

luajit: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
  • Cause: the newest version of libreadline library in Ubuntu 16.04 is 6, so you cannot find libreadline.so.7
  • Solution: directly install bianry package of libreadline-7 from Ubuntu 18.04

CUDA half operator

lib/THC/CMakeFiles/THC.dir/build.make:4243: 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
/pkgbuild/torch/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
  • Solution: export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment