Ticket #3787 (assigned defect)

Opened 4 months ago

Last modified 2 months ago

make ATLAS use extended cpuid

Reported by: mabshoff Assigned to: mabshoff (accepted)
Priority: blocker Milestone: sage-3.2.2
Component: build Keywords:
Cc: cwitty, cremona

Description

[7:14pm] cwitty: 1) My spiffy new Xeon-branded core 2 quad computer is
very slow at compiling ATLAS.
[7:14pm] mabshoff: mhhh, how long?
[7:15pm] cwitty: I think ATLAS doesn't support the extended cpuid.
[7:15pm] cwitty: About 2 hours.
[7:15pm] mabshoff: On an Itanium 2 with loads of memory it takes about
3 hours with loads of cache.
[7:15pm] mabshoff: Can you check the ARCH in the makefile?
[7:16pm] cwitty: PIII64SSE3
[7:17pm] mabshoff: Ok, then it is identified. We might not have tuning
info.
[7:18pm] mabshoff: Let me check in a little while, but the compile
time depends on the L2 size.
[7:18pm] cwitty: Umm... Pentium 3?  I'm pretty sure it's not a pentium
3.
[7:18pm] mabshoff: Oops
[7:18pm] mabshoff: Yeah, you are right.
[7:18pm] mabshoff: ATLAS uses cpuid, not extended cpuid.
[7:18pm] mabshoff: I am not sure if 3.8.2 fixes that, but I can patch
it in case it does not.

Change History

08/06/2008 08:02:10 PM changed by mabshoff

  • status changed from new to assigned.

08/08/2008 12:11:16 PM changed by mabshoff

Clint just told me in an offlist email that he is tracking the problem at

http://math-atlas.sourceforge.net/errata.html#cpuid

That and another issue will be fixed in ATLAS 3.9.2 out this weekend.

Cheers,

Michael

08/08/2008 01:05:28 PM changed by mabshoff

  • cc set to cwitty, cremona.

And I figure it is better to quote the solution since the errata page tends to get updated quite a bit:

ATLAS configure mis-identifies your new system as an older system (eg., Core2-Xeon detected as PIII) In the original x86 ISA, when using CPUID to detect family and model, we were advised to only add in the extended bits for certain base bits. Intel and AMD now say to always add them in, and have reused the base bits for newer architectures. This means that 3.8.x (which uses the original CPUID instructions) will sometimes detect a modern machine as some older machine (for instance my Xeon E5420 was detected as a Pentium III). To fix this, simply comment out lines 95 and 99 of ATLAS/src/backend/archinfo_x86.c. So, change line 95 from:

if (*family == 0xf *family == 0) /* extended family is added in */

to:

/* if (*family == 0xf *family == 0)*/ /* extended family is added in */

and change line 99 from

if (*model == 0xf) /* extended model is concatenated */

to:

/* if (*model == 0xf)*/ /* extended model is concatenated */

Essentially, all the Core2-based systems are treated the same by ATLAS. So, to get to use the architectural defaults on Core2-based XEONs, change line 297 from:

case 15:

to:

case 15: ; case 23:

[end quote]

09/30/2008 10:29:38 AM changed by mabshoff

  • milestone changed from sage-3.2 to sage-3.1.3.