The following fortran program when run via pfmon on a SGI Altix (ia64) running
Linux 2.6.16 gets various results when measuring the number of floating point
operations. When given ni=10 and nj=100, one would expect the result to be
1000, but I've seen the number range from 247 to 1001.

Am I doing something wrong? Or should I be getting consistent results
of 1000?

(The version of pfmon being used is also provided below.)

Thanks,
Dean


        \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

cat << EOF > nfpo.f
program nfpo
  integer :: ni, nj, nfp
  real :: a, b, c, d, e

  print *, 'enter ni, nj, b'
  read *, ni, nj, b

  do i = 1, ni
    call doflop( nj, a, b, c, d, e )
  end do

  nfp = ni * nj
  print *, ' ni=', ni, ' nj=', nj, ' nfp=', nfp
  print *, ' a=', a, ' b=', b, ' c=', c, ' d=', d, ' e=', e

end program

subroutine doflop( nj, a, b, c, d, e)
  real :: a, b, c, d, e

  do i = 1, nj
    a = a + b
  end do

end subroutine
EOF

ifort -O0 -g -free -o ./nfpo.x ./nfpo.f
nm ./nfpo.x | sort > nfpo.x.map

# I ran the following on a four processor system, you may need to change
# '--cpu-list=0-3' to reflect the system you run this on.

pfmon --system-wide --smpl-outfile=/tmp/sample.out.4572 --smpl-entries=100000 
-u -k --short-smpl-periods=1 --smpl-module=compact-ia64 --events=FP_OPS_RETIRED 
--relative --cpu-list=0-3 ./nfpo.x

# when asked to " enter ni, nj, b" give it:  10,100,1

# Use the map to count the number of entries in the sample outfiles generated
# by pfmon that involve the doflop() subroutine.


        \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

cranberry7% pfmon -V
pfmon version 3.0 Date: Apr 23 2006
Copyright (C) 2001-2003 Hewlett-Packard Company

cranberry7% pfmon -I
detected host CPUs:  4-way 1300MHz/3.0MB Itanium 2 (Madison, B1)
supported PMU models: [itanium2] [itanium] [generic IA-64]
detected host PMU: itanium2
supported sampling modules: [detailed-itanium2] [raw-ia64] [compact-ia64] [btb] 
[example-ia64]
pfmlib version: 3.1
kernel perfmon version: 2.0
cranberry7%

_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to