Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] sci-libs/atlas vs eselect-cblas
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Thu Aug 22, 2013 8:00 am    Post subject: [SOLVED] sci-libs/atlas vs eselect-cblas Reply with quote

In the old times, when atlas was still in the standard gentoo, you could set your cblas-implementation to atlas with 'eselect cblas set XXX'.

Now I had to install sci-libs/atlas from the science overlay, but this seems to be at war with eselect-cblas:
Code:
 # emerge -p app-admin/eselect-cblas

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] app-admin/eselect-cblas-0.1
[blocks B      ] app-admin/eselect-cblas ("app-admin/eselect-cblas" is blocking sci-libs/atlas-3.10.1-r1)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (app-admin/eselect-cblas-0.1::gentoo, ebuild scheduled for merge) pulled in by
    app-admin/eselect-cblas

  (sci-libs/atlas-3.10.1-r1::science, installed) pulled in by
    sci-libs/atlas required by @selected

(strange message- how can something which is to be installed be blocking something which already is installed?)

How can i set the cblas implementation to atlas in this situation?

Thank You
Jody


Last edited by jody on Tue Sep 10, 2013 8:50 am; edited 3 times in total
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Thu Aug 22, 2013 8:39 am    Post subject: Reply with quote

It is correct. When you installed atlas, it pulled in a version of eselect from the science overlay. You should already have cblas in your eselect list. Try
Code:
eselect cblas list

_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Thu Aug 22, 2013 8:48 am    Post subject: Reply with quote

Right! Thanks!
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Thu Aug 22, 2013 1:10 pm    Post subject: Reply with quote

I'm afraid the issue is not completely solved.
There are still 3 unsolved points.

1. cblas implementation
Even though
Code:
 # eselect cblas list
Available providers for cblas:
  [1]   atlas *
  [2]   atlas-threads

all cblas libraries are pointing to gsl implementations:
Code:
ls -l /usr/lib64/libcblas.*
lrwxrwxrwx 1 root root 13 Aug 20 10:54 /usr/lib64/libcblas.a -> libgslcblas.a
lrwxrwxrwx 1 root root 14 Aug 20 10:54 /usr/lib64/libcblas.so -> libgslcblas.so
lrwxrwxrwx 1 root root 16 Aug 20 10:54 /usr/lib64/libcblas.so.0 -> libgslcblas.so.0

Shoudn't the '/usr/lib64/libcblas.so' point to '/usr/lib64/libatlcblas.so' etc.?


2. static libs for cblas
The installation of sci-libs/atlas did not create any static libs:
Code:
s -l /usr/lib64/libatl*
lrwxrwxrwx 1 root root      13 Aug 22 09:11 /usr/lib64/libatlas.so -> libatlas.so.3
-rwxr-xr-x 1 root root 5961968 Aug 22 09:11 /usr/lib64/libatlas.so.3
lrwxrwxrwx 1 root root      16 Aug 22 09:11 /usr/lib64/libatlcblas.so -> libatlcblas.so.3
-rwxr-xr-x 1 root root  142504 Aug 22 09:11 /usr/lib64/libatlcblas.so.3

And i have at least one 3rd party code which requires the cblas libraries to be linked statically.


3. eselect lapack
I found that 'app-admin/eselect-lapack' is also blocking 'sci-libs/atlas',
but atlas did not pull in eselect for lapack:
Code:
 # eselect lapack list
!!! Error: Can't load module lapack
exiting


Sorry for reopening the issue.
Jody
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Thu Aug 22, 2013 2:38 pm    Post subject: Reply with quote

Hmm.. I think you had better post an email to the gentoo science ML: gentoo-science at lists.gentoo.org
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
elkhunter
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2004
Posts: 138

PostPosted: Sun Sep 01, 2013 11:13 pm    Post subject: Reply with quote

Hi Jody,

Did you find a solution? I'm running into the same problem (which I believe is causing both scipy and sympy to fail):


Calculating dependencies ... ..... done!
[ebuild N ] app-admin/eselect-cblas-0.1
[blocks B ] app-admin/eselect-cblas ("app-admin/eselect-cblas" is blocking sci-libs/lapack-reference-3.4.2, dev-cpp/eigen-3.2.0, sci-libs/gsl-1.16-r1)

* Error: The above package list contains packages which cannot be
* installed at the same time on the same system.

(dev-cpp/eigen-3.2.0::science, installed) pulled in by
>=dev-cpp/eigen-3.1.2 required by (virtual/blas-2.1::science, installed)
dev-cpp/eigen:3 required by (sci-chemistry/openbabel-2.3.2::gentoo, installed)

(app-admin/eselect-cblas-0.1::gentoo, ebuild scheduled for merge) pulled in by
app-admin/eselect-cblas

(sci-libs/lapack-reference-3.4.2::science, installed) pulled in by
>=sci-libs/lapack-reference-3.4 required by (virtual/lapack-3.4::science, installed)

