Assimulo setup failing to find BLAS

2 posts / 0 new
Last post
gondolindrim
Offline
Joined: 2018-01-29
Assimulo setup failing to find BLAS

Hey there.

I'm trying to install Assimulo. I have all the packages needed, except for assimulo itself. I installed Sundials 2.6 with the CMAKE-C_FLAGS = "-fPIC" flag since I'm running a 64 bit Arch Linux.

When I run Assimulo setup.py, it gives me the following DEBUG:

-------------------------------------------------------------

DEBUG:setup.py called with the following optional args
 {'blas_home': '/usr/lib/', 'lapack_home': '/usr/lib/', 'plugins_home': '', 'sundials_home': '/usr/local/', 'superlu_home': '', 'blas_name': 'blas', 'extra_c_flags': '', 'is_static': False, 'sundials_with_superlu': False, 'debug': False, 'force_32bit': False, 'no_msvcr': False, 'log': 'NOTSET', 'log_file': None, 'prefix': None}
 argument parsing completed.
DEBUG:Source from svn revision unknow
DEBUG:Python version used: 3.6.4
DEBUG:Platform linux
WARNING:Could not find BLAS, disabling support. View more information using --log=DEBUG
DEBUG:Could not find BLAS at the given path /usr/lib/.
DEBUG:usage: --blas-home=path
WARNING:KINSOL will not be compiled with support for SuperLU as BLAS is missing.
DEBUG:SUNDIALS found.
DEBUG:SUNDIALS 2.6 found.
DEBUG:LAPACK found at /usr/lib/

---------------------------------------------------------------

Meaning it won't find BLAS, but will find Sundials and LAPACK. Interestingly enough, LAPACK and BLAS are in /usr/lib/. I manually checked for libblas.so and liblapack.so and they are there.

But it installs normally. When I try to import IDA, it gives me an error:

---------------------------------------------------------------------------

Python 3.6.4 (default, Jan  5 2018, 02:35:40) 
[GCC 7.2.1 20171224] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from assimulo.solvers import IDA
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/assimulo/solvers/__init__.py", line 24, in <module>
    from .sundials import IDA, CVode
ImportError: libsundials_cvodes.so.2: cannot open shared object file: No such file or directory

----------------------------------------------------------------------------

This could be because, when I install Sundials through ccmake, it gives me a warning for something not supporting cmake versions greater than 2.4 or something:

-----------------------------------------------------------------------------

 CMake Warning (dev) at /home/alvaro/Desktop/sundials2.6/builddir/FortranTest/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
   Compatibility with CMake < 2.4 is not supported by CMake >= 3.0.
 This warning is for project developers.  Use -Wno-dev to suppress it.

 CMake Warning (dev) at /home/alvaro/Desktop/sundials2.6/builddir/FortranTest/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
   Compatibility with CMake < 2.4 is not supported by CMake >= 3.0.
 This warning is for project developers.  Use -Wno-dev to suppress it.

 CMake Warning (dev) at /home/alvaro/Desktop/sundials2.6/builddir/FortranTest/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
   Compatibility with CMake < 2.4 is not supported by CMake >= 3.0.
 This warning is for project developers.  Use -Wno-dev to suppress it.

 CMake Warning (dev) at /home/alvaro/Desktop/sundials2.6/builddir/FortranTest/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
   Compatibility with CMake < 2.4 is not supported by CMake >= 3.0.
 This warning is for project developers.  Use -Wno-dev to suppress it.

 CMake Warning (dev) at /home/alvaro/Desktop/sundials2.6/builddir/FortranTest/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
   Compatibility with CMake < 2.4 is not supported by CMake >= 3.0.
 This warning is for project developers.  Use -Wno-dev to suppress it.

 CMake Warning (dev) at /home/alvaro/Desktop/sundials2.6/builddir/LapackTest/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
   Compatibility with CMake < 2.4 is not supported by CMake >= 3.0.
 This warning is for project developers.  Use -Wno-dev to suppress it.

-----------------------------------------------------------------------------

 

I have tried re-installing every package (Sundials, LAPACK, BLAS, Python packages like Cython and Scipy) to no avail.

 

I also found some posts in this forum similar to what I had, but nothing solved it for me. Can someone help me?

 

gondolindrim
Offline
Joined: 2018-01-29
Solution

It seems I have found a paliative solution, for now.

 

Both Sundials installation and Assimulo were done correctly. What happens is, for some misterious reason, Python won't find SUNDIALS' shared libraries, causing the whole thing not to load. The solution was to set the LD_LIBRARY_PATH to /usr/local/lib before running Python. The examples seem to run smoothly this way.

 

Although it is not a big thing, this solution can be harmful since it is well-known that manipulating LD_LIBRARY_PATH can be harmful, specially in rolling-release Linux distributions like Arch Linux or Gentoo because it can eventually corrupt libraries.

 

Is there a more permanent solution?

Login or register to post comments