Autor Thema: Sun C 5.7 option -xarch  (Gelesen 2903 mal)

hchris

  • Gast
Sun C 5.7 option -xarch
« am: 01. August 2005, 10:16:40 »
Hi,
ich habe kuerzlich Sun Studio 10 auf einer U10 (400 MHz unter Solaris 9) installiert und wollte als erstes die C Version des scimark2 (http://math.nist.gov/scimark) uebersetzen. Und weil ich schon dabei war auch gleich noch fuer ein paar aeltere Maschinen aus meinem Zoo.

Seltsamerweise habe ich dabei festgestellt, dass die fuer die alte V7 Architektur mit -xcg89 compilierten Binaries auch auf der U10 im Mittel etwa 10% schneller laufen als die mit -native uebersetzten Versionen (aber auch 32bit) Auch unterschiedliche Optimierungen aendern daran nichts.

Der Unterschied ist sicher nicht dramatisch aber doch signifikant. Hat jemand eine Idee warum das so sein koennte oder habe ich die Compiler Optionen nur falsch verstanden ?



andromeda> cc -o scimark2 *.c -lm -native -xO5
cc: Warning: -xarch=native has been explicitly specified, or implicitly specified by a macro option, -xarch=native on this architecture implies -xarch=v8plusa which generates code that does not run on pre UltraSPARC processors
FFT.c:
LU.c:
MonteCarlo.c:
Random.c:
SOR.c:
SparseCompRow.c:
Stopwatch.c:
array.c:
kernel.c:
scimark2.c:
andromeda> ./scimark2
**                                                              **
** SciMark2 Numeric Benchmark, see http://math.nist.gov/scimark **
** for details. (Results can be submitted to pozo@nist.gov)     **
**                                                              **
Using       2.00 seconds min time per kenel.
Composite Score:           56.51
FFT             Mflops:    56.93    (N=1024)
SOR             Mflops:   106.58    (100 x 100)
MonteCarlo:     Mflops:    17.71
Sparse matmult  Mflops:    39.96    (N=1000, nz=5000)
LU              Mflops:    61.39    (M=100, N=100)
andromeda> cc -o scimark2 *.c -lm -xcg89 -xO5
FFT.c:
LU.c:
MonteCarlo.c:
Random.c:
SOR.c:
SparseCompRow.c:
Stopwatch.c:
array.c:
kernel.c:
scimark2.c:
andromeda> ./scimark2
**                                                              **
** SciMark2 Numeric Benchmark, see http://math.nist.gov/scimark **
** for details. (Results can be submitted to pozo@nist.gov)     **
**                                                              **
Using       2.00 seconds min time per kenel.
Composite Score:           63.41
FFT             Mflops:    79.00    (N=1024)
SOR             Mflops:   113.08    (100 x 100)
MonteCarlo:     Mflops:    17.48
Sparse matmult  Mflops:    39.77    (N=1000, nz=5000)
LU              Mflops:    67.72    (M=100, N=100)

sonnenblen.de - Das unabhängige Sun User Forum

Sun C 5.7 option -xarch
« am: 01. August 2005, 10:16:40 »