Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 370447 - dev-lang/R-2.12.2 - The eigen function generates segfaults if blas-atlas is the eselected blas library
Summary: dev-lang/R-2.12.2 - The eigen function generates segfaults if blas-atlas is t...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-07 12:39 UTC by Juergen Rose
Modified: 2012-01-02 19:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2011-06-07 12:39:26 UTC
I just did a fresh installation of blas-atlas, lapack-atlas:
root@moose:/root(6)# genlop -t blas-atlas | tail -n3
     Tue Jun  7 13:58:28 2011 >>> sci-libs/blas-atlas-3.9.23-r4
       merge time: 23 minutes and 56 seconds.

root@moose:/root(7)# genlop -t lapack-atlas | tail -n3
     Tue Jun  7 14:02:23 2011 >>> sci-libs/lapack-atlas-3.9.23-r3
       merge time: 3 minutes and 55 seconds.

gcc was 4.5.2:
root@moose:/root(9)# gcc --version
gcc (Gentoo 4.5.2 p1.1, pie-0.4.5) 4.5.2

root@moose:/root(10)# eselect blas list
Installed BLAS for library directory lib64
  [1]   atlas *
  [2]   atlas-threads
root@moose:/root(11)# eselect lapack list
Installed LAPACK for library directory lib64
  [1]   atlas *

Then I reinstalled R:
root@moose:/root(12)# genlop -t R | tail -n3
     Tue Jun  7 14:06:42 2011 >>> dev-lang/R-2.12.2
       merge time: 3 minutes and 54 seconds.

When I now try to calculate eigenvalues of a larger distance matrix, R crashes with segfault:
rose@moose:/home/rose(4)$ R

R version 2.12.2 (2011-02-25)
...
> data(iris)
> D <- dist(iris[,-5])
> eigen(D)

 *** caught segfault ***
address (nil), cause 'unknown'

Traceback:
 1: .Call("La_rs", x, only.values, PACKAGE = "base")
 2: eigen(D)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

I ask at r-help mailing list and got the answer that there is no such problem on other x86_64 systems (including Fedora 14 and 12, FreeBSD, Solaris and Windows) and that can debug segfaults myself or ask my vendor for support.

If I select blas-reference and lapack-reference instead of blas-atlas and lapack-atlas before compiling I don't suffer from segfault, but these libraries are not optimized and just removed by 'emerge --depclean' from my system.

The same error has also happened with the last version of R (R-2.12.2) four month ago. And it happens at all systems I tested.

Any hint is appreciated.



Reproducible: Always




