Installation issue - BLAS/MKL libs

Provide extensible software for building Markov State Models.
POST REPLY
User avatar
Leonardo Garma
Posts: 4
Joined: Fri Feb 24, 2012 11:47 am

Installation issue - BLAS/MKL libs

Post by Leonardo Garma » Sun Aug 26, 2012 11:04 am

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

User avatar
Robert McGibbon
Posts: 20
Joined: Tue Jul 19, 2011 9:25 am

Re: Installation issue - BLAS/MKL libs

Post by Robert McGibbon » Sun Aug 26, 2012 12:11 pm

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

User avatar
Robert McGibbon
Posts: 20
Joined: Tue Jul 19, 2011 9:25 am

Re: Installation issue - BLAS/MKL libs

Post by Robert McGibbon » Sun Aug 26, 2012 12:19 pm

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.

User avatar
Leonardo Garma
Posts: 4
Joined: Fri Feb 24, 2012 11:47 am

Re: Installation issue - BLAS/MKL libs

Post by Leonardo Garma » Sun Aug 26, 2012 1:16 pm

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?

User avatar
Robert McGibbon
Posts: 20
Joined: Tue Jul 19, 2011 9:25 am

Re: Installation issue - BLAS/MKL libs

Post by Robert McGibbon » Sun Aug 26, 2012 1:40 pm

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

User avatar
Leonardo Garma
Posts: 4
Joined: Fri Feb 24, 2012 11:47 am

Re: Installation issue - BLAS/MKL libs

Post by Leonardo Garma » Thu Aug 30, 2012 3:09 am

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.

User avatar
Robert McGibbon
Posts: 20
Joined: Tue Jul 19, 2011 9:25 am

Re: Installation issue - BLAS/MKL libs

Post by Robert McGibbon » Thu Aug 30, 2012 5:49 pm

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?

User avatar
Leonardo Garma
Posts: 4
Joined: Fri Feb 24, 2012 11:47 am

Re: Installation issue - BLAS/MKL libs

Post by Leonardo Garma » Fri Aug 31, 2012 5:19 am

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.

User avatar
Robert McGibbon
Posts: 20
Joined: Tue Jul 19, 2011 9:25 am

Re: Installation issue - BLAS/MKL libs

Post by Robert McGibbon » Fri Aug 31, 2012 12:41 pm

Try setting the environment variable OMP_NUM_THREADS to 1?

User avatar
web design
Posts: 10
Joined: Fri Aug 18, 2017 12:43 pm

Re: Installation issue - BLAS/MKL libs

Post by web design » Fri Aug 18, 2017 1:19 pm

I really enjoyed the post

POST REPLY