To use DR_HOOK in Surfex

The debugger and profiler Dr Hook is integrated in Surfex 7.

  • To use the debugger, before to execute the program, type :

export DR_HOOK=1

In case of a crash, the traceback and the exact localisation of the error is printed to the screen.

  • To use the profiler of the time spent in the different subroutines, still type :

export DR_HOOK_OPT=prof

A output file drhook.prof.1 is then created, that contains the profiling.