root@moose:/root(14)# emerge --info
Portage 2.1.10 (default/linux/amd64/10.0/desktop, gcc-4.5.2, glibc-2.13-r2, 2.6.39-gentoo x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9650_@_3.00GHz-with-gentoo-2.0.2
Timestamp of tree: Tue, 07 Jun 2011 08:00:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.2
dev-util/cmake:           2.8.4-r1
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r2
Repositories: gentoo science x11 java-overlay sunrise arcon proaudio qting-edge x-portage x-cpan g-octave
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula googleearth AdobeFlash-10.1 cadsoft"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.2/ext-active/ /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.2/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de fr"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /var/lib/layman/x11 /var/lib/layman/java-overlay /var/lib/layman/sunrise /var/lib/layman/arcon /var/lib/layman/pro-audio /var/lib/layman/qting-edge /usr/local/portage /var/lib/cpan /var/lib/g-octave"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit R X Xaw3d a52 aac abiword acl acpi admin afs alsa amd64 ao apache2 applet archive arpack asf aspell assistant audacious audiofile automap automount bash-completion beagle berkdb blas blast bluetooth boo boost branding bzip2 cairo cdda cddb cdf cdio cdparanoia cdr cg cgi chm cli consolekit corba cracklib crypt css cuda cups curl cxx daap db dbase dbi dbm dbus declarative designer devhelp device-mapper dga dia djvu doc dri ds2490 ds9097 ds9097u dts dv dvb dvd dvdr dvi dynamicplugin eds elf emacs emboss emf encode epiphany evo examples exif expat extensions extra extras fam fame ffmpeg fftw firefox fits flac fltk fontconfig foomaticdb fortran fortran95 fpx fts3 fuse galago garmin gcj gd gdal gdbm gdu gedit geoip geolocation geos gfortran gif gimp ginac git glade glib gml gmp gmtsuppl gnome gnome-keyring gnome-print gnuplot gnutls gphoto2 gpm grammar graphics graphtft graphviz grass gs gsl gsm gstreamer gtk guile harness hddtemp hdf hdf5 hdri http httpd hvm iconv icq icu id3 ide imagemagick imap innodb inotify ipod ipv6 irda ithreads jabber jadetex java java6 jbig john jpeg jpeg2k kdrive kerberos kpathsea kqemu kvm ladspa lame lapack latex latex3 lcms ldap lensfun libffi libgda libnotify libsamplerate lirc lm_sensors lua lzo mad mail maildir mapnik math matroska mkl mmx mmxext mng modules mono moonlight motif mozilla mp3 mp4 mpeg mpi mpi-threads mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networking networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numpy nvidia obex objc ocaml octave odbc ogdi ogg ole openexr opengl openmp overview pae pam pango pcre pda pdf perl plotutils plugins png podcast policykit portaudio posix postgres postscript ppds pppd preview-latex proj projectx pstricks pulseaudio python python-bindings q16 q32 qemu qhull qt3support qt4 quicktime readline reiserfs reports rle romio rpc rrdcgi rrdtool samba sasl science sdk sdl secure-delete semantic-desktop server session sip slang slp smbclient smp sms sndfile snmp soup sox speex spell sql sqlite sse sse2 sse4 ssl ssse3 startup-notification stlport subtitles subversion suexec svg svm swig sysfs szip t1lib tcl tcpd tex tex4ht texmacs tgif theora threads thunderbird tidy tiff tk tntc tools truetype udev unicode usb userlocales utempter v4l2 video virtualbox vorbis wav webdav webdav-serf webkit wifi wmf wxwidgets x264 xattr xcb xemacs xext xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc yaml zlib zvbi" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy gsf harness ide identity j2ee java mobility nb php profiler ruby websvccommon xml" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nouveau vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Philippe Marti 2011-06-21 18:28:04 UTC
I have the same problem on two amd64 machines using ATLAS BLAS and LAPACK.

The problems seems to be the use only in the BLAS library. The same problem appears when the lapack use-flag is desactivated.

Removing the "--with-blas" compilation flag manually and recompiling R (tested with 2.10.1 and 2.12.2) gives a working R.

I'm using blas-atlas-3.9.23-r4 and lapack-atlas-3.9.23-r3.
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2011-06-23 13:11:16 UTC
same in 2.13.0?
Comment 3 Philippe Marti 2011-06-23 16:56:41 UTC
Yes, same problem with 2.13.0.

Anything I can try to help?
Comment 4 Juergen Rose 2011-06-23 19:35:35 UTC
I have the same issue with 2.13.0 (2011-04-13), too.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2011-06-24 00:10:25 UTC
are you using the atlas libs from bicatali overlay? If not, please try them.
Comment 6 Philippe Marti 2011-06-24 06:38:43 UTC
Ok, I switched to the atlas lib from bicatali overlay.

Seems to work fine. No more segfaults with the example in the original post.

Is that version going to be next to get into the tree?

Thanks
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2011-06-24 07:32:05 UTC
(In reply to comment #6)
> Ok, I switched to the atlas lib from bicatali overlay.
> 
> Seems to work fine. No more segfaults with the example in the original post.
> 
> Is that version going to be next to get into the tree?
> 
> Thanks

Nice to hear that. Sebastien did a big rewrite of the ebuild and what is behind, like the eselect stuff. Once we can declare this as mature it will be moved to the tree. until then, just use the overlay. It does fine for me since some time now.
Comment 8 Juergen Rose 2011-06-24 10:32:24 UTC
After adding the bicatali overlays 'emerge -uvDN world' complains about several blocking packages. After removing 

eselect-blas 
eselect-lapack 
eselect-cblas 
eselect
blas-atlas
lapack-atlas 
blas-reference

'emerge -vuND world' starts to emerge, but fails with:

>>> Starting parallel fetch

>>> Emerging (1 of 12) app-doc/blas-docs-3.2.0 from bicatali
 * waiting for lock on /usr/portage_orca/distfiles/.lapack-man-3.2.0.tar.gz.portage_lockfile
 ...                                         [ ok ]
>>> Downloading 'http://distfiles.gentoo.org/distfiles/lapack-man-3.2.0.tar.gz'
--2011-06-24 12:31:56--  http://distfiles.gentoo.org/distfiles/lapack-man-3.2.0.tar.gz
Resolving distfiles.gentoo.org (distfiles.gentoo.org)... 137.226.34.42, 140.211.166.134, 149.20.20.135, ...
Connecting to distfiles.gentoo.org (distfiles.gentoo.org)|137.226.34.42|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2011-06-24 12:31:56 ERROR 404: Not Found.
...
2011-06-24 12:31:57 ERROR 404: Not Found.

!!! Couldn't download 'lapack-man-3.2.0.tar.gz'. Aborting.
 * Fetch failed for 'app-doc/blas-docs-3.2.0', Log file:
Comment 9 Justin Lecher (RETIRED) gentoo-dev 2011-06-24 10:42:51 UTC
(In reply to comment #8)
> After adding the bicatali overlays 'emerge -uvDN world' complains about several
> blocking packages. After removing 
> 
> eselect-blas 
> eselect-lapack 
> eselect-cblas 
> eselect
> blas-atlas
> lapack-atlas 
> blas-reference

You have to mask the reference implementations from the tree, as their version numbers are much larger as the once from the overlay. But the overlay package are newer. 20070226 -> 3.3.1

second you need to remove the eselect stuff. New blas is based on the alternatives modules for eselect.

> !!! Couldn't download 'lapack-man-3.2.0.tar.gz'. Aborting.
>  * Fetch failed for 'app-doc/blas-docs-3.2.0', Log file:


Probably best to disable the doc USE for the package. I can't find the sources right now.
Comment 10 Philippe Marti 2011-06-24 11:39:11 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > After adding the bicatali overlays 'emerge -uvDN world' complains about several
> > blocking packages. After removing 
> > 
> > eselect-blas 
> > eselect-lapack 
> > eselect-cblas 
> > eselect
> > blas-atlas
> > lapack-atlas 
> > blas-reference
>

For me it was trying to pull back everything in on a revdep-rebuild. Just unmask the three virtual blas,cblas and lapack.
Comment 11 Juergen Rose 2011-06-24 16:48:02 UTC
It looks, if I have erased to much:

'revdep-rebuild' fails with:
...
checking for sgemm_ in -lblas... (cached) no
configure: error: Cannot find blas libraries


'emerge -v1 eselect' fails with:
>>> Emerging (1 of 1) app-admin/eselect-1.2.15-r1 from bicatali
...
/usr/bin/rst2html.py < README > README.html
Execution of 'eselect python show' failed
make: *** [README.html] Error 1



 emerge -uvDN world fails also with:
...
>>> Emerging (1 of 7) app-admin/eselect-1.2.15-r1 from bicatali
...
/usr/bin/rst2html.py < README > README.html
Execution of 'eselect python show' failed


Any hint is appreciated.
Comment 12 Juergen Rose 2011-06-24 17:22:02 UTC
The 'emerge eselect' I could solve by:
USE="-doc -bash-completion" emerge -pv1 eselect


'emerge -vuND world' fails now with:

Saving to: `/usr/portage_orca/distfiles/eigen-3.0.1.tar.bz2'

100%[======================================================================================================================================================================>] 902,794      469K/s   in 1.9s    

2011-06-24 19:14:28 (469 KB/s) - `/usr/portage_orca/distfiles/eigen-3.0.1.tar.bz2' saved [902794/902794]

('Filesize does not match recorded size', 902794, 904805)

That's why  virtual/lapack, sci-libs/lapack-reference and virtual/blas is also not emerged.

'revdep-rebuild' fails because of missing blas.
Comment 13 Juergen Rose 2011-06-29 10:13:12 UTC
The blas-atlas and lapack-atlas ebuilds disappeared from the bicatali overlay.
That's why 'emerge blas-atlas' is broken again, because blas-atlas from the normal portage tree expect eselect-blas-0.1 while virtual/blas-2.0::bicatali expect the installed eselect-1.2.15-r1:

root@orca:/usr/local/portage(70)# emerge -puvND blas-atlas

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

Calculating dependencies... done!
[ebuild     U  ] app-doc/blas-docs-3.2.0 [3.1.1] 3,445 kB [0=>1]
[ebuild  N     ] app-admin/eselect-blas-0.1  0 kB [0]
[ebuild  N     ] app-admin/eselect-cblas-0.1  0 kB [0]
[ebuild  N     ] sci-libs/blas-atlas-3.9.23-r4  USE="doc" 0 kB [0]
[blocks B      ] app-admin/eselect-blas ("app-admin/eselect-blas" is blocking sci-libs/lapack-reference-3.3.1-r1, sci-libs/gsl-1.15-r1, sci-libs/blas-reference-3.3.1-r1)
[blocks B      ] app-admin/eselect-cblas ("app-admin/eselect-cblas" is blocking sci-libs/lapack-reference-3.3.1-r1, sci-libs/gsl-1.15-r1, sci-libs/blas-reference-3.3.1-r1)

Total: 4 packages (1 upgrade, 3 new), Size of downloads: 3,445 kB
Conflict: 2 blocks (2 unsatisfied)
Portage tree and overlays:
 [0] /usr/portage
 [1] /var/lib/layman/bicatali

 * 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 required by (sci-libs/blas-atlas-3.9.23-r4::gentoo, ebuild scheduled for merge)

  (app-admin/eselect-blas-0.1::gentoo, ebuild scheduled for merge) pulled in by
    app-admin/eselect-blas required by (sci-libs/blas-atlas-3.9.23-r4::gentoo, ebuild scheduled for merge)

  (sci-libs/lapack-reference-3.3.1-r1::bicatali, installed) pulled in by
    >=sci-libs/lapack-reference-3.3 required by (virtual/lapack-3.3::bicatali, installed)

  (sci-libs/blas-reference-3.3.1-r1::bicatali, installed) pulled in by
    >=sci-libs/blas-reference-3.3 required by (virtual/blas-2.0::bicatali, installed)

  (sci-libs/gsl-1.15-r1::bicatali, installed) pulled in by
    >=sci-libs/gsl-1.14-r2 required by (virtual/cblas-2.0::bicatali, installed)


For more information about Blocked Packages, please refer to the following
section of the Gentoo Linux x86 Handbook (architecture is irrelevant):

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#blocked

root@orca:/usr/local/portage(71)# qlist -Iv eselect
app-admin/eselect-1.2.15-r1
...
Comment 14 Juergen Rose 2011-06-29 10:14:34 UTC
Still an addon to Comment 11:

root@orca:/usr/local/portage(73)# ll -d /var/lib/layman/bicatali/sci-libs/blas*
drwxr-xr-x 2 root root 4096 Jun 29 12:02 /var/lib/layman/bicatali/sci-libs/blas-reference/
Comment 15 Philippe Marti 2011-06-29 10:23:45 UTC
blas-atlas and lapack-atlas are merged into one single atlas on the overlay.

Did you update the virtuals (blas, lapack ...)? something is still pulling in the old blas for you. 

you might be able to see it with : emerge -puvtND blas-atlas
(I simply added the t option).
Comment 16 Justin Lecher (RETIRED) gentoo-dev 2011-06-29 10:31:21 UTC
maybe you enabled USE=atlas somewhere.

Try to add 
sci-libs/blas-atlas
sci-libs/lapack-atlas
to /etc/portage/profies/package.provided
Comment 17 Juergen Rose 2011-06-29 10:34:51 UTC
'emerge -puvtND blas-atlas' does not show much more than I have posted in Comment 13:

root@orca:/usr/local/portage/sci-chemistry(67)# emerge -puvtND blas-atlas

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

Calculating dependencies... done!
[ebuild  N     ] sci-libs/blas-atlas-3.9.23-r4  USE="doc" 0 kB [0]
[ebuild  N     ]  app-admin/eselect-cblas-0.1  0 kB [0]
[ebuild  N     ]  app-admin/eselect-blas-0.1  0 kB [0]
[ebuild     U  ]  app-doc/blas-docs-3.2.0 [3.1.1] 3,445 kB [0=>1]
[blocks B      ] app-admin/eselect-cblas ("app-admin/eselect-cblas" is blocking sci-libs/lapack-reference-3.3.1-r1, sci-libs/gsl-1.15-r1, sci-libs/blas-reference-3.3.1-r1)
[blocks B      ] app-admin/eselect-blas ("app-admin/eselect-blas" is blocking sci-libs/lapack-reference-3.3.1-r1, sci-libs/gsl-1.15-r1, sci-libs/blas-reference-3.3.1-r1)

Total: 4 packages (1 upgrade, 3 new), Size of downloads: 3,445 kB
Conflict: 2 blocks (2 unsatisfied)
Portage tree and overlays:
 [0] /usr/portage
 [1] /var/lib/layman/bicatali

 * 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 required by (sci-libs/blas-atlas-3.9.23-r4::gentoo, ebuild scheduled for merge)

  (app-admin/eselect-blas-0.1::gentoo, ebuild scheduled for merge) pulled in by
    app-admin/eselect-blas required by (sci-libs/blas-atlas-3.9.23-r4::gentoo, ebuild scheduled for merge)

  (sci-libs/lapack-reference-3.3.1-r1::bicatali, installed) pulled in by
    >=sci-libs/lapack-reference-3.3 required by (virtual/lapack-3.3::bicatali, installed)

  (sci-libs/blas-reference-3.3.1-r1::bicatali, installed) pulled in by
    >=sci-libs/blas-reference-3.3 required by (virtual/blas-2.0::bicatali, installed)

  (sci-libs/gsl-1.15-r1::bicatali, installed) pulled in by
    >=sci-libs/gsl-1.14-r2 required by (virtual/cblas-2.0::bicatali, installed)

Perhaps it is better to do 'emerge -puvtND sci-libs/atlas':
root@orca:/usr/local/portage/sci-chemistry(69)# emerge -puvtND sci-libs/atlas

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

Calculating dependencies... done!
[ebuild  N     ] sci-libs/atlas-3.9.41  USE="doc fortran lapack threads -static-libs" 5,370 kB [1]

Total: 1 package (1 new), Size of downloads: 5,370 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /var/lib/layman/bicatali
Comment 18 Juergen Rose 2011-06-29 15:50:17 UTC
Hi Justin,

I added 'atlas' to USE in /etc/make.conf, but 'emerge -uvND world' does not want to update any packages because of the added 'atlas' flag:

root@orca:/root(5)# emerge -pvuND world
Invalid package name in package.provided: sci-libs/lapack-atlas
Invalid package name in package.provided: sci-libs/blas-atlas
See portage(5) for correct package.provided usage.

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

Calculating dependencies... done!
[ebuild   R    ] sci-mathematics/scilab-5.3.2  USE="doc fftw gui matio nls tk umfpack xcos* -hdf5" 0 kB [1=>2]


'emerge scilab' fails due to missing blas library. Which packages should depend on the 'atlas' flag? I tested some, but I did not find any:

Invalid package name in package.provided: sci-libs/lapack-atlas
Invalid package name in package.provided: sci-libs/blas-atlas
See portage(5) for correct package.provided usage.

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

Calculating dependencies... done!
[ebuild   R    ] dev-python/numpy-1.6.0  USE="doc lapack -test" 0 kB
[ebuild   R    ] dev-lang/R-2.13.0  USE="X bash-completion cairo doc java jpeg lapack nls openmp perl png readline tk -minimal -profile -static-libs" 0 kB
[ebuild   R    ] sci-mathematics/octave-3.4.0-r1  USE="curl doc fftw readline sparse zlib -test" 0 kB

As you could see, I also added blas-atlas and lapack-atlas to /etc/portage/profile/package.provided, but emerge was not happy with this:

'revdep-rebuild' want to reinstall sci-chemistry/apbs and it also fails because of missing BLAS libraries, probably I had to add sci-libs/lapack-atlas-VERSION to package.provided:

checking for --with-blas... -lblas
configure: checking blas using -lblas
checking for dscal in -lblas... no
configure: error: BLAS libraries or headers missing:  exiting on error!

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sci-chemistry/apbs-1.3-r1/work/apbs-1.3-source/config.log


Then I directly emerged atlas: 'emerge -vuDN sci-libs/atlas'. BTW, what I wanted already to ask every time. During the installation of atlas the CPUs should be set manually to performance mode. What about the run time of programs linked to atlas library. Should the computer also set manually to performance mode before running such programs or is it no issue to let the ondemand governor set the frequency during running these programs?

Also after installing sci-libs/atlas 'revdep-rebuild' or 'emerge apbs', respectively, fails due to missing BLAS libraries. Selected are the reference libraries. I tried also to select atlas or atlas-threads, but in any case apbs-1.3-r1, scilab-5.3.2, gromacs-4.5.4-r2 and opencv-2.2.0-r10 are failing to emerge due to missing libblas or liblapack. Should I file separate bugs for these issues?
Comment 19 Justin Lecher (RETIRED) gentoo-dev 2011-06-29 15:55:43 UTC
(In reply to comment #18)
> Hi Justin,
> 
> I added 'atlas' to USE in /etc/make.conf, but 'emerge -uvND world' does not
> want to update any packages because of the added 'atlas' flag:
> 
> root@orca:/root(5)# emerge -pvuND world
> Invalid package name in package.provided: sci-libs/lapack-atlas
> Invalid package name in package.provided: sci-libs/blas-atlas
> See portage(5) for correct package.provided usage.
> 
I am sorry, you need to add

sci-libs/blas-altlas-SOMEVERSION
Comment 20 Juergen Rose 2011-06-30 07:33:53 UTC
I still have a further question. 'eselect blas list' seems to show as usual that I have three possiblities to select a blas library. But if I list /usr/lib/libblas*,  I see that there is not any blas library:

root@orca:/usr/local/portage(192)# ll /usr/lib/libblas*
-rw-r--r-- 1 root root 724500 Oct  1  2010 /usr/lib/libblast.a
-rw-r--r-- 1 root root 171940 Oct  1  2010 /usr/lib/libblastapi.a
-rw-r--r-- 1 root root 100156 Oct  1  2010 /usr/lib/libblastcompadj.a

In the old times of app-admin/eselect-1.2.15, eselect-blas-0.1, eselect-cblas-0.1 and eselect-lapack-0.1 'eselect blas set N' created links from /usr/lib/blas/XXXX/libblas.a to /usr/lib/libblas.a. What does 'eselect blas set N' now?
Comment 21 Justin Lecher (RETIRED) gentoo-dev 2011-06-30 08:08:13 UTC
All the eselect stuff was moved to the alternatives moduls. The linking against blas libs and also lapack etc now heavily relies on the pkg-config files. You should now always make sure the build system uses

pkg-config --cflags blas

and

pkg-config --libs blas

if you need blas support.

To clean you system for this (I also did this), remove any blas/cblas/lapack whatsoever libs. Then manually make sure all libs are gone. And emerge all stuff from bicatali overlay. Now everything should work fine. t does for me.
Comment 22 Juergen Rose 2011-06-30 09:11:03 UTC
The eigen function or R applied to the distmatrix of iris data now also does not segfault for me, if R is linked to atlas-3.9.41 of the bicatali overlay.
Comment 23 Justin Lecher (RETIRED) gentoo-dev 2011-11-21 16:09:20 UTC
What about 2.1{3,4}.0?
Comment 24 Juergen Rose 2011-11-23 10:13:10 UTC
No segfaults with atlas-3.9.52 and R-2.14.0.
Comment 25 Sébastien Fabbro (RETIRED) gentoo-dev 2012-01-02 19:54:14 UTC
(In reply to comment #24)
> No segfaults with atlas-3.9.52 and R-2.14.0.

closing then