torch / image

An Image toolbox for Torch.
Other
208 stars 141 forks source link

undefined symbol: GOMP_parallel #207

Closed RobertArbon closed 7 years ago

RobertArbon commented 7 years ago

Hi,

I've just done a fresh install of Torch (along with Cuda 8.0 and cuDNN and MKL Blas on Ubuntu 16.04) and image doesn't want to load:

th> require 'image' /home/robert/torch/install/share/lua/5.1/trepl/init.lua:389: /home/robert/torch/install/share/lua/5.1/trepl/init.lua:389: ...e/robert/torch/install/share/lua/5.1/luarocks/loader.lua:117: error loading module 'libimage' from file '/home/robert/torch/install/lib/lua/5.1/libimage.so': /home/robert/torch/install/lib/lua/5.1/libimage.so: undefined symbol: GOMP_parallel stack traceback: [C]: in function 'error' /home/robert/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require' [string "_RESULT={require 'image'}"]:1: in main chunk [C]: in function 'xpcall' /home/robert/torch/install/share/lua/5.1/trepl/init.lua:661: in function 'repl' ...bert/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk [C]: at 0x00405d50

I tried adding '-DWITH_OPENMP=OFF' to the rockspec but that doesn't seem to have helped.

Any idea what's going on?

Thanks!

RobertArbon commented 7 years ago

the image package works after a fresh installation of Torch but not when you install it/update it when Torch is installed.

MrZoidberg commented 7 years ago

any ways to fix this?

RobertArbon commented 7 years ago

I got it to work, why not, by installing Torch but not updating the Image module. Torch7 comes with Image as standard.

soumith commented 7 years ago

i've not been able to reproduce this, unfortunately. Are you by any chance having anaconda in your $PATH or $LD_LIBRARY_PATH, and anaconda has libgcc installed? That might explain it, because anaconda's libgcc has OMP of a different version than what your system compiler has. With a default torch install, we explicitly scrub anaconda from the PATH before proceeding: https://github.com/torch/distro/blob/master/install.sh#L31-L36

crypdick commented 7 years ago

@soumith I'm experiencing this problem and I have anaconda in my $PATH. Is there a work-around? I just cloned jcjohnson/fast-neural-style/ and I'm trying to run their torch script.

/home/pepe/torch/install/bin/luajit: /home/pepe/torch/install/share/lua/5.1/trepl/init.lua:389: /home/pepe/torch/install/share/lua/5.1/trepl/init.lua:389: /home/pepe/torch/install/share/lua/5.1/luarocks/loader.lua:117: error loading module 'libimage' from file '/home/pepe/torch/install/lib/lua/5.1/libimage.so':
    /home/pepe/torch/install/lib/lua/5.1/libimage.so: undefined symbol: GOMP_parallel
stack traceback:
    [C]: in function 'error'
    /home/pepe/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
    fast_neural_style.lua:3: in main chunk
    [C]: in function 'dofile'
    ...pepe/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
    [C]: at 0x00405d50
panfengli commented 7 years ago

Try sudo apt install gcc-4.8 and sudo apt install g++-4.8, then CXX=g++-4.8 CC=gcc-4.8 luarocks install image, might help.