Page 1 of 1
Installation issue - BLAS/MKL libs
Posted: Sun Aug 26, 2012 11:04 am
by lgarma
Hi,
I'm trying to build MSM Builder for the first time and I can't figure out how to solve this error:
The C extension 'LPRMSD' could not be compiled.
This may be due to a failure to find the BLAS/MKL libraries.
I'm using Ubuntu; I installed the BLAS and LAPACK libraries from the repositories (packages libblas-dev & liblapack-dev) and they seem to be correctly installed in my /usr/lib. Any idea on how to solve this?
Leo
Re: Installation issue - BLAS/MKL libs
Posted: Sun Aug 26, 2012 12:11 pm
by rmcgibbo
Leo,
Thanks for your feedback. We're trying to make the installation process as smooth as possible, but there are definitely still some hiccups. In this case, it's basically just a bug in the setup.py file.
If you're using MSMBuilder 2.5.1, open up the file setup.py in your favorite text editor, and uncomment line 59, or equivalently add "-latlas" and "-lcblas" to the list on line 73.
In general though, LPRMSD is not a core feature, and for most purposes is not required. There is a little bit of information about it if you try `Cluster.py lprmsd -h`
-Robert
Re: Installation issue - BLAS/MKL libs
Posted: Sun Aug 26, 2012 12:19 pm
by rmcgibbo
Leo,
One more question. Are you using a python distribution like EPD, the ubuntu system python, or one that you compiled from source yourself?
The culprit here is that I think we're explicitly looking for MKL libraries in the place that they are installed with EPD python, the distribution that we recommend.
Re: Installation issue - BLAS/MKL libs
Posted: Sun Aug 26, 2012 1:16 pm
by lgarma
Thanks for the quick answer!
I'm using the ubuntu system python. I tried modifying the setup.py file but that doesn't seem to help. If I install EPD python, how should I modify the setup.py file to include its MKL libraries?
Re: Installation issue - BLAS/MKL libs
Posted: Sun Aug 26, 2012 1:40 pm
by rmcgibbo
If you use EPD python, it should just work, you don't have to do anything special
This line:
extra_link_args=['-L%s' % distutils.sysconfig.get_config_var('LIBDIR'),'-lpthread', '-lm', '-lgomp']
adds EPD Lib dir to the link line, which is where MKL shared object files are installed by default.
I just testing this on a fresh ubuntu 12.04-server VM with EPD 7.3.2.
-Robert
Re: Installation issue - BLAS/MKL libs
Posted: Thu Aug 30, 2012 3:09 am
by lgarma
I installed EPD but running setup.py with it (ipython) gives the same BLAS/MKL error. Should I include a link to the EPD lib directory somewhere? I tried adding '-L/.../lib' to the extra_link_args list on setup.py, but that doesn't help.
I installed the program anyway and tried to run the tutorial, but I bumped into a Segmentation Fault as soon as I started the clustering. I'm wondering if this is related to the LPRMSD error.
Leo.
Re: Installation issue - BLAS/MKL libs
Posted: Thu Aug 30, 2012 5:49 pm
by rmcgibbo
Can you attach out the full stdout stream that comes from running `python setup.py build`. Also, for the call out to GCC that is actually throwing the link error, can you try executing that command by hand in the shell and then looking at what that prints to stderr.
A segfaut on the tutorial is something else -- the tutorial doesn't call LPRMSD at all. The only obvious possibility that comes to mind is something with OpenMP.
Do you have libgomp installed? (sudo apt-get install libgomp1) Does your machine support SSE2 and SSE3?
Re: Installation issue - BLAS/MKL libs
Posted: Fri Aug 31, 2012 5:19 am
by lgarma
OK, I read the full setup output and realized that I was building the program using the -m64 flag in a 32bit system. Building with proper compiler flags works perfectly but the clusterer still crashes. This has been reported already so I guess there isn't much I can do about it.
Re: Installation issue - BLAS/MKL libs
Posted: Fri Aug 31, 2012 12:41 pm
by rmcgibbo
Try setting the environment variable OMP_NUM_THREADS to 1?
Re: Installation issue - BLAS/MKL libs
Posted: Fri Aug 18, 2017 1:19 pm
by spadanco
I really enjoyed the post