You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I compiled pytorch (using both Python 2 and Python 3) with CUDA support on Ubuntu 16.04 having gcc 4.8.5. The install process terminated with no critical errors.
Torch is already installed on the same machine and works fine.
When importing pytorch I get the following error:
----> 1 import torch
/home/tudor/anaconda2/lib/python2.7/site-packages/torch/__init__.pyc in <module>()
43 sys.setdlopenflags(_dl_flags.RTLD_GLOBAL | _dl_flags.RTLD_NOW)
44
---> 45 from torch._C import *
46
47 __all__ += [name for name in dir(_C)
ImportError: /home/tudor/anaconda2/lib/python2.7/site-packages/torch/lib/libTHC.so.1: undefined symbol: sormqr_
@soumith Yes i did install the correct version for magma-cuda.
@apaszke Not sure if this is the relevant info, but the only lines in pytorch/torch/lib/build/THC/CMakeFiles/CMakeOutput.log referring to magma are:
Feature record: CXX_FEATURE:0cxx_variadic_macros
Feature record: CXX_FEATURE:0cxx_variadic_templates
Determining if the prototype magma_get_sgeqrf_nb exists for MAGMA_V2 passed with the following output:
Change Dir: /home/tudor/pytorch/torch/lib/build/THC/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_2e3cf/fast"
weird, it seems to be picked up correctly. can you prepend VERBOSE=1 to the install command, so we can see the compiler commands used to build the lib? Maybe it doesn't get linked for some reason...
Ok! This is helpful. It seems that you don't have any LAPACK library, while your libmagma.a requires to be linked together with one. Did you install MKL (conda install mkl)?
Activity
soumith commentedon Jan 19, 2017
it looks like you used an anaconda environment.
Did you run the commands in order from here: https://github.com/pytorch/pytorch#from-source ? including the CMAKE_PREFIX_PATH command and installing mkl ahead of time...
tudor-berariu commentedon Jan 19, 2017
Yes, I followed all steps.
apaszke commentedon Jan 19, 2017
It looks like a MAGMA issue, can you try and check what THC's CMake logged when configuring the build (only the lines about MAGMA)?
soumith commentedon Jan 19, 2017
if you are using CUDA 7.5, be sure to do:
and if you are using CUDA 8.0, do:
tudor-berariu commentedon Jan 19, 2017
@soumith Yes i did install the correct version for
magma-cuda.@apaszke Not sure if this is the relevant info, but the only lines in
pytorch/torch/lib/build/THC/CMakeFiles/CMakeOutput.logreferring to magma are:soumith commentedon Jan 19, 2017
@tudor-berariu thanks. what's your CMake version?
apaszke commentedon Jan 19, 2017
@tudor-berariu Could you grep for some of these prints? It might be necessary to clean and rebuild THC 😕
tudor-berariu commentedon Jan 19, 2017
@soumith cmake version 3.6.3
@apaszke
apaszke commentedon Jan 19, 2017
weird, it seems to be picked up correctly. can you prepend
VERBOSE=1to the install command, so we can see the compiler commands used to build the lib? Maybe it doesn't get linked for some reason...tudor-berariu commentedon Jan 19, 2017
This is the full output of the install process (with
VERBOSE=1). I still can't figure out what's wrong.apaszke commentedon Jan 19, 2017
Can you try
nm /home/tudor/anaconda2/lib/libmagma.a | grep ormqr?apaszke commentedon Jan 19, 2017
Hm false alert. It looks like a TH issue. The only place where
sormqr_is used is there.tudor-berariu commentedon Jan 19, 2017
@apaszke Thanks a lot for investigating this. The output of the grep command is here.
apaszke commentedon Jan 19, 2017
Ok! This is helpful. It seems that you don't have any LAPACK library, while your
libmagma.arequires to be linked together with one. Did you install MKL (conda install mkl)?soumith commentedon Jan 19, 2017
I would suggest removing mkl and installing it again.
From the logs, it looks like you have a partial install of MKL somehow.
6 remaining items
soumith commentedon Jan 19, 2017
ok excellent repro. I'll be looking into how to fix the CMake to also look in that folder. I'll keep this issue open till i fix it.
apaszke commentedon Jan 31, 2017
Fixed in #650.
Remove preview text paragraph from custom op tutorial (pytorch#507)
Fix Issue pytorch#507 (pytorch#509)
Add CUDA 11 arches (pytorch#507)