Ticket #5284 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[with patch, positive review] Set sage-flags.txt up to SSE2 only when building Sage in SSE2 only mode/remove SSSE3 and SSE4 flags (followup to #5219)

Reported by: mabshoff Owned by: mabshoff
Priority: blocker Milestone: sage-3.4.1
Component: distribution Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description (last modified by mabshoff) (diff)

This is a followup to #5219:

  • When building ATLAS in SSE2 only mode the sage-flags should be set accordingly to avoid that Sage complains on startup.
  • We do not use any SSE instructions beyond PNI (i.e. SSE3) at the moment, yet we check for SSSE3 and SSE4 flags. So do not add them to sage-flags since they will trigger wrong warning.
  • Document SAGE_SIMD_MODE in README.txt

Cheers,

Michael

Attachments

trac_5284.patch Download (958 bytes) - added by mabshoff 4 years ago.

Change History

comment:1 Changed 4 years ago by mabshoff

  • Status changed from new to assigned

comment:2 Changed 4 years ago by mabshoff

  • Milestone changed from sage-3.4 to sage-3.4.1

Better luck in 3.4.1.

Cheers,

Michael

comment:3 Changed 4 years ago by mabshoff

  • Milestone changed from sage-3.4.1 to sage-3.4

comment:4 Changed 4 years ago by mabshoff

  • Milestone changed from sage-3.4.2 to sage-3.4.1

This needs to be fixed in 3.4.1!

Cheers,

Michael

comment:5 Changed 4 years ago by mabshoff

We need to check

SAGE_SIMD_MODE

The only supported value at the moment is SSE2. So remove pni, ssse3 from the flags array.

Cheers,

Michael

comment:6 Changed 4 years ago by mabshoff

  • Description modified (diff)

Changed 4 years ago by mabshoff

comment:7 Changed 4 years ago by mabshoff

  • Summary changed from Set sage-flags.txt up to SSE2 only when building Sage in SSE2 only mode/remove SSSE3 and SSE4 flags (followup to #5219) to [with patch, needs review] Set sage-flags.txt up to SSE2 only when building Sage in SSE2 only mode/remove SSSE3 and SSE4 flags (followup to #5219)

comment:8 Changed 4 years ago by tornaria

  • Summary changed from [with patch, needs review] Set sage-flags.txt up to SSE2 only when building Sage in SSE2 only mode/remove SSSE3 and SSE4 flags (followup to #5219) to [with patch, positive review] Set sage-flags.txt up to SSE2 only when building Sage in SSE2 only mode/remove SSSE3 and SSE4 flags (followup to #5219)

Looks good to me.

For the record, I want to point out that mpir may be using lahf flag, which is not among the tested-for flags. Note that lahf does not depend on ssse3 (e.g. a Pentium D 930 has lahf but not ssse3). Apparently the first intel 64 bit cpus did not have lahf.

comment:9 follow-up: ↓ 10 Changed 4 years ago by was

I also tried this and it works fine.

tornaria -- good catch regarding lahf. We need to make a ticket about that!!

comment:10 in reply to: ↑ 9 Changed 4 years ago by mabshoff

Replying to was:

I also tried this and it works fine.

tornaria -- good catch regarding lahf. We need to make a ticket about that!!

That is part of #5849.

A P4 that does not have lahf is exceedingly rare and AFAIK we have never seen a problem with it, but I am sure we will hit it in the future. Note that x86 vs. core2 code in 64 bit MPIR is quote noticeable performance wise for some benchmarks.

Cheers,

Michael

comment:11 Changed 4 years ago by mabshoff

  • Status changed from assigned to closed
  • Resolution set to fixed

Merged in Sage 3.4.1.final. Last ticket for 3.4.1 - w00000t.

Cheers,

Michael

Note: See TracTickets for help on using tickets.