Installation issue - BLAS/MKL libs
- Leonardo Garma
- Posts: 4
- Joined: Fri Feb 24, 2012 11:47 am
Installation issue - BLAS/MKL libs
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
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
- Robert McGibbon
- Posts: 20
- Joined: Tue Jul 19, 2011 9:25 am
Re: Installation issue - BLAS/MKL libs
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
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
- Robert McGibbon
- Posts: 20
- Joined: Tue Jul 19, 2011 9:25 am
Re: Installation issue - BLAS/MKL libs
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.
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.
- Leonardo Garma
- Posts: 4
- Joined: Fri Feb 24, 2012 11:47 am
Re: Installation issue - BLAS/MKL libs
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?
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?
- Robert McGibbon
- Posts: 20
- Joined: Tue Jul 19, 2011 9:25 am
Re: Installation issue - BLAS/MKL libs
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
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
- Leonardo Garma
- Posts: 4
- Joined: Fri Feb 24, 2012 11:47 am
Re: Installation issue - BLAS/MKL libs
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.
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.
- Robert McGibbon
- Posts: 20
- Joined: Tue Jul 19, 2011 9:25 am
Re: Installation issue - BLAS/MKL libs
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?
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?
- Leonardo Garma
- Posts: 4
- Joined: Fri Feb 24, 2012 11:47 am
Re: Installation issue - BLAS/MKL libs
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.
- Robert McGibbon
- Posts: 20
- Joined: Tue Jul 19, 2011 9:25 am
Re: Installation issue - BLAS/MKL libs
Try setting the environment variable OMP_NUM_THREADS to 1?
- web design
- Posts: 10
- Joined: Fri Aug 18, 2017 12:43 pm
Re: Installation issue - BLAS/MKL libs
I really enjoyed the post