(sci-libs/gsl-1.16-r1::science, installed) pulled in by
sci-libs/gsl required by (media-gfx/inkscape-0.48.4-r1::gentoo, installed)
>=sci-libs/gsl-1.9-r1 required by (kde-base/step-4.11.0::gentoo, installed)
>=sci-libs/gsl-1.15 required by (sci-mathematics/sage-5.10-r1::sage-on-gentoo, installed)
sci-libs/gsl required by (sci-mathematics/gmp-ecm-6.4.4-r2::sage-on-gentoo, installed)
>=sci-libs/gsl-1.15-r3[-cblas-external] required by (virtual/cblas-2.0::science, installed)
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Mon Sep 02, 2013 7:07 am    Post subject: Reply with quote

Hi Elkhunter

No, i haven't been able to solve this problem yet.
I am still waiting for a reply from the gentoo-science list, to which i posted the issue (as ppurka suggested)...

Jody
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Tue Sep 10, 2013 8:50 am    Post subject: Reply with quote

Hi
Just to wrap this topic up.
On the gentoo science mailing list, Francois Bissey helped me a lot:
Quote:
The mechanism for handling multiple BLAS/LAPACK in the science overlay
is incompatible with the one used in the main tree.
In particular the science overlay stack doesn't create link link to libcblas,
libblas and liblapack.
You have to unmask eselect from the science overlay as well as the virtuals
(cblas,blas and lapack) and remove all the tree eselect-blas, eselect-cblas
and eselect-lapack modules.
No packages in Gentoo, in the tree or the overlay, should use libblas, libcblas or
liblapack directly but configure it throught pkg-config.
All BLAS/LAPACK implementation in Gentoo provide .pc file for that purpose. With
the new science overlay structure you create a link for which .pc file is the default.

So once you have completed your move to the science overlay stack you need to remove
those links if they still exist.


When atlas & co were still in the normal gentoo tree, you used eselect-blas, eselect-cblas etc
to set links to the specific implementations for libcblas.so, libblas.so, liblapack.so etc.

In the science overlay, there are no more links to (shared object) libraries for blas, cblas lapack in lib64;
instead you have to use pkg-config:
to compile something with cblas, for example, add
Code:
`pkg-config --cflags cblas`
to the compiler options (note the"back"-quotes),
and to link add
Code:
`pkg-config --libs cblas`
to the options.

Old links in lib64 should be removed:
Quote:
Once you have completely migrated to the science
overlay stack you should remove any of the leftover links as they can
have troublesome side effects.


Hope this helps other people facing this problem.

Jody
Back to top
View user's profile Send private message
elkhunter
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2004
Posts: 138

PostPosted: Sat Sep 14, 2013 1:50 pm    Post subject: Reply with quote

Thanks Jody. I removed the old versions and installed the new ones from the science overlay and I used eselect to set blas, cblas, and lapack to all use atlas-threads. Everything compiles fine but, when I try to run octave, its still looking for libblas as shown below:

octave: error while loading shared libraries: libblas.so.0: cannot open shared object file: No such file or directory

I've searched my / filesystem and verified I dont have a libblas.so* anywhere. I also grep'ed through all the *blas*.pc files and verified none reference -lblas but whenever I compile octave it still wants to use it. Any ideas? Is octave working for you?
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Sun Sep 15, 2013 9:38 am    Post subject: Reply with quote

hi elkhunter

Sorry, i am not using octave, so i don't know if i can help here.

But I just emerged octave without any problems and i was also able to run it without it complaining about libblas...

I noticed you said you used eselect for blas/cblas/lapack.
But when one uses the science overlay one should not use these eselects:
Quote:
You have to unmask eselect from the science overlay as well as the virtuals
(cblas,blas and lapack) and remove all the tree eselect-blas, eselect-cblas
and eselect-lapack modules
.
No packages in Gentoo, in the tree or the overlay, should use libblas, libcblas or
liblapack directly but configure it throught pkg-config.


I.e. you have to unmerge

    app-admin/eselect-blas
    app-admin/eselect-cblas
    app-admin/eselect-lapack

then unmask and emerge

    app-admin/eselect-1.3.7-r100
    virtual/blas-2.1, virtual/cblas-2.0,
    virtual/lapack-3.4


make sure you have no old libblas*, libcblas* or liblapack* lying in your /usr/lib

Then try to reemerge octave after having followed the above steps.

I hope this helps...
jody
Back to top
View user's profile Send private message
archenroot
Apprentice
Apprentice


Joined: 13 Dec 2011
Posts: 218
Location: Lake Macha, Czech republic

PostPosted: Tue Dec 06, 2016 9:27 am    Post subject: Reply with quote

Hi Jody, after 3 years I got into same nasty situation while getting up neural network framework Torch7, thx for your guidance. It resolved my issues quickly.
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum