Ticket #3787 (closed defect: fixed)

Opened 2 years ago

Last modified 20 months ago

[with spkg, positive review] make ATLAS use extended cpuid

Reported by: mabshoff Owned by: mabshoff
Priority: blocker Milestone: sage-3.2.3
Component: build Keywords:
Cc: cwitty, cremona Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

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

Changed 2 years ago by mabshoff

  • status changed from new to assigned

Changed 2 years ago 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

Changed 2 years ago by mabshoff

  • cc cwitty, cremona added

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]

Changed 2 years ago by mabshoff

  • milestone changed from sage-3.2 to sage-3.1.3

Changed 21 months ago by mabshoff

The latest errata is the following:

To fix this, simply comment out lines 95 and 99 of ATLAS/CONFIG/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:

Finally, to enable better P4E identification, change line 313 from:

      case 4:

to:

      case 4: ; case 6:

Changed 21 months ago by mabshoff

  • milestone changed from sage-3.4 to sage-3.2.2

This will be resolved via #3785.

Cheers,

Michael

Changed 20 months ago by mabshoff

  • milestone changed from sage-3.4 to sage-3.2.3

Changed 20 months ago by mabshoff

  • summary changed from make ATLAS use extended cpuid to [with spkg, needs review] make ATLAS use extended cpuid

This will be fixed via #3785. The spkg is also there.

Cheers,

Michael

Changed 20 months ago by mabshoff

  • summary changed from [with spkg, needs review] make ATLAS use extended cpuid to [with spkg, positive review] make ATLAS use extended cpuid

Positive review via #3785.

Cheers,

Michael

Changed 20 months ago by mabshoff

  • status changed from assigned to closed
  • resolution set to fixed

Merged in Sage 3.2.3.final

Note: See TracTickets for help on using tickets.