Atlas binaries require SSE3 extensions

Bug #778217 reported by Nathaniel Smith on 2011-05-06
This bug affects 3 people
Affects Status Importance Assigned to Milestone
atlas (Ubuntu)
python-numpy (Ubuntu)

Bug Description

With stock ATLAS, Python, numpy from natty on x86-32, I get the following behavior when trying to solve this least-squares problem:

$ python -c 'import cPickle; import gzip; import numpy as np; x, y = cPickle.load("well1850.pickle.gz")); np.linalg.lstsq(x, y)'
Illegal instruction

(Note that while this matrix is sparse, I have it stored in a dense numpy array. The file 'well1850.pickle.gz' is attached to make it easier to reproduce.)

Expected behavior: I wouldn't think you should ever get a SIGILL from BLAS, no matter what you do.

I can't seem to find any dbgsym packages for ATLAS, but gdb says:

(gdb) r
Starting program: /usr/bin/python -c import\ cPickle\;\ import\ gzip\;\ import\ numpy\ as\ np\;\ x,\ y\ =\ cPickle.load\(\(\"well1850.pickle.gz\"\)\)\;\ np.linalg.lstsq\(x,\ y\)
[Thread debugging using libthread_db enabled]

Program received signal SIGILL, Illegal instruction.
0x00704e89 in ATL_dupMBmm0_4_0_b0 () from /usr/lib/
(gdb) bt
#0 0x00704e89 in ATL_dupMBmm0_4_0_b0 () from /usr/lib/
#1 0x000002c8 in ?? ()
#2 0x0087b4f8 in ?? () from /usr/lib/
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: libatlas3gf-base 3.8.3-29
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic
Uname: Linux 2.6.38-8-generic i686
Architecture: i386
Date: Thu May 5 17:05:48 2011
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
 PATH=(custom, user)
SourcePackage: atlas
UpgradeStatus: Upgraded to natty on 2011-05-05 (0 days ago)

Nathaniel Smith (njs) wrote :
Pauli Virtanen (pauli-virtanen) wrote :

Worksforme with libatlas3gf-base, but I have a processor with SSE3.

I'm seeing this with libatlas3gf-base: (based on opcodes in the assembler dump of the binaries)

$ detect_cpu_extensions /usr/lib/atlas-base/*.so
/usr/lib/atlas-base/ 3dnow mmx pentium_pro sse sse2 sse3
/usr/lib/atlas-base/ pentium_pro sse sse2
/usr/lib/atlas-base/ pentium_pro sse sse2
/usr/lib/atlas-base/ pentium_pro sse sse2

IIRC, Atlas does not have runtime CPU extension detection, so this apparently means the binary shipped with Ubuntu will only work on modern processors with SSE3. I note that currently it seems that te libatlas3gf-base is the only ATLAS package --- the *-sse* versions seem to have been removed.

Pauli Virtanen (pauli-virtanen) wrote :

It's an ATLAS issue, so setting the Numpy part to Invalid.

Changed in python-numpy (Ubuntu):
status: New → Invalid
Nathaniel Smith (njs) wrote :

Yes, indeed, I'm working on a Thinkpad X60s which has a Core Duo -- so, no SSE3. /proc/cpuinfo says:

flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts aperfmperf pni monitor vmx est tm2 xtpr pdcm dts

I understand the rationale for only shipping one Atlas binary, but presumably that one binary should target the lowest common denominator?

summary: - "illegal instruction" crash when solving least-squares problem
+ Atlas binaries require SSE3 extensions
Sylvestre Ledru (sylvestre) wrote :

Yes, I am not arguing. it is a bug.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.