PoseTrack-CVPR2017 icon indicating copy to clipboard operation
PoseTrack-CVPR2017 copied to clipboard

Needs compile "atlas" from source for deepmatching?

Open tensorboy opened this issue 6 years ago • 7 comments

Hi, I tried the code but I got

"error while loading shared libraries: /usr/local/atlas/lib/libsatlas.so: cannot open shared object file: No such file or directory"

I also tried "LD_PRELOAD=/usr/lib/atlas/libtatlas.so.3 matlab", but still got same error.

I'm wondering do I need compile "atlas" from source? It would be a great help if you have any suggestions,

really appreciate your work! Thank you!

tensorboy avatar Jul 21 '17 03:07 tensorboy

Hi,

Thanks a lot for your interest. You tried following the readme for DeepMatching?

umariqb avatar Jul 21 '17 10:07 umariqb

HI, @iqbalu iqblu.

Many thanks for the quick response.

My system is ubun16.04, and MATLAB version is r2015b.

I tried again for the readme steps of DeepMatching.

I first tried "make clean all" as the readme said. But there's a lot of paths which need to be set. So I find and set the path in line 13 to satisify my Ubuntu16.04 system:

/usr/lib/x86_64-linux-gnu/libjpeg.a /usr/lib/x86_64-linux-gnu/libpng.a /usr/lib/x86_64-linux-gnu/libz.a /usr/lib/x86_64-linux-gnu/libblas.a /usr/lib/gcc/x86_64-linux-gnu/4.9.3/libgfortran.a /usr/lib/gcc/x86_64-linux-gnu/4.9.3/libquadmath.a

It showed that:

PoseTrack-CVPR2017/external/deepmatching/conv.cpp:493: undefined reference to `sgemm_'
conv.o: In function `_dotprod_ngh_rad_T(int_cube*, float_image*, int, float_cube*, float_layers*, int_image*, int) [clone ._omp_fn.8]':
PoseTrack-CVPR2017/external/deepmatching/conv.cpp:575: undefined reference to `sgemv_'
conv.o: In function `fast_add_vec':
PoseTrack-CVPR2017/external/deepmatching/conv.cpp:62: undefined reference to `saxpy_'
collect2: error: ld returned 1 exit status
Makefile:30: recipe for target 'deepmatching' failed
make: *** [deepmatching] Error 1

I saw the readme said:

  This program has been built on a fedora18 x64 machine and tested on Mac OS X. 
  *No assistance* will be given to compiling the code on other OS.

And your repository has a compiled DeepMatching, so maybe I should use your compiled one.

I then tried the Matlab wrapper:

ex deepmatching_matlab.cpp deep_matching.o conv.o hog.o image.o io.o main.o maxfilter.o pixel_desc.o -output deepmatching '-DUSEOMP' CFLAGS="-fPIC -Wall -g -std=c++11 -O3 -fopenmp" LDFLAGS="-fopenmp" -lpng -ljpeg -lm /usr/lib/libatlas.so

It showd me:

MEX completed successfully.

And my "atlas" library located at /usr/lib, and here is the result of ls /usr/lib |grep atlas:

atlas-base
libatlas.a
libatlas.so
libatlas.so.3
liblapack_atlas.a
liblapack_atlas.so
liblapack_atlas.so.3

So I launch MATLAB as the readme suggested LD_PRELOAD=/usr/lib/libatlas.so.3 matlab Then I run demo_posetrack, it stilled showed that

/usr/local/atlas/lib/libsatlas.so: cannot open shared object file: No such file or directory

I really appreciate your response. Sincerely, Wangpeng

tensorboy avatar Jul 21 '17 12:07 tensorboy

HI, @iqbalu,

The problem is solved by the methods described in here:

http://zeng.photography/blog/compile-deep-matching-on-ubuntu-14-dot-04/

The linked is shared by my schoolmate @Jason.

Thank you @Jason and @iqbalu 

Sincerely, Wangpeng

tensorboy avatar Jul 22 '17 10:07 tensorboy

I solve this problem by combining several a file related to ATLAS together to get this libsatlas.lib file. DeepMatching Solution

YuliangXiu avatar Jul 25 '17 15:07 YuliangXiu

Can anyone please post the cleaned version of the solution?

avijit9 avatar Aug 03 '17 10:08 avijit9

I solve this problem by modifying this command: "LAPACKLDFLAGS=/usr/lib/libatlas.so # multi-threaded blas" to " LAPACKLDFLAGS=/usr/lib/libblas.so # multi-threaded blas", and i comment the command " #LAPACKLDFLAGS=/usr/lib/atlas/libsatlas.so # single-threaded blas"

SJWang2015 avatar Dec 11 '17 09:12 SJWang2015

Just as the @SJWang2015 said, it works for me by his solution.

You don't need to modify the "STATICLAPACKLDFLAGS". This variable is used for "deepmatching-static" but not "deepmatching", you need to change this variable unless you assign path by your selves.

EnQing626 avatar Jul 01 '18 06:07 EnQing626