Bug 510498

Summary: Installed subpackage atlass-sse incompatible with generic P6 architecture
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: atlasAssignee: Deji Akingunola <dakingun>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: dakingun
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 3.8.3-9.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-15 22:40:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Architectural default for Pentium Pro none

Description Joachim Frieben 2009-07-09 14:18:11 UTC
Description of problem:
After installing the i586 variant of F11 on a Pentium II system, a numerical code compiled against BLAS aborts because of an illegal instruction encountered in the executable. The corresponding GDB output reads:

  Program received signal SIGILL, Illegal instruction.
  0x046dd6d8 in ATL_dger () from /usr/lib/atlas-sse/libatlas.so.3

Version-Release number of selected component (if applicable):
atlas-sse-3.8.3-4.fc11.i586

How reproducible:
Always.

Steps to Reproduce:
1. Run sample code built against BLAS on a Pentium II system.
  
Actual results:
Code aborts and reports an illegal instruction in libatlas.so.3.

Expected results:
Code runs without issues.

Additional info:
- The P6 architecture does not provide SSE support by default which is
  only the case for Pentium III and later models.
- Fedora package atlas-3.8.3-4.fc11 only provides SSE, SSE2, and SSE3
  subpackages. However, also a non SSE package is required for generic
  P6 systems.
- Package atlas-sse-3.8.3-4.fc11.i586 gets pulled in on said system by
  a couple of packages, e.g. OCTAVE, and cannot be removed although the
  required functionality is provided by package blas-3.1.1-5.fc11.i586.

Comment 1 Deji Akingunola 2009-07-14 14:04:08 UTC
Can't you 'force' your code to link to the stock blas library instead of using the optimised atlas library (using -L/usr/lib -lblas). I dont think there's any point using ATLAS' blas lib on a system that doesn't provide SSE support.

