GCC8

2018-06-24 Thread Jerome Huck

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

Re: GCC8

2018-06-24 Thread Janne Blomqvist
On Sun, Jun 24, 2018 at 5:45 PM, Jerome Huck  wrote:

> 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.
>

Last I heard, equation.com have (substantially) modified the GCC version
they are distributing. I recommend that you either try to recreate your
problem with a build of the upstream sources (e.g. from the mingw-w64
project), or that you contact equation.com for help with your issue with
their product.

(Added the fortran list to CC, in case other gfortran developers have
better up to date information about the equation.com builds)

-- 
Janne Blomqvist


gcc-9-20180624 is now available

2018-06-24 Thread gccadmin
Snapshot gcc-9-20180624 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/9-20180624/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 9 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/trunk revision 261998

You'll find:

 gcc-9-20180624.tar.xzComplete GCC

  SHA256=f15d91d337a1313d28b2c4db1682f27cd3463b60c01750fa7eb1633b1915d1a5
  SHA1=a792915549ff2244d474cd3fa867c5e8eaca1f05

Diffs from 9-20180617 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-9
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.