BISMG:SarahS/profiling glimmer

Using gprof:


 * Compile with -p flag (when using ifort compiler)
 * run as program as normal. A file called gmon.out is written to the directory
 * gprof my_file.exe gmon.out

How to start using gdb

 * compile with -g flag and switch off any optimisation flags (e.g. -O2)
 * open emacs
 * type altgr x
 * type gdb
 * If using idb then type idb -gdb -fullname myprog remove the annotate 3 that is at the prompt by default.
 * If using gdb then just type the name of your program at the prompt
 * GDB-/IU --> display other windows
 * type run at the command prompt to start running your executable
 * Useful commands:
 * ptype variable list the type of the variable
 * p variable prints the variable
 * n steps to the next line of code

Adding Gethin's debugging code to glimmer build system

 * put the code into /src/fortran
 * create a Makefile.am in this directory
 * Modify Makefile.am in /src/fortran