Comment 2 Joachim Frieben 2009-07-14 14:51:52 UTC
(In reply to comment #1)
Atlas appears to provide a significant performance benefit even on Pentium II and earlier systems. Just have a look here, e.g. page 11 of http://www.linuxclustersinstitute.org/conferences/archive/2000/PDF/Whaley.pdf
For a Pentium Pro 200 or a Pentium II 266, the speed-up is something about 4-5 compared to the Netlib libraries compiled with a F77 compiler. Using SSE/SSE2/SSE3 instructions certainly provides an additional optimization. However, the very source code of the different routines has been strongly modified or rewritten from scratch in order to increase efficiency. I therefore strongly suggest to add a standard i586 package which runs on any standard P5/P6 system. Note: SSE is not even a standard feature of the P6 architecure let alone the P5 one. Moreover, the entry level requirement of F11 is a 200 MHz Pentium-class system!
Two packages which currently force Atlas to be pulled in are numpy and suitesparse.

Comment 3 Deji Akingunola 2009-08-04 17:31:56 UTC
(In reply to comment #2)

Unfortunately I don't think I will be able to implement the non-sse enabled subpackage as requested here. Procedure for building the ATLAS package has changed since the paper you referenced above. The package now uses 'architectural defaults', which are pre-determined kernels for specified architectures during the build process. The most basic architectural default for the x86 CPU was provided for PIII with SSE1. I've tried to use that to build an atlas library without sse support, but that didnt go well (http://koji.fedoraproject.org/koji/taskinfo?taskID=1580363).
It seems PIII is the least we can support for ATLAS on Fedora.

Comment 4 Joachim Frieben 2009-08-05 08:36:24 UTC
If the Fedora "atlas" package does not support the base architecture which is i686, then no other package must depend on it. It then has to remain a purely optional package which is not a problem because its functionality is provided by blas/lapack. Currently, there even exists a dependency chain

  atlas-sse > PyOpenGL > gnome-games ,

thus merely installing 'gnome-games' pulls in a package which breaks the system!

I can build ATLAS libraries on my dual Pentium II w/o a hitch, obtaining configuration flags e.g. like

  ARCH = PII32
  ARCHDEFS = -DATL_OS_Linux -DATL_ARCH_PII -DATL_CPUMHZ=331 -DATL_GAS_x8632

I will investigate how to create an "architectural defaults" on my local system for inclusion into the Fedora package.

Comment 5 Deji Akingunola 2009-08-05 14:28:10 UTC
(In reply to comment #4)
> If the Fedora "atlas" package does not support the base architecture which is
> i686, then no other package must depend on it. 

i686 != PII

> I can build ATLAS libraries on my dual Pentium II w/o a hitch, obtaining
> configuration flags e.g. like
> 
>   ARCH = PII32
>   ARCHDEFS = -DATL_OS_Linux -DATL_ARCH_PII -DATL_CPUMHZ=331 -DATL_GAS_x8632
> 
> I will investigate how to create an "architectural defaults" on my local system
> for inclusion into the Fedora package.  
If you can create such architectural default let me know, and I'll use it.

Comment 6 Joachim Frieben 2009-08-05 14:43:28 UTC
(In reply to comment #5)
> i686 != PII

Regarding ATLAS optimizations, i686 == Pentium II since the only difference is MMX which is not relevant here. Anyway, I can even plug in back my original Pentium Pro 200 processors which are the true archetype of the i686 architecture.

Comment 7 Joachim Frieben 2009-08-15 09:34:56 UTC
Request added to upstream support tracker:

  https://sourceforge.net/tracker/?func=detail&aid=2838097&group_id=23725&atid=379483 .

Comment 8 Joachim Frieben 2009-08-15 17:19:49 UTC
rwhaley of the ATLAS project has announced to build official architectural defaults for the Pentium Pro to which he actually still has access :)
This will allow to build a non-SSEx sub-package for the Fedora project.

Comment 9 Joachim Frieben 2009-08-20 07:08:02 UTC
Created attachment 358048 [details]
Architectural default for Pentium Pro

Architectural defaults for Pentium Pro provided by rhawley of the ATLAS project. Following the documentation pages, I have removed file atlas_cacheedge.h which is also missing in every other AMD/Intel defaults.
Once this turns out to work as expected, PPRO32.tgz will probably go into directory ATLAS/CONFIG/ARCHS/ of the upstream tar ball for future releases. Regarding the Fedora package, this should become an additional package source.

Comment 10 Deji Akingunola 2009-08-30 00:38:33 UTC
Can you please check out the no_sse subpackage in the scratch build at http://koji.fedoraproject.org/koji/taskinfo?taskID=1643527 , and confirm if it meets your need.

Comment 11 Joachim Frieben 2009-09-06 08:55:20 UTC
atlas-no_sse-3.8.3-9.fc11.i686 works correctly now. Just two remarks:

- like in the x86_64 case, the generic package without special requirements
  should just be named atlas-3.8.3-9.fc11.i686, the more specialized
  packages limited to a restricted range of processors get distinguished
  by adding a suffix like sse, sse2, etc.
- the default build architecture of F11 is i586 not i686.

Thus: atlas-no_sse-3.8.3-9.fc11.i686 -> atlas-3.8.3-9.fc11.i586

Comment 12 Deji Akingunola 2009-09-06 18:46:22 UTC
(In reply to comment #11)

> - like in the x86_64 case, the generic package without special requirements
>   should just be named atlas-3.8.3-9.fc11.i686, the more specialized
>   packages limited to a restricted range of processors get distinguished
>   by adding a suffix like sse, sse2, etc.

IMO, the PII (and other x86 non-SSE) cpus are rather exceptions than norm nowadays. Smolt statistics shows cpu with speeds <= 512 MHz are less than 0.8%. Furthermore cpus with speed >2 GHz, which are all likely to be SSE2 capable, are more than 58%. The (ATLAS) packaging have been design to cater for the majority of the systems available by making the atlas-sse2 subpackage to provide 'atlas' on x86.

> - the default build architecture of F11 is i586 not i686.
> 
Neither i586 or i686 is hardcoded in the spec file. The confusion here likely came from me using arch_override=i686 when I submitted the scratch build job.


> Thus: atlas-no_sse-3.8.3-9.fc11.i686 -> atlas-3.8.3-9.fc11.i586

Comment 13 Joachim Frieben 2009-09-07 04:59:53 UTC
(In reply to comment #12)
> IMO, the PII (and other x86 non-SSE) cpus are rather exceptions than norm
> nowadays.

That's not the point: the P6 architecture (non-SSE, non-MMX) is the generic x86 from which the minimum CPU requirements for F12 have been derived. From this point of view, the non-SSE package is the default one, thus named atlas-..., whereas sub-packages optimized for various more recent processors need to be labeled accordingly.

Comment 14 Deji Akingunola 2009-09-07 06:06:44 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > IMO, the PII (and other x86 non-SSE) cpus are rather exceptions than norm
> > nowadays.
> 
> That's not the point: the P6 architecture (non-SSE, non-MMX) is the generic x86
> from which the minimum CPU requirements for F12 have been derived. From this
> point of view, the non-SSE package is the default one, thus named atlas-...,
> whereas sub-packages optimized for various more recent processors need to be
> labeled accordingly.  

I'm sorry I don't see it that way; I see the non-SSE subpackage as a 'crippled' ATLAS for x86 systems. I think it defeat the purpose of the ATLAS package to name the non-SSE subpackage 'atlas', as it will potentially deceive a larger percentage of its installers looking for optimized atlas.

Comment 15 Fedora Update System 2009-09-28 03:35:49 UTC
atlas-3.8.3-8.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/atlas-3.8.3-8.fc11

Comment 16 Fedora Update System 2009-09-29 14:29:07 UTC
atlas-3.8.3-8.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update atlas'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10013

Comment 17 Fedora Update System 2009-09-30 17:44:17 UTC
atlas-3.8.3-9.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/atlas-3.8.3-9.fc11

Comment 18 Fedora Update System 2009-10-03 19:06:48 UTC
atlas-3.8.3-9.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update atlas'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10202

Comment 19 Fedora Update System 2009-10-15 22:39:56 UTC
atlas-3.8.3-9.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.