Private communication. If someone has clues/hints...Thanks in advance !!!
Hi.
I just have a new small laptop with N4200 proc. In the past I have one
N3470.
With GCC , a couple of years ago, I used the Linpack(Fortran) in single
precision to have an idea of the proc capabilities.
I attached the Fortran source code. I downloaded GCC from this web page
see http://www.equation.com/servlet/equation.cmd?fa=fortran
With the N3470, I was able to have more than 1 GigaFlops. (-O2, -O4...)
and there was a difference when you changed the level of optimisation.
I just tried it with the N4200, same result with different levels of
optimisation, benchmark around 300 Megaflops !!!
I was just expecting something a little above the N3470 !
Clues/Hints?
Thanks in advance.
Best regards.
Jerome Huck.
program main
c*72
c
c Parameters:
c
cN is the problem size.
c
integer n
parameter ( n = 1000 )
integer lda
parameter ( lda = n + 1 )
real a(lda,n)
real b(n)
real cray
real eps
real epslon
integer i
integer info
integer ipvt(n)
real norma
real normx
real ops
real resid
real residn
double precision t1
double precision t2
real time(6)
real total
real x(n)
call timestamp ( )
write ( *, '(a)' ) ' '
write ( *, '(a)' ) 'LINPACK_BENCH_S'
write ( *, '(a)' ) ' The LINPACK benchmark.'
write ( *, '(a)' ) ' Language: FORTRAN77'
write ( *, '(a)' ) ' Datatype: Real Single Precision'
write ( *, '(a,i8)' ) ' Matrix order N = ', n
write ( *, '(a,i8)' ) ' Leading matrix dimension LDA = ', lda
cray = .056
ops = (2.0d0*float(n)**3)/3.0d0 + 2.0d0*float(n)**2
call matgen(a,lda,n,b,norma)
call cpu_time ( t1 )
call sgefa(a,lda,n,ipvt,info)
call cpu_time ( t2 )
time(1) = t2 - t1
call cpu_time ( t1 )
call sgesl(a,lda,n,ipvt,b,0)
call cpu_time ( t2 )
time(2) = t2 - t1
total = time(1) + time(2)
c
c compute a residual to verify results.
c
do i = 1,n
x(i) = b(i)
end do
call matgen(a,lda,n,b,norma)
do i = 1,n
b(i) = -b(i)
end do
call smxpy(n,b,n,lda,x,a)
resid = 0.0
normx = 0.0
do i = 1,n
resid = max ( resid, abs(b(i)) )
normx = max ( normx, abs(x(i)) )
end do
eps = epslon(1.0)
residn = resid/( n*norma*normx*eps )
write(6,40)
40format(' norm. resid resid machep',
$ ' x(1) x(n)')
write(6,50) residn,resid,eps,x(1),x(n)
50format(1p5e16.8)
write(6,70)
70format(6x,'factor',5x,'solve',6x,'total',5x,'mflops',7x,'unit',
$ 6x,'Cray-ratio')
time(3) = total
time(4) = ops/(1.0e6*total)
time(5) = 2.0e0/time(4)
time(6) = total/cray
write(6,110) (time(i),i=1,6)
110format(6(1pe11.3))
write ( *, '(a)' ) ' '
write ( *, '(a)' ) 'LINPACK_BENCH_S'
write ( *, '(a)' ) ' Normal end of execution.'
write ( *, '(a)' ) ' '
call timestamp ( )
stop
end
subroutine matgen(a,lda,n,b,norma)
c*72
c
integer lda,n,i,j,init(4)
real a(lda,1),b(1),norma
real random_value
init(1) = 1
init(2) = 2
init(3) = 3
init(4) = 1325
norma = 0.0
do 30 j = 1,n
do 20 i = 1,n
a(i,j) = random_value(init) - .5
norma = amax1(abs(a(i,j)), norma)
20continue
30 continue
do 35 i = 1,n
b(i) = 0.0
35 continue
do 50 j = 1,n
do 40 i = 1,n
b(i) = b(i) + a(i,j)
40continue
50 continue
return
end
subroutine sgefa(a,lda,n,ipvt,info)
c*72
c
integer lda,n,ipvt(1),info
real a(lda,1)
c
c sgefa factors a real matrix by gaussian elimination.
c
c sgefa is usually called by dgeco, but it can be called
c directly with a saving in time if rcond is not needed.
c (time for dgeco) = (1 + 9/n)*(time for sgefa) .
c
c on entry
c
ca real(lda, n)
cthe matrix to be factored.
c
clda integer
cthe leading dimension of the array a .
c
cn integer
cthe order of the matrix a .
c
c on return
c
ca an upper triangular matrix and the multipliers
cwhich were used to obtain it.
cthe factorization can be written a = l*u where
cl is a product of permutation and unit lower
ctriangu