Code optimization

From GHER

Jump to: navigation, search

Profiling

gprof (gfortran or ifort)

  1. compile with "ifort -p" or "gfortran -pg". For OAK, it is sufficient to compiler with:
make PROFILING=on
  1. run the program as normal (creates file gmon.out)
  2. analysis the file with
gprof ~/Assim/assim-ifort-single-profiling gmon.out


pgi

  1. Compile
pgf90  -O3 -Mflushz -byteswapio -Minfo=ccff ...
  1. Run
pgcollect ~/Assim/assim-pgi-single-profiling assim_prof.init 1
  1. Analyse
pgprof -exe ~/Assim/assim-pgi-single-profiling

http://www.pgroup.com/lit/articles/insider/v1n1a2.htm

Personal tools